From d11acefdfd292fcf75d736a97177702a49c0d5da Mon Sep 17 00:00:00 2001
From: Jonathan Ryan
Date: Tue, 25 Aug 2015 12:55:42 -0400
Subject: Initial import.

---
 .SRCINFO        | 16 ++++++++++++++++
 PKGBUILD        | 24 ++++++++++++++++++++++++
 htpdate.service | 10 ++++++++++
 3 files changed, 50 insertions(+)
 create mode 100644 .SRCINFO
 create mode 100644 PKGBUILD
 create mode 100644 htpdate.service

diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 0000000..5330a12
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = htpdate
+	pkgdesc = A client for time synchronisation
+	pkgver = 1.1.1
+	pkgrel = 1
+	url = http://www.vervest.org/htp/
+	arch = i686
+	arch = x86_64
+	license = GPL2
+	depends = glibc
+	source = http://www.vervest.org/htp/archive/c/htpdate-1.1.1.tar.xz
+	source = htpdate.service
+	md5sums = c612f63282e3f23b709f37a5c81d4739
+	md5sums = b419153625904d9a5544e585f69c66c5
+
+pkgname = htpdate
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..8ff331e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,24 @@
+# Contributor: Jonathan Ryan <jryan@curious-computing.com>
+# Contributor: Hussam Al-Tayeb <hussam@visp.net.lb>
+pkgname=htpdate
+pkgver=1.1.1
+pkgrel=1
+pkgdesc="A client for time synchronisation"
+arch=(i686 x86_64)
+url="http://www.vervest.org/htp/"
+license=(GPL2)
+depends=('glibc')
+source=("http://www.vervest.org/htp/archive/c/${pkgname}-${pkgver}.tar.xz" "htpdate.service")
+md5sums=('c612f63282e3f23b709f37a5c81d4739'
+         'b419153625904d9a5544e585f69c66c5')
+build() {
+  cd ${pkgname}-${pkgver}
+  make
+}
+package() {
+  install -D -m 644 htpdate.service ${pkgdir}/usr/lib/systemd/system/htpdate.service
+  cd ${pkgname}-${pkgver}
+  install -D -m 755 htpdate ${pkgdir}/usr/bin/htpdate
+  install -D -m 644 htpdate.8 ${pkgdir}/usr/share/man/man8/htpdate.8
+}
+
diff --git a/htpdate.service b/htpdate.service
new file mode 100644
index 0000000..831f411
--- /dev/null
+++ b/htpdate.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Htpdate Daemon
+
+[Service]
+Type=forking
+PIDFile=/run/htpdate.pid
+ExecStart=/usr/bin/htpdate -D -s -i /run/htpdate.pid www.linux.org www.freebsd.org
+
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file
-- 
cgit v1.2.3-70-g09d2


From 4d15fc3aecfe0ebea5fd44e81d419f17ca332c75 Mon Sep 17 00:00:00 2001
From: Jonathan Ryan
Date: Tue, 8 Mar 2016 11:22:44 -0500
Subject: Update to 1.1.3

---
 .SRCINFO | 8 +++++---
 PKGBUILD | 4 ++--
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO
index 5330a12..c80a658 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,17 @@
+# Generated by mksrcinfo v8
+# Tue Mar  8 16:22:41 UTC 2016
 pkgbase = htpdate
 	pkgdesc = A client for time synchronisation
-	pkgver = 1.1.1
+	pkgver = 1.1.3
 	pkgrel = 1
 	url = http://www.vervest.org/htp/
 	arch = i686
 	arch = x86_64
 	license = GPL2
 	depends = glibc
-	source = http://www.vervest.org/htp/archive/c/htpdate-1.1.1.tar.xz
+	source = http://www.vervest.org/htp/archive/c/htpdate-1.1.3.tar.xz
 	source = htpdate.service
-	md5sums = c612f63282e3f23b709f37a5c81d4739
+	md5sums = 51fcfe05fc4f8be6b19ecbaf88e8deaa
 	md5sums = b419153625904d9a5544e585f69c66c5
 
 pkgname = htpdate
diff --git a/PKGBUILD b/PKGBUILD
index 8ff331e..ac8655a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
 # Contributor: Jonathan Ryan <jryan@curious-computing.com>
 # Contributor: Hussam Al-Tayeb <hussam@visp.net.lb>
 pkgname=htpdate
-pkgver=1.1.1
+pkgver=1.1.3
 pkgrel=1
 pkgdesc="A client for time synchronisation"
 arch=(i686 x86_64)
@@ -9,7 +9,7 @@ url="http://www.vervest.org/htp/"
 license=(GPL2)
 depends=('glibc')
 source=("http://www.vervest.org/htp/archive/c/${pkgname}-${pkgver}.tar.xz" "htpdate.service")
-md5sums=('c612f63282e3f23b709f37a5c81d4739'
+md5sums=('51fcfe05fc4f8be6b19ecbaf88e8deaa'
          'b419153625904d9a5544e585f69c66c5')
 build() {
   cd ${pkgname}-${pkgver}
-- 
cgit v1.2.3-70-g09d2


From 3a9597f789a5f097ac1981de209ba990f9092501 Mon Sep 17 00:00:00 2001
From: Dominik Schrempf
Date: Thu, 25 Jan 2018 15:14:25 +0100
Subject: v1.2.0

---
 .SRCINFO        |  6 +++---
 .gitignore      |  2 ++
 PKGBUILD        | 11 ++++++-----
 htpdate.service |  3 ++-
 4 files changed, 13 insertions(+), 9 deletions(-)
 create mode 100644 .gitignore

diff --git a/.SRCINFO b/.SRCINFO
index c80a658..0586bb7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,15 @@
 # Generated by mksrcinfo v8
-# Tue Mar  8 16:22:41 UTC 2016
+# Thu Jan 25 14:13:04 UTC 2018
 pkgbase = htpdate
 	pkgdesc = A client for time synchronisation
-	pkgver = 1.1.3
+	pkgver = 1.2.0
 	pkgrel = 1
 	url = http://www.vervest.org/htp/
 	arch = i686
 	arch = x86_64
 	license = GPL2
 	depends = glibc
-	source = http://www.vervest.org/htp/archive/c/htpdate-1.1.3.tar.xz
+	source = http://www.vervest.org/htp/archive/c/htpdate-1.2.0.tar.xz
 	source = htpdate.service
 	md5sums = 51fcfe05fc4f8be6b19ecbaf88e8deaa
 	md5sums = b419153625904d9a5544e585f69c66c5
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..d74bd88
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/update
+/htpdate-*.tar.xz
\ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
index ac8655a..0ddc3c4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,8 @@
-# Contributor: Jonathan Ryan <jryan@curious-computing.com>
-# Contributor: Hussam Al-Tayeb <hussam@visp.net.lb>
+# Maintainer: Dominik Schrempf <dominik.schrempf at openmailbox dot org>
+# Contributor: Jonathan Ryan <jryan at curious-computing dot com>
+# Contributor: Hussam Al-Tayeb <hussam at visp dot net dot lb>
 pkgname=htpdate
-pkgver=1.1.3
+pkgver=1.2.0
 pkgrel=1
 pkgdesc="A client for time synchronisation"
 arch=(i686 x86_64)
@@ -9,8 +10,8 @@ url="http://www.vervest.org/htp/"
 license=(GPL2)
 depends=('glibc')
 source=("http://www.vervest.org/htp/archive/c/${pkgname}-${pkgver}.tar.xz" "htpdate.service")
-md5sums=('51fcfe05fc4f8be6b19ecbaf88e8deaa'
-         'b419153625904d9a5544e585f69c66c5')
+md5sums=('9d5ca69be06edf5d535b52b5f790da4e'
+         'fd11d26ebff84d9538ce9ab6238fae73')
 build() {
   cd ${pkgname}-${pkgver}
   make
diff --git a/htpdate.service b/htpdate.service
index 831f411..116aaba 100644
--- a/htpdate.service
+++ b/htpdate.service
@@ -7,4 +7,5 @@ PIDFile=/run/htpdate.pid
 ExecStart=/usr/bin/htpdate -D -s -i /run/htpdate.pid www.linux.org www.freebsd.org
 
 [Install]
-WantedBy=multi-user.target
\ No newline at end of file
+WantedBy=multi-user.target
+
-- 
cgit v1.2.3-70-g09d2


From 4422e754f3617dacedae40a90653605941335d8f Mon Sep 17 00:00:00 2001
From: Dominik Schrempf
Date: Sun, 3 Feb 2019 23:16:19 +0100
Subject: Update PID file.

---
 .SRCINFO        | 8 +++-----
 PKGBUILD        | 4 ++--
 htpdate.service | 6 +++---
 3 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO
index 0586bb7..4665f95 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,7 @@
-# Generated by mksrcinfo v8
-# Thu Jan 25 14:13:04 UTC 2018
 pkgbase = htpdate
 	pkgdesc = A client for time synchronisation
 	pkgver = 1.2.0
-	pkgrel = 1
+	pkgrel = 2
 	url = http://www.vervest.org/htp/
 	arch = i686
 	arch = x86_64
@@ -11,8 +9,8 @@ pkgbase = htpdate
 	depends = glibc
 	source = http://www.vervest.org/htp/archive/c/htpdate-1.2.0.tar.xz
 	source = htpdate.service
-	md5sums = 51fcfe05fc4f8be6b19ecbaf88e8deaa
-	md5sums = b419153625904d9a5544e585f69c66c5
+	md5sums = 9d5ca69be06edf5d535b52b5f790da4e
+	md5sums = ed9c9b1222e90e6ee0751f8f88772606
 
 pkgname = htpdate
 
diff --git a/PKGBUILD b/PKGBUILD
index 0ddc3c4..f29ee6e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
 # Contributor: Hussam Al-Tayeb <hussam at visp dot net dot lb>
 pkgname=htpdate
 pkgver=1.2.0
-pkgrel=1
+pkgrel=2
 pkgdesc="A client for time synchronisation"
 arch=(i686 x86_64)
 url="http://www.vervest.org/htp/"
@@ -11,7 +11,7 @@ license=(GPL2)
 depends=('glibc')
 source=("http://www.vervest.org/htp/archive/c/${pkgname}-${pkgver}.tar.xz" "htpdate.service")
 md5sums=('9d5ca69be06edf5d535b52b5f790da4e'
-         'fd11d26ebff84d9538ce9ab6238fae73')
+         'ed9c9b1222e90e6ee0751f8f88772606')
 build() {
   cd ${pkgname}-${pkgver}
   make
diff --git a/htpdate.service b/htpdate.service
index 116aaba..21946d2 100644
--- a/htpdate.service
+++ b/htpdate.service
@@ -1,10 +1,10 @@
 [Unit]
-Description=Htpdate Daemon
+Description=Htpdate daemon
 
 [Service]
 Type=forking
-PIDFile=/run/htpdate.pid
-ExecStart=/usr/bin/htpdate -D -s -i /run/htpdate.pid www.linux.org www.freebsd.org
+PIDFile=/var/run/htpdate.pid
+ExecStart=/usr/bin/htpdate -D -a -s -i /var/run/htpdate.pid www.linux.org www.freebsd.org ntp.neu.edu.cn www.kernel.org
 
 [Install]
 WantedBy=multi-user.target
-- 
cgit v1.2.3-70-g09d2


From c3f853a31ee9060efcac009cfbaa210e2c4114da Mon Sep 17 00:00:00 2001
From: Dominik Schrempf
Date: Sat, 13 Jul 2019 10:11:51 +0200
Subject: bump version

---
 .SRCINFO   |  8 ++++----
 .gitignore |  4 +++-
 PKGBUILD   | 18 ++++++++++++------
 3 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO
index 4665f95..d4eaea8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,15 @@
 pkgbase = htpdate
 	pkgdesc = A client for time synchronisation
-	pkgver = 1.2.0
-	pkgrel = 2
+	pkgver = 1.2.1
+	pkgrel = 1
 	url = http://www.vervest.org/htp/
 	arch = i686
 	arch = x86_64
 	license = GPL2
 	depends = glibc
-	source = http://www.vervest.org/htp/archive/c/htpdate-1.2.0.tar.xz
+	source = http://www.vervest.org/htp/archive/c/htpdate-1.2.1.tar.xz
 	source = htpdate.service
-	md5sums = 9d5ca69be06edf5d535b52b5f790da4e
+	md5sums = cab01ddcb62bd84154670a37a7a0c31c
 	md5sums = ed9c9b1222e90e6ee0751f8f88772606
 
 pkgname = htpdate
diff --git a/.gitignore b/.gitignore
index d74bd88..a41cf30 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
 /update
-/htpdate-*.tar.xz
\ No newline at end of file
+/htpdate-*.tar.xz
+/pkg/
+/src/
diff --git a/PKGBUILD b/PKGBUILD
index f29ee6e..6839a56 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,31 @@
-# Maintainer: Dominik Schrempf <dominik.schrempf at openmailbox dot org>
+# Maintainer: Dominik Schrempf <dominik.schrempf at gmail dot com>
 # Contributor: Jonathan Ryan <jryan at curious-computing dot com>
 # Contributor: Hussam Al-Tayeb <hussam at visp dot net dot lb>
 pkgname=htpdate
-pkgver=1.2.0
-pkgrel=2
+pkgver=1.2.1
+pkgrel=1
 pkgdesc="A client for time synchronisation"
 arch=(i686 x86_64)
 url="http://www.vervest.org/htp/"
 license=(GPL2)
 depends=('glibc')
-source=("http://www.vervest.org/htp/archive/c/${pkgname}-${pkgver}.tar.xz" "htpdate.service")
-md5sums=('9d5ca69be06edf5d535b52b5f790da4e'
+# TODO: In the process of adding two patches from OpenWRT, but they are rejected.
+# See https://aur.archlinux.org/packages/htpdate/.
+source=("http://www.vervest.org/htp/archive/c/${pkgname}-${pkgver}.tar.xz"
+        "htpdate.service")
+md5sums=('cab01ddcb62bd84154670a37a7a0c31c'
          'ed9c9b1222e90e6ee0751f8f88772606')
+        # "100-adjtimex.patch"
+        # "101-daemon-run-in-foreground.patch")
+
 build() {
   cd ${pkgname}-${pkgver}
   make
 }
+
 package() {
   install -D -m 644 htpdate.service ${pkgdir}/usr/lib/systemd/system/htpdate.service
   cd ${pkgname}-${pkgver}
   install -D -m 755 htpdate ${pkgdir}/usr/bin/htpdate
   install -D -m 644 htpdate.8 ${pkgdir}/usr/share/man/man8/htpdate.8
 }
-
-- 
cgit v1.2.3-70-g09d2


From 566bb51a3635b6c58ca70a3653dcd88d45a58c86 Mon Sep 17 00:00:00 2001
From: Dominik Schrempf
Date: Mon, 20 Jan 2020 23:43:58 +0100
Subject: 1.2.2 update

---
 .SRCINFO | 6 +++---
 PKGBUILD | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO
index d4eaea8..ae187a6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,15 @@
 pkgbase = htpdate
 	pkgdesc = A client for time synchronisation
-	pkgver = 1.2.1
+	pkgver = 1.2.2
 	pkgrel = 1
 	url = http://www.vervest.org/htp/
 	arch = i686
 	arch = x86_64
 	license = GPL2
 	depends = glibc
-	source = http://www.vervest.org/htp/archive/c/htpdate-1.2.1.tar.xz
+	source = http://www.vervest.org/htp/archive/c/htpdate-1.2.2.tar.xz
 	source = htpdate.service
-	md5sums = cab01ddcb62bd84154670a37a7a0c31c
+	md5sums = aad8c33933648532ac8716c809b15be1
 	md5sums = ed9c9b1222e90e6ee0751f8f88772606
 
 pkgname = htpdate
diff --git a/PKGBUILD b/PKGBUILD
index 6839a56..f14282c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
 # Contributor: Jonathan Ryan <jryan at curious-computing dot com>
 # Contributor: Hussam Al-Tayeb <hussam at visp dot net dot lb>
 pkgname=htpdate
-pkgver=1.2.1
+pkgver=1.2.2
 pkgrel=1
 pkgdesc="A client for time synchronisation"
 arch=(i686 x86_64)
@@ -13,7 +13,7 @@ depends=('glibc')
 # See https://aur.archlinux.org/packages/htpdate/.
 source=("http://www.vervest.org/htp/archive/c/${pkgname}-${pkgver}.tar.xz"
         "htpdate.service")
-md5sums=('cab01ddcb62bd84154670a37a7a0c31c'
+md5sums=('aad8c33933648532ac8716c809b15be1'
          'ed9c9b1222e90e6ee0751f8f88772606')
         # "100-adjtimex.patch"
         # "101-daemon-run-in-foreground.patch")
-- 
cgit v1.2.3-70-g09d2


From 4dac7fef6478cd5f8f0446740297e9dd65933d47 Mon Sep 17 00:00:00 2001
From: Dominik Schrempf
Date: Thu, 23 Jan 2020 15:54:44 +0100
Subject: bugfix pid file

---
 .SRCINFO        | 4 ++--
 PKGBUILD        | 4 ++--
 htpdate.service | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO
index ae187a6..d0a3b4a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
 pkgbase = htpdate
 	pkgdesc = A client for time synchronisation
 	pkgver = 1.2.2
-	pkgrel = 1
+	pkgrel = 2
 	url = http://www.vervest.org/htp/
 	arch = i686
 	arch = x86_64
@@ -10,7 +10,7 @@ pkgbase = htpdate
 	source = http://www.vervest.org/htp/archive/c/htpdate-1.2.2.tar.xz
 	source = htpdate.service
 	md5sums = aad8c33933648532ac8716c809b15be1
-	md5sums = ed9c9b1222e90e6ee0751f8f88772606
+	md5sums = d00fce722a88150cffb1b322e6cc8869
 
 pkgname = htpdate
 
diff --git a/PKGBUILD b/PKGBUILD
index f14282c..1ec24cd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
 # Contributor: Hussam Al-Tayeb <hussam at visp dot net dot lb>
 pkgname=htpdate
 pkgver=1.2.2
-pkgrel=1
+pkgrel=2
 pkgdesc="A client for time synchronisation"
 arch=(i686 x86_64)
 url="http://www.vervest.org/htp/"
@@ -14,7 +14,7 @@ depends=('glibc')
 source=("http://www.vervest.org/htp/archive/c/${pkgname}-${pkgver}.tar.xz"
         "htpdate.service")
 md5sums=('aad8c33933648532ac8716c809b15be1'
-         'ed9c9b1222e90e6ee0751f8f88772606')
+         'd00fce722a88150cffb1b322e6cc8869')
         # "100-adjtimex.patch"
         # "101-daemon-run-in-foreground.patch")
 
diff --git a/htpdate.service b/htpdate.service
index 21946d2..509b072 100644
--- a/htpdate.service
+++ b/htpdate.service
@@ -3,8 +3,8 @@ Description=Htpdate daemon
 
 [Service]
 Type=forking
-PIDFile=/var/run/htpdate.pid
-ExecStart=/usr/bin/htpdate -D -a -s -i /var/run/htpdate.pid www.linux.org www.freebsd.org ntp.neu.edu.cn www.kernel.org
+PIDFile=/run/htpdate.pid
+ExecStart=/usr/bin/htpdate -D -a -s -i /run/htpdate.pid www.linux.org www.freebsd.org ntp.neu.edu.cn www.kernel.org
 
 [Install]
 WantedBy=multi-user.target
-- 
cgit v1.2.3-70-g09d2


From dd4b9c4a2b0e2e32ef6150c488f2ca8d14daf173 Mon Sep 17 00:00:00 2001
From: Dominik Schrempf
Date: Wed, 6 May 2020 13:18:14 +0200
Subject: patch pid file

---
 .SRCINFO          |  4 +++-
 100-pidfile.patch | 11 +++++++++++
 PKGBUILD          | 11 ++++++-----
 3 files changed, 20 insertions(+), 6 deletions(-)
 create mode 100644 100-pidfile.patch

diff --git a/.SRCINFO b/.SRCINFO
index d0a3b4a..443ff96 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
 pkgbase = htpdate
 	pkgdesc = A client for time synchronisation
 	pkgver = 1.2.2
-	pkgrel = 2
+	pkgrel = 3
 	url = http://www.vervest.org/htp/
 	arch = i686
 	arch = x86_64
@@ -9,8 +9,10 @@ pkgbase = htpdate
 	depends = glibc
 	source = http://www.vervest.org/htp/archive/c/htpdate-1.2.2.tar.xz
 	source = htpdate.service
+	source = 100-pidfile.patch
 	md5sums = aad8c33933648532ac8716c809b15be1
 	md5sums = d00fce722a88150cffb1b322e6cc8869
+	md5sums = f4612bb44274ed571117724a49abb3c1
 
 pkgname = htpdate
 
diff --git a/100-pidfile.patch b/100-pidfile.patch
new file mode 100644
index 0000000..a56aba4
--- /dev/null
+++ b/100-pidfile.patch
@@ -0,0 +1,11 @@
+--- htpdate.c	2019-07-12 19:10:17.000000000 +0200
++++ htpdate.c.patched	2020-05-06 13:15:51.419075086 +0200
+@@ -499,7 +499,7 @@
+ 			printlog( 1, "Error writing pid file" );
+ 			exit(1);
+ 		} else {
+-			fprintf( pid_file, "%u\n", (unsigned short)pid );
++			fprintf( pid_file, "%d\n", (signed int)pid );
+ 			fclose( pid_file );
+ 		}
+ 		printlog( 0, "htpdate version "VERSION" started" );
diff --git a/PKGBUILD b/PKGBUILD
index 1ec24cd..ee6d7b5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
 # Contributor: Hussam Al-Tayeb <hussam at visp dot net dot lb>
 pkgname=htpdate
 pkgver=1.2.2
-pkgrel=2
+pkgrel=3
 pkgdesc="A client for time synchronisation"
 arch=(i686 x86_64)
 url="http://www.vervest.org/htp/"
@@ -12,14 +12,15 @@ depends=('glibc')
 # TODO: In the process of adding two patches from OpenWRT, but they are rejected.
 # See https://aur.archlinux.org/packages/htpdate/.
 source=("http://www.vervest.org/htp/archive/c/${pkgname}-${pkgver}.tar.xz"
-        "htpdate.service")
+        "htpdate.service"
+        "100-pidfile.patch")
 md5sums=('aad8c33933648532ac8716c809b15be1'
-         'd00fce722a88150cffb1b322e6cc8869')
-        # "100-adjtimex.patch"
-        # "101-daemon-run-in-foreground.patch")
+         'd00fce722a88150cffb1b322e6cc8869'
+         'f4612bb44274ed571117724a49abb3c1')
 
 build() {
   cd ${pkgname}-${pkgver}
+  patch htpdate.c 100-pidfile.patch
   make
 }
 
-- 
cgit v1.2.3-70-g09d2


From dd2728c558612c70ef403df886a4440507057da1 Mon Sep 17 00:00:00 2001
From: Dominik Schrempf
Date: Wed, 6 May 2020 13:20:04 +0200
Subject: correct path for patch file

---
 PKGBUILD | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PKGBUILD b/PKGBUILD
index ee6d7b5..ad8a2bc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -20,7 +20,7 @@ md5sums=('aad8c33933648532ac8716c809b15be1'
 
 build() {
   cd ${pkgname}-${pkgver}
-  patch htpdate.c 100-pidfile.patch
+  patch htpdate.c ../100-pidfile.patch
   make
 }
 
-- 
cgit v1.2.3-70-g09d2


From 4f382359b7f186a64d591140cf019a002e3dd29b Mon Sep 17 00:00:00 2001
From: Yigit Sever
Date: Thu, 30 Sep 2021 15:02:40 +0300
Subject: Update to v1.2.6

- Set the upstream url to the new (maintained) fork
- Remove the pid patch as it's no longer needed
---
 .SRCINFO          | 15 ++++++---------
 100-pidfile.patch | 11 -----------
 PKGBUILD          | 30 +++++++++++++-----------------
 3 files changed, 19 insertions(+), 37 deletions(-)
 delete mode 100644 100-pidfile.patch

diff --git a/.SRCINFO b/.SRCINFO
index 443ff96..ff90fb3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,15 @@
 pkgbase = htpdate
 	pkgdesc = A client for time synchronisation
-	pkgver = 1.2.2
-	pkgrel = 3
-	url = http://www.vervest.org/htp/
+	pkgver = 1.2.6
+	pkgrel = 1
+	url = https://github.com/angeloc/htpdate
 	arch = i686
 	arch = x86_64
 	license = GPL2
 	depends = glibc
-	source = http://www.vervest.org/htp/archive/c/htpdate-1.2.2.tar.xz
+	source = htpdate-1.2.6.tar.gz::https://github.com/angeloc/htpdate/archive/v1.2.6.tar.gz
 	source = htpdate.service
-	source = 100-pidfile.patch
-	md5sums = aad8c33933648532ac8716c809b15be1
-	md5sums = d00fce722a88150cffb1b322e6cc8869
-	md5sums = f4612bb44274ed571117724a49abb3c1
+	sha256sums = d2cff522b8f53b00769dcca77d8025b19238ed35d702a4739dc05e387f718909
+	sha256sums = 2f12bdf0745fbf7c52f465e78b47635fbdc6fa372e63fb94a6063a5f67ff8c8b
 
 pkgname = htpdate
-
diff --git a/100-pidfile.patch b/100-pidfile.patch
deleted file mode 100644
index a56aba4..0000000
--- a/100-pidfile.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- htpdate.c	2019-07-12 19:10:17.000000000 +0200
-+++ htpdate.c.patched	2020-05-06 13:15:51.419075086 +0200
-@@ -499,7 +499,7 @@
- 			printlog( 1, "Error writing pid file" );
- 			exit(1);
- 		} else {
--			fprintf( pid_file, "%u\n", (unsigned short)pid );
-+			fprintf( pid_file, "%d\n", (signed int)pid );
- 			fclose( pid_file );
- 		}
- 		printlog( 0, "htpdate version "VERSION" started" );
diff --git a/PKGBUILD b/PKGBUILD
index ad8a2bc..9e2d275 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,32 +1,28 @@
-# Maintainer: Dominik Schrempf <dominik.schrempf at gmail dot com>
+# Maintainer: Yigit Sever <yigit at yigitsever dot com>
+# Contributor: Dominik Schrempf <dominik.schrempf at gmail dot com>
 # Contributor: Jonathan Ryan <jryan at curious-computing dot com>
 # Contributor: Hussam Al-Tayeb <hussam at visp dot net dot lb>
 pkgname=htpdate
-pkgver=1.2.2
-pkgrel=3
+pkgver=1.2.6
+pkgrel=1
 pkgdesc="A client for time synchronisation"
-arch=(i686 x86_64)
-url="http://www.vervest.org/htp/"
+arch=('i686' 'x86_64')
+url="https://github.com/angeloc/htpdate"
 license=(GPL2)
 depends=('glibc')
-# TODO: In the process of adding two patches from OpenWRT, but they are rejected.
-# See https://aur.archlinux.org/packages/htpdate/.
-source=("http://www.vervest.org/htp/archive/c/${pkgname}-${pkgver}.tar.xz"
-        "htpdate.service"
-        "100-pidfile.patch")
-md5sums=('aad8c33933648532ac8716c809b15be1'
-         'd00fce722a88150cffb1b322e6cc8869'
-         'f4612bb44274ed571117724a49abb3c1')
+source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz"
+    "htpdate.service")
+sha256sums=('d2cff522b8f53b00769dcca77d8025b19238ed35d702a4739dc05e387f718909'
+    '2f12bdf0745fbf7c52f465e78b47635fbdc6fa372e63fb94a6063a5f67ff8c8b')
 
 build() {
   cd ${pkgname}-${pkgver}
-  patch htpdate.c ../100-pidfile.patch
   make
 }
 
 package() {
-  install -D -m 644 htpdate.service ${pkgdir}/usr/lib/systemd/system/htpdate.service
+  install -D -m644 htpdate.service ${pkgdir}/usr/lib/systemd/system/htpdate.service
   cd ${pkgname}-${pkgver}
-  install -D -m 755 htpdate ${pkgdir}/usr/bin/htpdate
-  install -D -m 644 htpdate.8 ${pkgdir}/usr/share/man/man8/htpdate.8
+  install -D -m755 htpdate ${pkgdir}/usr/bin/htpdate
+  install -D -m644 htpdate.8 ${pkgdir}/usr/share/man/man8/htpdate.8
 }
-- 
cgit v1.2.3-70-g09d2


From 9f393301a8a1fcdc5928b46ed388d5bc603ef639 Mon Sep 17 00:00:00 2001
From: Yigit Sever
Date: Mon, 6 Jun 2022 17:24:57 +0300
Subject: Migrate to new fork, update to v1.3.4

---
 .SRCINFO   | 10 +++++-----
 .gitignore |  2 +-
 PKGBUILD   | 13 +++++++------
 3 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO
index ff90fb3..226c593 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,15 @@
 pkgbase = htpdate
-	pkgdesc = A client for time synchronisation
-	pkgver = 1.2.6
+	pkgdesc = HTTP Time protocol
+	pkgver = 1.3.4
 	pkgrel = 1
-	url = https://github.com/angeloc/htpdate
+	url = https://github.com/twekkel/htpdate
 	arch = i686
 	arch = x86_64
 	license = GPL2
 	depends = glibc
-	source = htpdate-1.2.6.tar.gz::https://github.com/angeloc/htpdate/archive/v1.2.6.tar.gz
+	source = htpdate-1.3.4.tar.gz::https://github.com/twekkel/htpdate/archive/v1.3.4.tar.gz
 	source = htpdate.service
-	sha256sums = d2cff522b8f53b00769dcca77d8025b19238ed35d702a4739dc05e387f718909
+	sha256sums = 744f9200cfd3b008a5516c5eb6da727af532255a329126a7b8f49a5623985642
 	sha256sums = 2f12bdf0745fbf7c52f465e78b47635fbdc6fa372e63fb94a6063a5f67ff8c8b
 
 pkgname = htpdate
diff --git a/.gitignore b/.gitignore
index a41cf30..aece887 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
 /update
-/htpdate-*.tar.xz
+/htpdate-*.tar.*
 /pkg/
 /src/
diff --git a/PKGBUILD b/PKGBUILD
index 9e2d275..038e881 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,18 +2,19 @@
 # Contributor: Dominik Schrempf <dominik.schrempf at gmail dot com>
 # Contributor: Jonathan Ryan <jryan at curious-computing dot com>
 # Contributor: Hussam Al-Tayeb <hussam at visp dot net dot lb>
+
 pkgname=htpdate
-pkgver=1.2.6
+pkgver=1.3.4
 pkgrel=1
-pkgdesc="A client for time synchronisation"
+pkgdesc="HTTP Time protocol"
 arch=('i686' 'x86_64')
-url="https://github.com/angeloc/htpdate"
+url="https://github.com/twekkel/htpdate"
 license=(GPL2)
 depends=('glibc')
 source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz"
-    "htpdate.service")
-sha256sums=('d2cff522b8f53b00769dcca77d8025b19238ed35d702a4739dc05e387f718909'
-    '2f12bdf0745fbf7c52f465e78b47635fbdc6fa372e63fb94a6063a5f67ff8c8b')
+  "htpdate.service")
+sha256sums=('744f9200cfd3b008a5516c5eb6da727af532255a329126a7b8f49a5623985642'
+  '2f12bdf0745fbf7c52f465e78b47635fbdc6fa372e63fb94a6063a5f67ff8c8b')
 
 build() {
   cd ${pkgname}-${pkgver}
-- 
cgit v1.2.3-70-g09d2


From 6de9e5c3c715f00dc2d6679cc77910bc2bdd479d Mon Sep 17 00:00:00 2001
From: Yigit Sever
Date: Sun, 24 Jul 2022 16:49:22 +0300
Subject: Update to v1.3.5

---
 .SRCINFO | 6 +++---
 PKGBUILD | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO
index 226c593..4e2d9bc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,15 @@
 pkgbase = htpdate
 	pkgdesc = HTTP Time protocol
-	pkgver = 1.3.4
+	pkgver = 1.3.5
 	pkgrel = 1
 	url = https://github.com/twekkel/htpdate
 	arch = i686
 	arch = x86_64
 	license = GPL2
 	depends = glibc
-	source = htpdate-1.3.4.tar.gz::https://github.com/twekkel/htpdate/archive/v1.3.4.tar.gz
+	source = htpdate-1.3.5.tar.gz::https://github.com/twekkel/htpdate/archive/v1.3.5.tar.gz
 	source = htpdate.service
-	sha256sums = 744f9200cfd3b008a5516c5eb6da727af532255a329126a7b8f49a5623985642
+	sha256sums = a8734d4f1d84d0608d045508608f2d29d8b968da269f83120aaac67709b1bd03
 	sha256sums = 2f12bdf0745fbf7c52f465e78b47635fbdc6fa372e63fb94a6063a5f67ff8c8b
 
 pkgname = htpdate
diff --git a/PKGBUILD b/PKGBUILD
index 038e881..c267cd1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
 # Contributor: Hussam Al-Tayeb <hussam at visp dot net dot lb>
 
 pkgname=htpdate
-pkgver=1.3.4
+pkgver=1.3.5
 pkgrel=1
 pkgdesc="HTTP Time protocol"
 arch=('i686' 'x86_64')
@@ -13,8 +13,8 @@ license=(GPL2)
 depends=('glibc')
 source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz"
   "htpdate.service")
-sha256sums=('744f9200cfd3b008a5516c5eb6da727af532255a329126a7b8f49a5623985642'
-  '2f12bdf0745fbf7c52f465e78b47635fbdc6fa372e63fb94a6063a5f67ff8c8b')
+sha256sums=('a8734d4f1d84d0608d045508608f2d29d8b968da269f83120aaac67709b1bd03'
+            '2f12bdf0745fbf7c52f465e78b47635fbdc6fa372e63fb94a6063a5f67ff8c8b')
 
 build() {
   cd ${pkgname}-${pkgver}
-- 
cgit v1.2.3-70-g09d2


From 173829b6660cc8956e522dcbf93e47ecc0c38dc6 Mon Sep 17 00:00:00 2001
From: Yigit Sever
Date: Thu, 11 Aug 2022 15:55:04 +0300
Subject: Update to v1.3.6

---
 .SRCINFO | 6 +++---
 PKGBUILD | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO
index 4e2d9bc..be3270b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,15 @@
 pkgbase = htpdate
 	pkgdesc = HTTP Time protocol
-	pkgver = 1.3.5
+	pkgver = 1.3.6
 	pkgrel = 1
 	url = https://github.com/twekkel/htpdate
 	arch = i686
 	arch = x86_64
 	license = GPL2
 	depends = glibc
-	source = htpdate-1.3.5.tar.gz::https://github.com/twekkel/htpdate/archive/v1.3.5.tar.gz
+	source = htpdate-1.3.6.tar.gz::https://github.com/twekkel/htpdate/archive/v1.3.6.tar.gz
 	source = htpdate.service
-	sha256sums = a8734d4f1d84d0608d045508608f2d29d8b968da269f83120aaac67709b1bd03
+	sha256sums = 3cdc558ec8e53ef374a42490b2f28c0b23981fa8754a6d7182044707828ad1e9
 	sha256sums = 2f12bdf0745fbf7c52f465e78b47635fbdc6fa372e63fb94a6063a5f67ff8c8b
 
 pkgname = htpdate
diff --git a/PKGBUILD b/PKGBUILD
index c267cd1..bc2db96 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
 # Contributor: Hussam Al-Tayeb <hussam at visp dot net dot lb>
 
 pkgname=htpdate
-pkgver=1.3.5
+pkgver=1.3.6
 pkgrel=1
 pkgdesc="HTTP Time protocol"
 arch=('i686' 'x86_64')
@@ -13,7 +13,7 @@ license=(GPL2)
 depends=('glibc')
 source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz"
   "htpdate.service")
-sha256sums=('a8734d4f1d84d0608d045508608f2d29d8b968da269f83120aaac67709b1bd03'
+sha256sums=('3cdc558ec8e53ef374a42490b2f28c0b23981fa8754a6d7182044707828ad1e9'
             '2f12bdf0745fbf7c52f465e78b47635fbdc6fa372e63fb94a6063a5f67ff8c8b')
 
 build() {
-- 
cgit v1.2.3-70-g09d2