# Description: Network Time Protocol software # URL: http://www.ntp.org # Packager: James Mills, prologic at shortcircuit dot net dot au # Maintainer: Thomas Penteker, tek at serverop dot de # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu # Depends on: openssl name=ntp version=4.2.6p1 release=1 source=(http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/$name-${version%.*}/$name-$version.tar.gz \ ntpd ntpdate ntp.conf ntp-64bit.diff) build () { mkdir -p $PKG/etc/{rc.d,ntp} \ $PKG/var/log \ $PKG/var/run/ntp \ $PKG/var/lib/ntp/stats \ $PKG/usr/man/{man8,man5} cd $name-$version patch -p1 < $SRC/ntp-64bit.diff ./configure --build=$CHOST \ --host=$CTARGET \ --prefix=/usr \ --mandir=/usr/man \ --with-sntp \ --with-crypto \ --enable-debugging=no \ --enable-ntpdate-step \ --enable-parse-clocks \ --enable-all-clocks \ CFLAGS="$CFLAGS" \ LDFLAGS="$LDFLAGS" # substitute the default configuration path sed -i -e 's;\(CONFIG_FILE[^"]*"\)/etc/ntp.conf;\1/etc/ntp/ntp.conf;' \ include/ntp_config.h ntpdate/ntptime_config.c make make DESTDIR=$PKG install rm -r $PKG/usr/sbin touch $PKG/var/log/ntp.log install -m 644 $SRC/ntp.conf $PKG/etc/ntp install -m 755 $SRC/ntpd $PKG/etc/rc.d install -m 755 $SRC/ntpdate $PKG/etc/rc.d # initialize ntp.drift file echo "0.0" > $PKG/var/lib/ntp/ntp.drift }