summaryrefslogtreecommitdiff
path: root/ntp/Pkgfile
blob: 59c02259e33437fee7c96b317eff946cbd2f7951 (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.4p7
    9 release=2
   10 source=(http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/$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       --with-sntp \
   30       --with-crypto \
   31       --enable-debugging=no \
   32       --enable-ntpdate-step \
   33       --enable-parse-clocks \
   34       --enable-all-clocks \
   35       CFLAGS="$CFLAGS" \
   36       LDFLAGS="$LDFLAGS" 
   37 
   38    # substitute the default configuration path
   39    sed -i -e 's;\(CONFIG_FILE[^"]*"\)/etc/ntp.conf;\1/etc/ntp/ntp.conf;' \
   40         include/ntp_config.h ntpdate/ntptime_config.c
   41 
   42    make
   43    make DESTDIR=$PKG install
   44    touch $PKG/var/log/ntp.log
   45 
   46    install -m 644 $SRC/ntp.conf $PKG/etc/ntp
   47    install -m 755 $SRC/ntpd $PKG/etc/rc.d
   48    install -m 755 $SRC/ntpdate $PKG/etc/rc.d
   49 
   50    # initialize ntp.drift file
   51    echo "0.0" > $PKG/var/lib/ntp/ntp.drift
   52 }

Generated by cgit