#!/bin/sh # Set initial variables: CWD=`pwd` TMP=/tmp PKG=$TMP/package-stunnel VERSION=4.20 ARCH=alpha BUILD=1 rm -rf $PKG mkdir -p $PKG ( cd $TMP rm -rf stunnel-$VERSION tar xzf $CWD/stunnel-$VERSION.tar.gz cd stunnel-$VERSION chown -R root.root . find . -perm 777 -exec chmod 755 {} \; ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --enable-ipv6 \ --mandir=/usr/man \ --infodir=/usr/info || exit make || exit # This will produce a useless key. make install DESTDIR=$PKG || exit # Get rid of key, so nobody tries to use it: rm -r $PKG/etc/stunnel/stunnel.pem # Add cnf: cat tools/stunnel.cnf > $PKG/etc/stunnel/stunnel.cnf cat $CWD/generate-stunnel-key.sh > $PKG/etc/stunnel/generate-stunnel-key.sh chmod 755 $PKG/etc/stunnel/generate-stunnel-key.sh mkdir -p $PKG/usr/doc/stunnel-$VERSION mv $PKG/usr/share/doc/stunnel/* $PKG/usr/doc/stunnel-$VERSION rm -rf $PKG/usr/share/doc rmdir $PKG/usr/share mkdir -p $PKG/usr/man/pl/man8 mv $PKG/usr/man/man8/stunnel.pl.8 $PKG/usr/man/pl/man8/stunnel.8 mkdir -p $PKG/usr/man/fr/man8 mv $PKG/usr/man/man8/stunnel.fr.8 $PKG/usr/man/fr/man8/stunnel.8 gzip -9 $PKG/usr/man/*/man?/*.? $PKG/usr/man/man?/*.? ( 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 ) chown -R root.bin $PKG/usr/sbin mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cd $PKG makepkg -l y -c n $TMP/stunnel-$VERSION-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/stunnel.build.log