#!/bin/sh # Copyright (c) 2005 Frederick Emmott CWD=`pwd` VERSION=0.9.0 ARCH=${ARCH:-x86_64} BUILD=${BUILD:-1} TMP=/tmp/libassuan-$VERSION PKG=/tmp/package-libassuan rm -rf $TMP $PKG cd /tmp tar jxfv $CWD/libassuan-$VERSION.tar.bz2 cd $TMP LDFLAGS=-L/usr/lib64 \ CFLAGS="-O2 -fPIC" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib64 \ --enable-shared make make install DESTDIR=$PKG # Strip binaries: ( 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 ) # Compress and link manpages, if any: if [ -d $PKG/usr/man ]; then ( cd $PKG/usr/man for manpagedir in $(find . -type d -name "man*") ; do ( cd $manpagedir for eachpage in $( find . -type l -maxdepth 1) ; do ln -s $( readlink $eachpage ).gz $eachpage.gz rm $eachpage done gzip -9 *.? ) done ) fi # Compress info files, if any: if [ -d $PKG/usr/info ]; then ( cd $PKG/usr/info rm -f dir gzip -9 * ) fi cd $PKG mkdir install cat $CWD/slack-desc > install/slack-desc makepkg -l y -c n ../libassuan-$VERSION-$ARCH-$BUILD.tgz