OpenNTPD daemon with OpenSSL implementation & flexible configurability
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
4.4 KiB

  1. # Maintainer: Pekka Helenius <fincer89[at]hotmail[dot]com>
  2. # Contributor: Levente Polyak <anthraxx[at]archlinux[dot]org>
  3. # Contributor: Vesa Kaihlavirta <vegai@iki.fi>
  4. # Contributor: Mark Rosenstand <mark@borkware.net>
  5. # Contributor: Giorgio Lando <patroclo7@gmail.com> (adjtimex patch)
  6. # Contributor: Alexander Rødseth <rodseth@gmail.com>
  7. pkgname=openntpd-git
  8. _pkgname=openntpd
  9. pkgver=223.cc32929
  10. pkgrel=1
  11. pkgdesc='Free, easy to use implementation of the Network Time Protocol (Git version)'
  12. url='http://www.openntpd.org/'
  13. arch=('any')
  14. license=('BSD')
  15. provides=('openntpd')
  16. conflicts=('openntpd')
  17. replaces=('openntpd')
  18. makedepends=('bison' 'make' 'autoconf' 'openssl') # 'libressl'
  19. optdepends=(
  20. 'openssl: HTTPS constraint support'
  21. # 'libressl: HTTPS constraint support'
  22. )
  23. conflicts=('ntp')
  24. backup=('etc/ntpd.conf')
  25. source=(
  26. # For patch compatibility reasons. Feature freeze alike.
  27. ${_pkgname}::git+https://github.com/openntpd-portable/openntpd-portable.git#commit=cc3292981b83f7d691e96dc5e5a5d30af6f98454
  28. openntpd.sysusers
  29. openntpd.service
  30. 1-patch_better-logs.patch
  31. 2-patch_ntpctl-sensors-tolowercase.patch
  32. 3-patch_unhardcode-ports.patch
  33. 4-patch_peercount-init.patch
  34. 5-patch_debugmode-fix.patch
  35. 6-patch_unhardcode-conf.patch
  36. 7-patch_implement-openssl.patch
  37. 8-patch_update-conf.patch
  38. 9-patch_add-constraint-useragent.patch
  39. )
  40. sha512sums=('SKIP'
  41. 'b6bb4f39eb435ce6c3314ea4a31430a1f8b70898d17d1fe07fa487bec0e79c022b004d3c11366f0f994546f454e5418caf5b3d7e6e1a205598d2bc8140417f7a'
  42. 'c58d48de67cd1ce0df7ea60def26db38b9d7409b64d097639a4cde3f4774a4bcc1159f993f37c5c61781cab1e2d1b8a35005030b28b0c9f0f6e0f81053586dfa'
  43. '51a4f3d4ea39019f3b64aa187060c5d19e838245f5880d27cadf98794198e45222b1aaa51d54de959fa264a25c5a1129c366837ead4c1de884d5a85308a96e8e'
  44. 'fdbdaf6becdc592fcb086dfa2b8d79b05c05d5791893808c31751053f12da16df0336cd3d30829dfc91c81f9c1d89416115865a0298f4b002a0b2ae1f11f2e0d'
  45. '82724d80c1f110eea2dc807dc5af7b2329cfc5a4656d2cc8752979ee23d70677fe3c039cb7bc327a43a4a6cd8d4c55ac47ba38c38e8090b71c2e6348403d736b'
  46. '88583f50bca84b5b35aae4055e1cf77b3dc022693f96bdb12aab8edd4066615e14fcfb2f1e861d46b63d26a3e4440459807a8f4ff8eadc1c151362b29373bd43'
  47. '410f70d31b30bb9b8bef4de928bcf26d45408bfd6f5a8c1634c8d1c6b742bf2e0be1df50ee7abcc6f1167a5c6ad4df560509258ced0b7b89806fc64e0517da92'
  48. '9e28d7c7ac9fbd6bf1e563751155eb0b66594d26cf432d6800958b3d624e8814d41285b3f882aa208850f166b467e1c6b3eb36dfa60b12c2a4ff74d850fab159'
  49. '6ff5ad0cb34cd70dd866bfb9ef63e5b4ef6d2ac45b073fc5dbc29bb03be5f0d7ebf76e9603f1d5825fd0b53ce6e7f83963dbf5afcea337e0074abcae83784ffb'
  50. 'e162c1bd321d68a3a42fca82d2b0ad0c6031293d4d47d4bc69bbaa9825774c4a02b6f7c0ecc3688f8029b93df08af24c34128cc4bc15eccd6ddd344a94877056'
  51. '26a2aadc40472d854b8ad1c454c5689c0703ace7836498dbf3f52664610820e2747e22307929446354a973b79dea236c73196ab30deeaa8ffdfde4286e10d3c9')
  52. validpgpkeys=('A1EB079B8D3EB92B4EBD3139663AF51BD5E4D8D5') # Brent Cook <bcook@openbsd.org>
  53. pkgver() {
  54. cd ${_pkgname}
  55. if [[ $(git describe) ]]; then
  56. git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
  57. else
  58. echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
  59. fi
  60. }
  61. prepare() {
  62. cd ${_pkgname}
  63. # For patch compatibility reasons. Feature freeze alike.
  64. sed -r -i 's/openntpd-portable(\/openntpd-openbsd.git)/Fincer\1/' ./update.sh
  65. ./update.sh
  66. for p in ../*.patch; do
  67. patch -Np1 -i ${p}
  68. done
  69. autoreconf -fiv
  70. }
  71. build() {
  72. cd ${_pkgname}
  73. CFLAGS+=' -fcommon -L/usr/lib/libressl/ -Wl,-rpath,/usr/lib/libressl/' ./configure \
  74. --prefix=/usr \
  75. --sysconfdir=/etc \
  76. --sbindir=/usr/bin \
  77. --with-privsep-user=ntp \
  78. --localstatedir=/var \
  79. --with-openssl=yes \
  80. --with-libressl=no
  81. make
  82. }
  83. package() {
  84. cd ${_pkgname}
  85. make DESTDIR="${pkgdir}" install
  86. rmdir "${pkgdir}/var/run"
  87. install -d "${pkgdir}/var/lib/ntp"
  88. install -Dm 644 COPYING -t "${pkgdir}/usr/share/licenses/${_pkgname}"
  89. install -Dm 644 "${srcdir}/openntpd.service" -t "${pkgdir}/usr/lib/systemd/system"
  90. install -Dm 644 "${srcdir}/openntpd.sysusers" "${pkgdir}/usr/lib/sysusers.d/openntpd.conf"
  91. install -Dm 644 "ntpd.conf" "${pkgdir}/etc/examples/ntpd.conf"
  92. install -d "${pkgdir}/usr/lib/systemd/ntp-units.d"
  93. echo ${_pkgname}.service > "${pkgdir}/usr/lib/systemd/ntp-units.d/${_pkgname}.list"
  94. }