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.

107 lines
4.2 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=('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. )
  39. sha512sums=('SKIP'
  40. 'b6bb4f39eb435ce6c3314ea4a31430a1f8b70898d17d1fe07fa487bec0e79c022b004d3c11366f0f994546f454e5418caf5b3d7e6e1a205598d2bc8140417f7a'
  41. 'c58d48de67cd1ce0df7ea60def26db38b9d7409b64d097639a4cde3f4774a4bcc1159f993f37c5c61781cab1e2d1b8a35005030b28b0c9f0f6e0f81053586dfa'
  42. 'ceeedb647c08dad750e4fdfd397ff45e418f522e046fb7a5a358e9195fd9f0ce2f6135373ac39e2add9995fdaf2bd1a9d4ca58d0e9d4d800636ec0d38d2e451e'
  43. 'b061d557c3687aad61772ecdd459cdfe1941566488c868196b6c322b363d5f7046311de8c38bd8607a87cf6bf113d9e5c74434c32181daa1184866deee1701a3'
  44. '6e672b4142a6e0ccae7b97572101fc960d0c368de6bcb01539f9ed2369d5dece169b38b770f91e8f31aa35b5ddc662a037011cf97b5c396fead4032543da75ad'
  45. '68ad6657505dea416db04a9e336e5f04e669da6fd652ada2a3722d4f238f322d5aae00e70128d6fccba4ee1c9737a065f7999c11d60ad508008e13f9e322b00a'
  46. '836e60283480f7534699e72dec14b4dd2f52386a5a35f5e3fd64be730785f93b3b52aea478f3739e801d9f00229fd086409da7864cba9efc8c7a0348883ba2a3'
  47. '1b6d2c8c0652ac7b6cd2ede79c699eeeb5422a657d5d62bf83507e0d488bbfed836715325c8ddc588529c05810916d83f2cf12b774cdb6abf960d0317e5198fc'
  48. '23143e9640b9b9211c060c4fb8dec28e8fe97683420acdc2647b6de3b85b4bbd4aebab75d33c83226c10aa3c1813aba232968483626f32bcd81c56b5283c4dda'
  49. '43b64f197f32b0e3655aad7935d297593c7c570db0853820799a517f38554d2474f9ffc08ea018f9b3e9a644038925a79cac6e6d91e0d84bcd81600a098c71e3')
  50. validpgpkeys=('A1EB079B8D3EB92B4EBD3139663AF51BD5E4D8D5') # Brent Cook <bcook@openbsd.org>
  51. pkgver() {
  52. cd ${_pkgname}
  53. if [[ $(git describe) ]]; then
  54. git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
  55. else
  56. echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
  57. fi
  58. }
  59. prepare() {
  60. cd ${_pkgname}
  61. # For patch compatibility reasons. Feature freeze alike.
  62. sed -r -i 's/openntpd-portable(\/openntpd-openbsd.git)/Fincer\1/' ./update.sh
  63. ./update.sh
  64. for p in ../*.patch; do
  65. patch -Np1 -i ${p}
  66. done
  67. autoreconf -fiv
  68. }
  69. build() {
  70. cd ${_pkgname}
  71. CFLAGS+=' -fcommon -L/usr/lib/libressl/ -Wl,-rpath,/usr/lib/libressl/' ./configure \
  72. --prefix=/usr \
  73. --sysconfdir=/etc \
  74. --sbindir=/usr/bin \
  75. --with-privsep-user=ntp \
  76. --localstatedir=/var \
  77. --with-openssl=yes \
  78. --with-libressl=no
  79. make
  80. }
  81. package() {
  82. cd ${_pkgname}
  83. make DESTDIR="${pkgdir}" install
  84. rmdir "${pkgdir}/var/run"
  85. install -d "${pkgdir}/var/lib/ntp"
  86. install -Dm 644 COPYING -t "${pkgdir}/usr/share/licenses/${_pkgname}"
  87. install -Dm 644 "${srcdir}/openntpd.service" -t "${pkgdir}/usr/lib/systemd/system"
  88. install -Dm 644 "${srcdir}/openntpd.sysusers" "${pkgdir}/usr/lib/sysusers.d/openntpd.conf"
  89. install -Dm 644 "ntpd.conf" "${pkgdir}/etc/examples/ntpd.conf"
  90. install -d "${pkgdir}/usr/lib/systemd/ntp-units.d"
  91. echo ${_pkgname}.service > "${pkgdir}/usr/lib/systemd/ntp-units.d/${_pkgname}.list"
  92. }