| #!/bin/sh |
| # |
| # This script is used to generate the distribution tarball |
| # |
| srcdir=@srcdir@ |
| top_srcdir=@top_srcdir@ |
| top_dir=`cd $top_srcdir; pwd` |
| base_ver=`echo @E2FSPROGS_VERSION@ | sed -e 's/-WIP//' -e 's/pre-//' -e 's/-PLUS//'` |
| base_e2fsprogs=`basename $top_dir` |
| exclude=/tmp/exclude |
| |
| deb_pkgver=`echo @E2FSPROGS_PKGVER@ | sed -e 's/_/-/g'` |
| echo Debian package $deb_pkgver |
| |
| case $1 in |
| debian|ubuntu) |
| SRCROOT="e2fsprogs-$deb_pkgver" |
| list=all |
| ;; |
| subset) |
| SRCROOT="e2fsprogs-libs-$base_ver" |
| list=subset |
| ;; |
| all|*) |
| SRCROOT="e2fsprogs-$base_ver" |
| list=all |
| ;; |
| esac |
| |
| mv ../e2fsprogs.spec $top_srcdir/e2fsprogs.spec |
| (cd $top_srcdir/.. ; find $base_e2fsprogs \( -name \*~ -o -name \*.orig \ |
| -o -name CVS -o -name \*.rej -o -name Makefile.pq \ |
| -o -name TAGS -o -name \*.old -o -name SCCS \ |
| -o -name changed-files -o -name .#\* -o -name \*.tar.gz \ |
| -o -name autom4te.cache \) \ |
| -print) | sed -e "s/^$base_e2fsprogs/$SRCROOT/" > $exclude |
| sed -e "s;^;$SRCROOT/;" < $srcdir/$list.exclude >> $exclude |
| |
| (cd $top_srcdir/.. ; rm -f $SRCROOT ; ln -sf e2fsprogs $SRCROOT) |
| |
| (cd $top_srcdir/.. ; tar -c -h -v -f - -X $exclude $SRCROOT) \ |
| | gzip -9 > $SRCROOT.tar.gz |
| |
| (cd $top_srcdir/.. ; rm -f $SRCROOT) |
| mv $top_srcdir/e2fsprogs.spec ../e2fsprogs.spec |