58 lines
1.4 KiB
Plaintext
58 lines
1.4 KiB
Plaintext
# Description: Network Time Protocol software
|
|
# URL: http://ntp.isc.org/bin/view/Main/DocumentationIndex
|
|
# Maintainer: sten, nick dot steeves at shaw dot ca
|
|
# Packager: Daniel Mueller, daniel at danm dot de
|
|
# Depends on: openssl
|
|
|
|
name=ntp
|
|
version=4.2.0
|
|
release=4
|
|
source=(http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/$name-$version.tar.gz \
|
|
http://www.danm.de/files/src/ntp/doc/ntp-doc.tar.gz \
|
|
ntpd \
|
|
ntp.conf)
|
|
|
|
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
|
|
|
|
AUTOCONF=true \
|
|
AUTOMAKE=true \
|
|
ACLOCAL=true \
|
|
AUTOHEADER=true \
|
|
LIBS=-lncurses \
|
|
./configure \
|
|
--prefix=/usr \
|
|
--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
|
|
touch $PKG/var/log/ntp.log
|
|
|
|
# manpages copied from http://www.openpkg.org
|
|
sed -i -e 's;/etc/ntp;/etc/ntp/ntp;g' $SRC/ntp-doc/*
|
|
install -m 644 $SRC/ntp-doc/*.8 $PKG/usr/man/man8
|
|
install -m 644 $SRC/ntp-doc/*.5 $PKG/usr/man/man5
|
|
install -m 644 $SRC/ntp.conf $PKG/etc/ntp
|
|
install -m 755 $SRC/ntpd $PKG/etc/rc.d
|
|
|
|
# initialize ntp.drift file
|
|
echo "0.0" > $PKG/var/lib/ntp/ntp.drift
|
|
}
|