From 40786af1c09a95c489ab85ba8259e780f9debbe5 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 19 May 2010 19:32:28 +0200 Subject: [PATCH] build: update tarball target --- Makefile.am | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index de6fb6b..dab1ca6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,10 +16,15 @@ install-exec-hook: config.status: Makefile.iptrules.in +tmpdir := $(shell mktemp -dtu) +packer = xz +packext = .tar.xz + .PHONY: tarball tarball: - rm -Rf /tmp/xtables-addons-${PACKAGE_VERSION}; - pushd ${top_srcdir} && git archive --prefix=xtables-addons-${PACKAGE_VERSION}/ HEAD | tar -C /tmp -x && popd; - pushd /tmp/xtables-addons-${PACKAGE_VERSION} && ./autogen.sh && popd; - tar -C /tmp -cjf xtables-addons-${PACKAGE_VERSION}.tar.bz2 --owner=root --group=root xtables-addons-${PACKAGE_VERSION}/; - rm -Rf /tmp/xtables-addons-${PACKAGE_VERSION}; +# do not use mkdir_p here. + mkdir ${tmpdir} + pushd ${top_srcdir} && git archive --prefix=${PACKAGE_NAME}-${PACKAGE_VERSION}/ HEAD | tar -C ${tmpdir} -x && popd; + pushd ${tmpdir}/${PACKAGE_NAME}-${PACKAGE_VERSION} && ./autogen.sh && popd; + tar --use=${packer} -C ${tmpdir} -cf ${PACKAGE_NAME}-${PACKAGE_VERSION}${packext} --owner=root --group=root ${PACKAGE_NAME}-${PACKAGE_VERSION}/; + rm -Rf ${tmpdir};