diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 09:25:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 09:25:10 +0000 |
commit | 5dced3d1b3deca80e01415a2e35dc7972dcbfae7 (patch) | |
tree | 6a403684e0978f0287d7f0ec0e5aab1fd31a59e1 /util/gen-tarball.in | |
parent | Initial commit. (diff) | |
download | e2fsprogs-5dced3d1b3deca80e01415a2e35dc7972dcbfae7.tar.xz e2fsprogs-5dced3d1b3deca80e01415a2e35dc7972dcbfae7.zip |
Adding upstream version 1.47.0.upstream/1.47.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | util/gen-tarball.in | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/util/gen-tarball.in b/util/gen-tarball.in new file mode 100644 index 0000000..997bd93 --- /dev/null +++ b/util/gen-tarball.in @@ -0,0 +1,50 @@ +#!/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$$ +GZIP=gzip + +# +# This hack is needed because texi2dvi blows up horribly if there are +# any '~' characters in the directory pathname. So we kludge around it by +# using a non-standard directory name for WIP releases. dpkg-source +# complains, but life goes on. +# +deb_pkgver=`echo @E2FSPROGS_PKGVER@ | sed -e 's/~/-/g'` + +case $1 in + debian|ubuntu) + SRCROOT="e2fsprogs-$deb_pkgver" + tarout="e2fsprogs_@E2FSPROGS_PKGVER@.orig.tar.gz" + ;; + all|*) + SRCROOT="e2fsprogs-$base_ver" + tarout="$SRCROOT.tar.gz" + ;; +esac + +if test -z "$SOURCE_DATE_EPOCH" ; then + export SOURCE_DATE_EPOCH=$(cd $top_srcdir; git log -1 --pretty=%ct) +fi + +(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) > $exclude +sed -e "s;^;$base_e2fsprogs/;" < $srcdir/all.exclude >> $exclude + +(cd $top_srcdir/.. ; \ + tar -c -f - -X $exclude --sort=name --owner=0 --group=0 \ + --transform "flags=r;s|^$base_e2fsprogs|$SRCROOT|" \ + --numeric-owner --mtime="@${SOURCE_DATE_EPOCH}" $base_e2fsprogs) \ + | $GZIP -9n -c > $tarout +$GZIP -ln $tarout +rm -f "$exclude" |