CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
ntp: Initial import (verified compilation)
[attic/ports/opt-cross.git] / ntp / Pkgfile
CommitLineData
a9bbe5f2
VM
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, crux-arm at mikeux dot dyndns dot org
6# Depends on: openssl
7
8name=ntp
9version=4.2.6
10release=1
11source=(http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/$name-$version.tar.gz
12 ntpd
13 ntpdate
14 ntp.conf
15 ntp-64bit.diff)
16
17build () {
18 mkdir -p $PKG/etc/{rc.d,ntp} \
19 $PKG/var/log \
20 $PKG/var/run/ntp \
21 $PKG/var/lib/ntp/stats \
22 $PKG/usr/man/{man8,man5}
23
24 cd $name-$version
25 patch -p1 < $SRC/ntp-64bit.diff
26 ./configure --build=$CHOST \
27 --host=$CTARGET \
28 --prefix=/usr \
29 --mandir=/usr/man \
30 --with-sntp \
31 --with-crypto \
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 rm -r $PKG/usr/sbin
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 # initialize ntp.drift file
53 echo "0.0" > $PKG/var/lib/ntp/ntp.drift
54}