8b1de0d
#!/bin/bash -e
c9bb094
#
c9bb094
#  See ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/ for unmodified sources.
c9bb094
#
8b1de0d
8b1de0d
tmppath=`mktemp -d ${TMPDIR:-/tmp}/make-no-dlcompat-tarball-XXXXXX`
8b1de0d
if test -z "$tmppath" ; then
8b1de0d
	echo Error creating temporary directory.
8b1de0d
	exit 1
8b1de0d
fi
8b1de0d
trap "rm -fr $tmppath" EXIT
8b1de0d
8b1de0d
initialdir=`pwd`
8b1de0d
8b1de0d
for tarball in ${initialdir}/cyrus-sasl-*.tar.{gz,bz2} ; do
8b1de0d
	if ! test -s "$tarball" ; then
8b1de0d
		continue
8b1de0d
	fi
8b1de0d
	rm -fr $tmppath/*
8b1de0d
	pushd $tmppath > /dev/null
8b1de0d
	case "$tarball" in
8b1de0d
	*nodlcompat*)
8b1de0d
		: Do nothing.
8b1de0d
		;;
8b1de0d
	*.gz)
8b1de0d
		gzip  -dc "$tarball" | tar xf -
b9f2e8f
		rm -fr cyrus-sasl-*/dlcompat*
Steve Conklin d2c2641
		rm -fr cyrus-sasl-*/plugins/srp*
b9f2e8f
		tar cf - * | gzip  -9c > \
Steve Conklin d2c2641
		$initialdir/`basename $tarball .tar.gz`-nodlcompatorsrp.tar.gz
8b1de0d
		;;
8b1de0d
	*.bz2)
8b1de0d
		bzip2 -dc "$tarball" | tar xf -
b9f2e8f
		rm -fr cyrus-sasl-*/dlcompat*
Steve Conklin d2c2641
		rm -fr cyrus-sasl-*/plugins/srp*
b9f2e8f
		tar cf - * | bzip2 -9c > \
Steve Conklin d2c2641
		$initialdir/`basename $tarball .tar.bz2`-nodlcompatorsrp.tar.bz2
8b1de0d
		;;
8b1de0d
	esac
8b1de0d
	popd > /dev/null
8b1de0d
done