#!/bin/sh -x # scripts for the maintainer (whose initials are 'nsd') case $1 in configure) # rebuild configure and *.in after changing configure.ac aclocal && autoheader && automake && autoconf && ./configure --enable-debug exit $? ;; prep) # configure and make distclean if $0 configure; then make clean if ! make check; then exit 1 fi make distclean rm -rf autom4te.cache else exit 1 fi ;; recompile) # upload and recompile on each of the sourceforge compile farm servers TGZ=pwsafe.tgz if [ -z "$SF_USER" ]; then SF_USER=`echo $USER|tr -d -` fi tar czvf /tmp/$TGZ . --exclude '*.o' --exclude pwsafe scp /tmp/$TGZ $SF_USER@cf-shell.sourceforge.net:$TGZ rm /tmp/$TGZ # some hosts need custom stuff passed in to ./configure and their environment amd64_linux1_conf="--without-x" ppc_osx1_conf="--without-readline --with-openssl-dir=/sw" ppc_osx2_conf="--without-readline" sparc_solaris1_conf="--without-readline --with-openssl-dir=/usr/local/ssl" sparc_solaris1_env="LD_LIBRARY_PATH=/usr/local/ssl/lib PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin" x86_freebsd1_make=gmake x86_netbsd1_conf="--without-readline --without-x" x86_netbsd1_make=gmake x86_openbsd1_make=gmake x86_solaris1_conf="--with-openssl-dir=/usr/local/ssl" x86_solaris1_env="LD_LIBRARY_PATH=/usr/local/ssl/lib PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin" SF_HOSTS="alpha-linux1 amd64-linux1 ppc-osx1 ppc-osx2 sparc-solaris1 x86-freebsd1 x86-linux1 x86-linux2 x86-netbsd1 x86-openbsd1 x86-solaris1" [ -z "$2" ] || SF_HOSTS="$2" for host in $SF_HOSTS; do echo "==== $host =========================================================================" RSH="ssh $SF_USER@cf-shell.sourceforge.net ssh $host" DIR=$host CONF="`echo $host|tr -- - _`_conf" ENV="`echo $host|tr -- - _`_env" MAKE="`echo $host|tr -- - _`_make" if $RSH "rm -rf $DIR \; \ mkdir -p $DIR \; \ gunzip <$TGZ | tar xvf - -C $DIR" ; then if $RSH "cd $DIR \; ${!ENV-} ./configure ${!CONF-}"; then $RSH "cd $DIR \; ${!ENV-} ${!MAKE-make} check" fi fi done ;; compile) # prep & recompile combined if $0 prep; then $0 recompile exit $? else exit 1 fi ;; release) # tar up a release VER=`awk