blob: 088b3fe3946bf13ae31f24e14940a78efa71cb09 (
plain)
1 # Description: Network Time Protocol software
2 # URL: http://www.ntp.org
3 # Maintainer: Thomas Penteker, tek at serverop dot de
4 # Packager: James Mills, prologic at shortcircuit dot net dot au
5 # Depends on: openssl
6
7 name=ntp
8 version=4.2.6p5
9 release=1
10 source=(http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/$name-$version.tar.gz
11 ntpd
12 ntpdate
13 ntp.conf
14 ntp-64bit.diff)
15
16 build () {
17 mkdir -p $PKG/etc/{rc.d,ntp} \
18 $PKG/var/log \
19 $PKG/var/run/ntp \
20 $PKG/var/lib/ntp/stats \
21 $PKG/usr/man/{man8,man5}
22
23 cd $name-$version
24 patch -p1 -i ../ntp-64bit.diff
25
26 ./configure \
27 --prefix=/usr \
28 --mandir=/usr/man \
29 --with-sntp \
30 --with-crypto \
31 --without-ntpsnmpd \
32 --enable-debugging=no \
33 --enable-ntpdate-step \
34 --enable-parse-clocks \
35 --enable-all-clocks \
36 CFLAGS="$CFLAGS" \
37 LDFLAGS="$LDFLAGS"
38
39 # substitute the default configuration path
40 sed -i -e 's;\(CONFIG_FILE[^"]*"\)/etc/ntp.conf;\1/etc/ntp/ntp.conf;' \
41 include/ntp_config.h ntpdate/ntptime_config.c
42
43 make
44 make DESTDIR=$PKG install
45 touch $PKG/var/log/ntp.log
46
47 install -m 644 $SRC/ntp.conf $PKG/etc/ntp
48 install -m 755 $SRC/ntpd $PKG/etc/rc.d
49 install -m 755 $SRC/ntpdate $PKG/etc/rc.d
50
51 # fix remove unnecessary directory
52 rm -r $PKG/usr/sbin
53
54 # initialize ntp.drift file
55 echo "0.0" > $PKG/var/lib/ntp/ntp.drift
56 }
|