summaryrefslogtreecommitdiff
path: root/ntp/Pkgfile
blob: f6d3244f80c3c4bf7e241cddf376fb02584e7282 (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.8p2
    9 release=1
   10 source=(http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/$name-$version.tar.gz
   11         ntpd ntpdate ntp.conf ntp-64bit.diff)
   12 
   13 build () {
   14    mkdir -p $PKG/etc/{rc.d,ntp} \
   15       $PKG/var/log \
   16       $PKG/var/run/ntp \
   17       $PKG/var/lib/ntp/stats \
   18       $PKG/usr/man/{man8,man5}
   19 
   20    cd $name-$version
   21    patch -p1 -i ../ntp-64bit.diff
   22 
   23    ./configure \
   24       --prefix=/usr \
   25       --mandir=/usr/man \
   26       --with-sntp \
   27       --with-crypto \
   28       --without-ntpsnmpd \
   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
   39 
   40    make
   41    make DESTDIR=$PKG install
   42    touch $PKG/var/log/ntp.log
   43 
   44    install -m 644 $SRC/ntp.conf $PKG/etc/ntp
   45    install -m 755 $SRC/ntpd $PKG/etc/rc.d
   46    install -m 755 $SRC/ntpdate $PKG/etc/rc.d
   47 
   48    # fix remove unnecessary directory
   49    rm -r $PKG/usr/sbin
   50 
   51    # initialize ntp.drift file
   52    echo "0.0" > $PKG/var/lib/ntp/ntp.drift
   53 
   54    # assign ownership to ntp:ntp
   55    chown -R ntp:ntp $PKG/var/lib/ntp $PKG/var/run/ntp $PKG/var/log/ntp.log
   56 
   57    # clean up the mess..
   58    rm -rf $PKG/usr/share
   59 }

Generated by cgit