#!/bin/bash # quota.SlackBuild # by Stuart Winter for the Slackware porting Project. # Heavily based on the original Slackware build script. # 09-Jun-2004 # Record toolchain & other info for the build log: slackbuildinfo # Paths to skeleton port's source & real Slackware source tree: export CWD=$SLACKSOURCE/$PKGSERIES/$PKGNAM export PORTCWD=$PWD # Temporary build locations: export TMPBUILD=$TMP/build-$PKGNAM export PKG=$TMP/package-$PKGNAM mkpkgdirs # Delete & re-create temporary directories then cd into $TMPBUILD # Determine the CFLAGS for the known architectures: case $PORTARCH in arm) export SLKCFLAGS="-O2 -march=armv3 -mtune=xscale" ;; powerpc) export SLKCFLAGS="-O2" ;; sparc) export SLKCFLAGS="-O2" ;; hppa) export SLKCFLAGS="-O2" ;; *) export SLKCFLAGS="-O2" ;; esac # Extract source: tar zxvvf $CWD/$PKGNAM-$VERSION.tar.gz cd quota-tools slackhousekeeping # Configure: CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --build=$ARCH-slackware-linux || failconfig # Build: make || failmake make mo || failmake # Install binaries: mkdir -p $PKG/{sbin,usr/sbin,usr/bin} install -m755 convertquota quotacheck quotaon $PKG/sbin ( cd $PKG/sbin ; ln -sf quotaon quotaoff ) install -m755 edquota repquota warnquota quotastats setquota quot \ xqmstats rpc.rquotad \ $PKG/usr/sbin install -m755 quota $PKG/usr/bin # Install headers: mkdir -p $PKG/usr/include/rpcsvc install -m644 rquota.h rquota.x $PKG/usr/include/rpcsvc # Install etc stuff: mkdir -p $PKG/etc install -m644 warnquota.conf $PKG/etc/warnquota.conf-sample # Install man pages: mkdir -p $PKG/usr/man/man{1,2,3,8} install -m644 *.1 $PKG/usr/man/man1 install -m644 *.2 $PKG/usr/man/man2 install -m644 *.3 $PKG/usr/man/man3 install -m644 *.8 $PKG/usr/man/man8 # Install locale data: mkdir -p $PKG/usr/share/locale/pl/LC_MESSAGES install -m644 po/pl.mo $PKG/usr/share/locale/pl/LC_MESSAGES/quota.mo # Install docs: mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION cp -a Changelog README* \ $PKG/usr/doc/quota-$VERSION ( cd doc sgml2txt quotadoc.sgml sgml2html -s 0 quotadoc.sgml if [ ! -r quotadoc.html ]; then echo "WARNING: no quotadoc.html generated" sleep 100 fi install -m644 quotadoc.html quotadoc.txt $PKG/usr/doc/$PKGNAM-$VERSION ) find $PKG/usr/doc/$PKGNAM-$VERSION -name CVS -type d | xargs rm -rf # If necessary, start the fakeroot server so we can set file/dir ownerships: start_fakeroot # Apply generic Slackware packaging policies: cd $PKG slackstripall # strip all .a archives and all ELFs slackgzpages -i # compress man & info pages and delete usr/info/dir slackslack # chown -R root:root, chmod -R og-w, slackchown, slack644docs slackdesc # install slack-desc and doinst.sh slackmp # run makepkg -l y -c n # Perform any final checks on the package: cd $PKG slackhlinks # search for any hard links