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