diff options
author | Fabian Groffen <grobian@gentoo.org> | 2019-05-30 11:50:39 +0200 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2019-05-30 12:09:29 +0200 |
commit | ca08ed2aea1532dfd3d970f5a657abfc9e9e6f6f (patch) | |
tree | 2a1fd6f023749a006633d4f7f8912561f91bcba2 | |
parent | tests/qfile: lift non-Gentoo system restriction (diff) | |
download | portage-utils-ca08ed2a.tar.gz portage-utils-ca08ed2a.tar.bz2 portage-utils-ca08ed2a.zip |
make-tarball: update/fix for latest autotools buildv0.80_pre20190530
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rwxr-xr-x | make-tarball.sh | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/make-tarball.sh b/make-tarball.sh index 2052985..489ce4b 100755 --- a/make-tarball.sh +++ b/make-tarball.sh @@ -1,8 +1,8 @@ -#!/bin/bash +#!/bin/env bash set -e -if ! . /etc/init.d/functions.sh 2>/dev/null ; then +if ! . ${EPREFIX}/lib/gentoo/functions.sh 2>/dev/null ; then einfo() { printf ' * %b\n' "$*"; } eerror() { einfo "$@" 1>&2; } fi @@ -26,38 +26,32 @@ git) ver="HEAD" ;; fi ;; esac -p="portage-utils-${ver#v}" +p="${TMPDIR:-/var/tmp}/portage-utils-${ver#v}" rm -rf "${p}" mkdir "${p}" einfo "Checking out clean git sources ..." git archive "${ver}" | tar xf - -C "${p}" -cd "${p}" +pushd "${p}" >/dev/null einfo "Building autotools ..." sed -i "/^AC_INIT/s:git:${ver#v}:" configure.ac sed -i "/^AM_MAINTAINER_MODE/s:(.*)$::" configure.ac -sed -i "1iPV := ${ver#v}" Makefile -LC_ALL=C ${MAKE} -s autotools >/dev/null +./autogen.sh rm -rf autom4te.cache -cd .. +popd >/dev/null einfo "Generating tarball ..." -tar --numeric-owner -cf - "${p}" | xz > "${p}".tar.xz +pushd "${p%/*}" >/dev/null +tar --numeric-owner -cf - "${p##*/}" | xz > "${p}".tar.xz +popd >/dev/null rm -r "${p}" -du -b "${p}".tar.* -einfo "Checking tarball (simple) ..." +einfo "Checking tarball ..." +pushd "${p%/*}" >/dev/null tar xf "${p}".tar.* -pushd "${p}" >/dev/null -v ${MAKE} -s -v ${MAKE} -s check popd >/dev/null -rm -rf "${p}" - -einfo "Checking tarball (autotools) ..." -tar xf "${p}".tar.* pushd "${p}" >/dev/null v ./configure -q v ${MAKE} -s @@ -67,6 +61,7 @@ rm -rf "${p}" echo einfo "All ready for distribution!" -du -b "${p}".tar.* +mv "${p}".tar.* . +du -b "${p##*/}".tar.* exit 0 |