summaryrefslogtreecommitdiff
path: root/community/openntpd/PKGBUILD
blob: 103c77db024995c831d178a7713ccc1b3f5de4f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# $Id: PKGBUILD 31923 2010-11-07 21:40:10Z lcarlier $
# Maintainer: Vesa Kaihlavirta <vegai@iki.fi>
# Contributor: Mark Rosenstand <mark@borkware.net>
# Contributor: Giorgio Lando <patroclo7@gmail.com> (adjtimex patch)

pkgname=openntpd
pkgver=3.9p1
pkgrel=13
pkgdesc="Free, easy to use implementation of the Network Time Protocol."
url="http://www.openntpd.org/"
arch=('i686' 'x86_64' 'mips64el')
license=('BSD')
depends=('openssl')
backup=('etc/ntpd.conf' 'etc/conf.d/openntpd')
install=openntpd.install
source=(ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/$pkgname-$pkgver.tar.gz
	'openntpd' 'openntpd.conf' 'linux-adjtimex.patch')
md5sums=('afc34175f38d08867c1403d9008600b3'
         '2422b40f16acf8c92e9051e3e07fc96a'
         'ab38a035cbebe7a52888db6c573944a5'
         '6e04eecf89ee794d6f1ae79f03742cf9')

build() {
  cd $srcdir/$pkgname-$pkgver

  patch -Np1 -i ../linux-adjtimex.patch
  
  # fixes FS#19509 - [openntpd] builds without linux-adjtimex.patch
  autoreconf -fi
  #autoconf

  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --with-privsep-user=ntp \
    --with-privsep-path=/var/run/openntpd/ \
    --with-adjtimex

  make
}

package() {
  cd $srcdir/$pkgname-$pkgver

  make DESTDIR=$pkgdir install

  install -D -m755 $srcdir/openntpd $pkgdir/etc/rc.d/openntpd
  install -D -m644 $srcdir/openntpd.conf $pkgdir/etc/conf.d/openntpd
  install -D -m644 $srcdir/$pkgname-$pkgver/LICENCE  $pkgdir/usr/share/licenses/$pkgname/LICENCE

  # FS#16893  
  sed -i 's/\*/0.0.0.0/' $pkgdir/etc/ntpd.conf
}