#!/bin/sh #Allan Armstrong(hit3k) revision date 2007/7/13 #initial variables CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi #Version VERSION=1.1.9 PKG_VERSION=1.1.9 #Version which appears in the package name. ARCH=${ARCH:-i486} #Architecture to build on BUILD=${BUILD:-1_rlw} APP=InspIRCd PKG=$TMP/package-$APP if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mtune=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "x86-64" ]; then SLKCFLAGS="-O2 -fPIC" fi #Extract sources rm -rf $PKG mkdir -p $TMP $PKG rm -rf $TMP/$APP-$VERSION cd $TMP || exit 1 #Extract the application into TMP tar -jxvf $CWD/$APP-$VERSION.tar.bz2 || exit 1 #Change to the application source directory cd $APP-$VERSION || exit 1 #Change necessary ownership and permissions chown -R root:root . chmod -R u+w;go+r-w,a-s . #configure options CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --module-dir=/usr/lib/inspircd/modules \ --config-dir=/etc/inspircd \ --library-dir=/usr/lib/inspircd \ --binary-dir=/usr/bin/inspircd make || exit make install DESTDIR=$PKG || exit #Install documentation mkdir -p $PKG/usr/doc/$APP-$VERSION cp -a BUGS Changes FAQ INSTALL LICENSE MANIFEST README TODO docs/ $PKG/usr/doc/$APP-$VERSION find $PKG/usr/doc/$APP-$VERSION -type f -exec chmod 644 {} \; cat $CWD/$APP.SlackBuild > $PKG/usr/doc/$APP-$VERSION/$APP.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc #Add doinst.sh to package if it exists if [ -e $CWD/doinst.sh.gz ]; then zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh fi if [ -d $PKG/usr/info ]; then gzip -9 $PKG/usr/info/*.info rm -f $PKG/usr/info/dir fi cd $PKG /sbin/makepkg -l y -c n $TMP/$APP-$PKG_VERSION-$ARCH-$BUILD.tgz