#!/bin/sh CWD=`pwd` TMP=/tmp PKG=$TMP/package-ntp VERSION=4.2.4p5 ARCH=alpha BUILD=1 TARGET=$ARCH-alphaslack-linux rm -rf $PKG mkdir -p $PKG ( cd $TMP rm -rf ntp-$VERSION tar xzf $CWD/ntp-$VERSION.tar.gz || exit 1 cd ntp-$VERSION chown -R root.root . find . -perm 664 -exec chmod 644 {} \; find . -perm 777 -exec chmod 755 {} \; find . -perm 2777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 2755 -exec chmod 755 {} \; find . -perm 774 -exec chmod 644 {} \; ./configure \ --prefix=/usr \ --localstatedir=/var \ --sysconfdir=/etc \ --bindir=/usr/sbin \ --program-prefix="" \ --program-suffix="" \ --build=$TARGET || exit 1 make -j2 || exit 1 make install DESTDIR=$PKG || exit 1 mkdir -p $PKG/etc/ntp cat $CWD/ntp.conf > $PKG/etc/ntp.conf.new cat $CWD/ntp.keys > $PKG/etc/ntp/ntp.keys.new chmod 600 $PKG/etc/ntp/ntp.keys.new touch $PKG/etc/ntp/step-tickers mkdir -p $PKG/usr/doc/ntp-$VERSION cp -a COPYRIGHT ChangeLog INSTALL NEWS README* TODO WHERE-TO-START *.y2kfixes clockstuff conf html scripts $PKG/usr/doc/ntp-$VERSION mkdir $PKG/usr/doc/ntp-$VERSION/util cp -a util/README $PKG/usr/doc/ntp-$VERSION/util mkdir $PKG/usr/doc/ntp-$VERSION/ntpdate cp -a ntpdate/README $PKG/usr/doc/ntp-$VERSION/ntpdate chown -R root:bin $PKG/usr/sbin gzip -9 $PKG/usr/man/man?/* ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ) mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cd $PKG makepkg -l y -c n $TMP/ntp-$VERSION-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/ntp.build.log