#!/bin/bash NAME=ntp VER=4.2.8p4 CWD=`pwd` PKGTMP=/tmp/pkgtmp mkdir -p $PKGTMP &>/dev/null mkdir $PKGTMP/etc cp $CWD/ntp.conf $PKGTMP/etc || exit 1 mkdir -p $PKGTMP/service/ntp || exit 1 cp $CWD/run $PKGTMP/service/ntp || exit 1 chmod +x $PKGTMP/service/ntp/run || exit 1 mkdir -p $PKGTMP/etc/postinst.d || exit 1 cp $CWD/post.10_ntp $PKGTMP/etc/postinst.d || exit 1 chmod +x $PKGTMP/etc/postinst.d/* || exit 1 tar -xzf *.tar.gz || exit 1 #export CFLAGS="-fgnu89-inline" #If "multiple definition of `foo'" Also see http://gcc.gnu.org/gcc-4.3/porting_to.html cd $NAME-$VER || exit 1 ./configure --prefix=/usr --bindir=/usr/sbin || exit 1 make || exit 1 make DESTDIR=$PKGTMP install || exit 1 cd "$PKGTMP" || exit 1 makepkg -l y -c n $CWD/$NAME.pkg > /dev/null && echo $VER > $CWD/$NAME.version && arch > $CWD/$NAME.arch