|
|
- # Maintainer: Pekka Helenius <fincer89[at]hotmail[dot]com>
- # Contributor: Levente Polyak <anthraxx[at]archlinux[dot]org>
- # Contributor: Vesa Kaihlavirta <vegai@iki.fi>
- # Contributor: Mark Rosenstand <mark@borkware.net>
- # Contributor: Giorgio Lando <patroclo7@gmail.com> (adjtimex patch)
- # Contributor: Alexander Rødseth <rodseth@gmail.com>
-
- pkgname=openntpd-git
- _pkgname=openntpd
- pkgver=223.cc32929
- pkgrel=1
- pkgdesc='Free, easy to use implementation of the Network Time Protocol (Git version)'
- url='http://www.openntpd.org/'
- arch=('any')
- license=('BSD')
- provides=('openntpd')
- conflicts=('openntpd')
- replaces=('openntpd')
- makedepends=('bison' 'make' 'autoconf' 'openssl') # 'libressl'
- optdepends=(
- 'openssl: HTTPS constraint support'
- # 'libressl: HTTPS constraint support'
- )
- conflicts=('ntp')
- backup=('etc/ntpd.conf')
-
- source=(
- # For patch compatibility reasons. Feature freeze alike.
- ${_pkgname}::git+https://github.com/openntpd-portable/openntpd-portable.git#commit=cc3292981b83f7d691e96dc5e5a5d30af6f98454
-
- openntpd.sysusers
- openntpd.service
- )
-
- patches=(
- 1-patch_better-logs.patch
- 2-patch_ntpctl-sensors-tolowercase.patch
- 3-patch_unhardcode-ports.patch
- 4-patch_peercount-init.patch
- 5-patch_debugmode-fix.patch
- 6-patch_unhardcode-conf.patch
- 7-patch_implement-openssl.patch
- 8-patch_update-conf.patch
- 9-patch_add-constraint-useragent.patch
- 10-patch_peer-constraint-logs.patch
- 11-patch_fix-constraint-time-overflow-32bit.patch
- 12-patch_fix-adjtime.patch
- 13-patch_re-enable-inittime.patch
- )
-
- source=(${source[@]} ${patches[@]})
-
- sha512sums=('SKIP'
- 'b6bb4f39eb435ce6c3314ea4a31430a1f8b70898d17d1fe07fa487bec0e79c022b004d3c11366f0f994546f454e5418caf5b3d7e6e1a205598d2bc8140417f7a'
- '15c1a510fa8f43217b6a3fc3ba287176d04fbe0c4bbea616ab08d1c679ed9da6734233b70b4858093992a3fbf4346642353eb2626fd8e5668cda3712d5ea43b7'
- '51a4f3d4ea39019f3b64aa187060c5d19e838245f5880d27cadf98794198e45222b1aaa51d54de959fa264a25c5a1129c366837ead4c1de884d5a85308a96e8e'
- 'fdbdaf6becdc592fcb086dfa2b8d79b05c05d5791893808c31751053f12da16df0336cd3d30829dfc91c81f9c1d89416115865a0298f4b002a0b2ae1f11f2e0d'
- '82724d80c1f110eea2dc807dc5af7b2329cfc5a4656d2cc8752979ee23d70677fe3c039cb7bc327a43a4a6cd8d4c55ac47ba38c38e8090b71c2e6348403d736b'
- '88583f50bca84b5b35aae4055e1cf77b3dc022693f96bdb12aab8edd4066615e14fcfb2f1e861d46b63d26a3e4440459807a8f4ff8eadc1c151362b29373bd43'
- '410f70d31b30bb9b8bef4de928bcf26d45408bfd6f5a8c1634c8d1c6b742bf2e0be1df50ee7abcc6f1167a5c6ad4df560509258ced0b7b89806fc64e0517da92'
- '9e28d7c7ac9fbd6bf1e563751155eb0b66594d26cf432d6800958b3d624e8814d41285b3f882aa208850f166b467e1c6b3eb36dfa60b12c2a4ff74d850fab159'
- '6ff5ad0cb34cd70dd866bfb9ef63e5b4ef6d2ac45b073fc5dbc29bb03be5f0d7ebf76e9603f1d5825fd0b53ce6e7f83963dbf5afcea337e0074abcae83784ffb'
- 'e162c1bd321d68a3a42fca82d2b0ad0c6031293d4d47d4bc69bbaa9825774c4a02b6f7c0ecc3688f8029b93df08af24c34128cc4bc15eccd6ddd344a94877056'
- '26a2aadc40472d854b8ad1c454c5689c0703ace7836498dbf3f52664610820e2747e22307929446354a973b79dea236c73196ab30deeaa8ffdfde4286e10d3c9'
- '3ae3501a41ee50519b19074bf9e532718e365e6b45a9af4a9fba81d4276df98244cd5aac7acc9f6cd7d7a2bf460b4714e79e2676f826859fe4ad43b67046c709'
- '62f99efe913598fad09e6d9ca418813beeff01c4cd22861296f998b3ef87bf0b2b5c7fd018976929b4a0d8f485b2afa4a0c62c00aeb2b738d08a944ef8fa0d19'
- '08c6ee834d98d9897eb00023364f285fc0515b33a04c1593595a9d3a96a894f2be08a5665ac72fee65e1dab66e4c4b43f7414abd1ef97f483e7e2dcba948c49a'
- '18afd61a67b071a7824b6f58e5be4e05cad01283a42dc20ff34b93164eb3c7132086b6a56ca61012218eab6dd485412d402fd529832141e58450466d7b9e1d25')
- validpgpkeys=('A1EB079B8D3EB92B4EBD3139663AF51BD5E4D8D5') # Brent Cook <bcook@openbsd.org>
-
- pkgver() {
- cd ${_pkgname}
-
- if [[ $(git describe) ]]; then
- git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
- else
- echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
- fi
- }
-
-
- prepare() {
- cd ${_pkgname}
-
- # For patch compatibility reasons. Feature freeze alike.
- sed -r -i 's/openntpd-portable(\/openntpd-openbsd.git)/Fincer\1/' ./update.sh
- ./update.sh
-
- # Keep patch order!
- for p in ${patches[@]}; do
- patch -Np1 -i ../${p}
- done
-
- autoreconf -fiv
- }
-
- build() {
- cd ${_pkgname}
- CFLAGS+=' -fcommon -L/usr/lib/libressl/ -Wl,-rpath,/usr/lib/libressl/' ./configure \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/usr/bin \
- --with-privsep-user=ntp \
- --localstatedir=/var \
- --with-openssl=yes \
- --with-libressl=no
- make
- }
-
- package() {
- cd ${_pkgname}
- make DESTDIR="${pkgdir}" install
-
- rmdir "${pkgdir}/var/run"
- install -d "${pkgdir}/var/lib/ntp"
- install -Dm 644 COPYING -t "${pkgdir}/usr/share/licenses/${_pkgname}"
- install -Dm 644 "${srcdir}/openntpd.service" -t "${pkgdir}/usr/lib/systemd/system"
- install -Dm 644 "${srcdir}/openntpd.sysusers" "${pkgdir}/usr/lib/sysusers.d/openntpd.conf"
- install -Dm 644 "ntpd.conf" "${pkgdir}/etc/examples/ntpd.conf"
-
- install -d "${pkgdir}/usr/lib/systemd/ntp-units.d"
- echo ${_pkgname}.service > "${pkgdir}/usr/lib/systemd/ntp-units.d/${_pkgname}.list"
- }
|