#!/bin/sh # Copyright (c) 2005 Frederick Emmott CWD=`pwd` VERSION=0.7.2 ARCH=${ARCH:-x86_64} BUILD=${BUILD:-1} TMP=/tmp/pinentry-$VERSION PKG=/tmp/package-pinentry rm -rf $TMP $PKG cd /tmp tar zxfv $CWD/pinentry-$VERSION.tar.gz cd $TMP LDFLAGS=-L/usr/lib64 \ CFLAGS="-O2 -fPIC" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib64 \ --enable-pinentry-curses \ --enable-fallback-curses \ --enable-pinentry-qt \ --disable-pinentry-gtk 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 ../pinentry-$VERSION-$ARCH-$BUILD.tgz