CWD=`pwd` TMP=/tmp PKG=$TMP/package-utempter rm -rf $PKG mkdir -p $PKG/usr VERSION=1.1.3 ARCH=${ARCH:-i486} BUILD=1 cd $TMP # The original package name was "utempter", but this new version # calls itself "libutempter". We'll keep the same old package name # to avoid confusing upgrades. rm -rf libutempter-$VERSION tar xjvf $CWD/libutempter-$VERSION.tar.bz2 cd libutempter-$VERSION chown -R root:root . # I see no reason to use different paths than in utempter-0.5.2: zcat $CWD/libutempter.slack.diff.gz | patch -p1 --verbose || exit find . -perm 664 -exec chmod 644 {} \; find . -perm 775 -exec chmod 755 {} \; make make install DESTDIR=$PKG ( cd $PKG/usr mv lib lib64 ) # A static libutempter seems like a bad idea, since it wouldn't work # without the making utempter binary. That and the shared lib are a # closely matched set. rm -f $PKG/usr/lib64/libutempter.a # Set proper permissions: chown root.utmp $PKG/usr/sbin/utempter chmod 2755 $PKG/usr/sbin/utempter chown root:bin $PKG/usr/sbin chmod 644 $PKG/usr/include/utempter.h mkdir -p $PKG/usr/doc/utempter-$VERSION cp -a \ COPYING README \ $PKG/usr/doc/utempter-$VERSION ( 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 > $PKG/install/doinst.sh cd $PKG makepkg -l y -c n $TMP/utempter-$VERSION-$ARCH-$BUILD.tgz