blob: 9425f75c8e5959a8945e414736e87a6ec6404cba (
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.6p1
9 release=2
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
25 patch -p1 -i ../ntp-64bit.diff
26
27 ./configure \
28 --prefix=/usr \
29 --mandir=/usr/man \
30 --with-sntp \
31 --with-crypto \
32 --without-ntpsnmpd \
33 --enable-debugging=no \
34 --enable-ntpdate-step \
35 --enable-parse-clocks \
36 --enable-all-clocks \
37 CFLAGS="$CFLAGS" \
38 LDFLAGS="$LDFLAGS"
39
40 # substitute the default configuration path
41 sed -i -e 's;\(CONFIG_FILE[^"]*"\)/etc/ntp.conf;\1/etc/ntp/ntp.conf;' \
42 include/ntp_config.h ntpdate/ntptime_config.c
43
44 make
45 make DESTDIR=$PKG install
46 touch $PKG/var/log/ntp.log
47
48 install -m 644 $SRC/ntp.conf $PKG/etc/ntp
49 install -m 755 $SRC/ntpd $PKG/etc/rc.d
50 install -m 755 $SRC/ntpdate $PKG/etc/rc.d
51
52 # fix remove unnecessary directory
53 rm -r $PKG/usr/sbin
54
55 # initialize ntp.drift file
56 echo "0.0" > $PKG/var/lib/ntp/ntp.drift
57 }
|