#!/bin/sh CWD=`pwd` NAME=silc VERSION=1.0 ARCH=i586 BUILD=1 PKGNAME=$NAME PKGVER=$VERSION BASEDIR=$PKGNAME-toolkit-$PKGVER ARCHIVE=$BASEDIR.tar.bz2 REPOSITORY=ftp://ftp.silcnet.org/silc/toolkit/sources FLAGS="-O2 -march=pentium -mcpu=pentium -fno-strength-reduce \ -fomit-frame-pointer -ffast-math" PKG=/tmp/package-$NAME rm -rf $PKG mkdir -p $PKG # Obtain sources if [ ! -e $ARCHIVE ]; then if `wget "$REPOSITORY/$ARCHIVE"`; then true else exit 1 fi fi # Compile cd /tmp tar jxvf $CWD/$ARCHIVE cd $BASEDIR bzcat $CWD/$NAME-$VERSION-nodebug.patch.bz2 | patch -p1 -s CFLAGS=$FLAGS CXXFLAGS=$FLAGS ./configure --prefix=/usr --enable-ipv6 \ --with-perl=no --disable-debug --with-simdir=/usr/libexec/silc \ --with-docdir=/usr/doc/silc-$VERSION --includedir=/usr/include/silc make # Install make install DESTDIR=$PKG mkdir -p $PKG/install $PKG/usr/doc/$NAME-$VERSION cat > $PKG/install/slack-desc < silc_docs_html.tar gzip -9nf silc_docs_html.tar rm -rf silc_docs_html rm -rf tutorial ) strip --strip-unneeded $PKG/usr/libexec/silc/*.so ||: chown -R root.root $PKG # Make package cd $PKG cat install/slack-desc | grep "$NAME:" > /tmp/$NAME-$VERSION-$ARCH-$BUILD.txt makepkg -l y -c n /tmp/$NAME-$VERSION-$ARCH-$BUILD.tgz