2013-11-26 05:37:38 +08:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
if [ "$#" -ne 2 ]; then
|
|
|
|
echo >&2 "Usage: $0 <package> <version>"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
package="$1"
|
|
|
|
version="$2"
|
|
|
|
tarball_prefix="$package-$version"
|
|
|
|
echo "I: Making dist tarball for $tarball_prefix"
|
|
|
|
tarball_name="$tarball_prefix.tar.gz"
|
|
|
|
|
|
|
|
tmp_work_dir=".tmp"
|
|
|
|
tmp_version_dir="$tmp_work_dir/$tarball_prefix"
|
|
|
|
|
|
|
|
if [ "$DESTDIR" != '' ]; then
|
|
|
|
destdir="$DESTDIR/"
|
|
|
|
fi
|
|
|
|
output="$destdir$tarball_name"
|
|
|
|
|
|
|
|
mkdir -p "$tmp_version_dir"
|
|
|
|
git archive --format tar HEAD | tar xf - -C "$tmp_version_dir"
|
|
|
|
echo "$version" > "$tmp_version_dir/.version"
|
2014-04-28 20:21:34 +08:00
|
|
|
extra_dist='
|
2014-12-22 04:07:59 +08:00
|
|
|
autoconfig.h.in
|
|
|
|
configure
|
|
|
|
ppp/Makefile
|
|
|
|
Makefile
|
|
|
|
xpp/Makefile
|
|
|
|
ppp/Makefile.in
|
|
|
|
Makefile.in
|
|
|
|
xpp/Makefile.in
|
2014-12-08 03:00:42 +08:00
|
|
|
xpp/oct612x/Makefile.in
|
|
|
|
auxdir/compile
|
|
|
|
auxdir/config.guess
|
|
|
|
auxdir/config.sub
|
|
|
|
auxdir/depcomp
|
2014-12-22 04:07:59 +08:00
|
|
|
auxdir/install-sh
|
2014-12-08 03:00:42 +08:00
|
|
|
auxdir/ltmain.sh
|
2014-12-22 04:07:59 +08:00
|
|
|
auxdir/missing
|
2014-12-08 03:00:42 +08:00
|
|
|
m4/libtool.m4
|
|
|
|
m4/ltoptions.m4
|
|
|
|
m4/ltsugar.m4
|
|
|
|
m4/ltversion.m4
|
|
|
|
m4/lt~obsolete.m4
|
2014-12-22 04:07:59 +08:00
|
|
|
'
|
2014-04-28 20:21:34 +08:00
|
|
|
find $extra_dist | cpio -pudmv "$tmp_version_dir"
|
2013-11-26 05:37:38 +08:00
|
|
|
tar czf "$output" -C "$tmp_work_dir" "$tarball_prefix"
|
|
|
|
rm -rf "$tmp_work_dir"
|
|
|
|
echo "I: tarball is ready: '$output'"
|