Makefile: modify the 'dist' directive to allow 'make dist', 'make dist-rpm', and 'make dist-rpm-install' with a cloned git archive
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
parent
20748b3fe6
commit
49655b2bf4
@ -7,6 +7,10 @@ Changes in version 1.12.6
|
|||||||
* autospec.spec - Davide Madrisan:
|
* autospec.spec - Davide Madrisan:
|
||||||
Make the specfile more distro-agnostic.
|
Make the specfile more distro-agnostic.
|
||||||
|
|
||||||
|
* Makefile - Davide Madrisan:
|
||||||
|
Modify the 'dist' directive to allow 'make dist', 'make dist-rpm', and
|
||||||
|
'make dist-rpm-install' with a cloned git archive.
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
Changes in version 1.12.5
|
Changes in version 1.12.5
|
||||||
|
19
Makefile
19
Makefile
@ -150,11 +150,22 @@ dist: clean
|
|||||||
esac; \
|
esac; \
|
||||||
done
|
done
|
||||||
@rm -f history/$(dist_archive)
|
@rm -f history/$(dist_archive)
|
||||||
@echo "Creating the compressed tarball..."
|
|
||||||
@$(INSTALL_DIR) history
|
@$(INSTALL_DIR) history
|
||||||
tar cf - --exclude=history --exclude=.git \
|
@echo "Creating a temporary copy of the entire repository..."
|
||||||
-C .. $(distdir) |\
|
@tmpdir=`mktemp -q -d -t $(PACKAGE)-dist.XXXXXXXX`;\
|
||||||
bzip2 -9 -c > history/$(dist_archive)
|
[ $$? -eq 0 ] || \
|
||||||
|
{ echo "cannot create a temporary directory"; exit 1; };\
|
||||||
|
$(INSTALL_DIR) $$tmpdir/$(PACKAGE)-$(VERSION);\
|
||||||
|
find . -mindepth 1 \( -name .git -o -name history \) \
|
||||||
|
-prune -o \( \! -name *~ -print0 \) | \
|
||||||
|
cpio --quiet -pmd0 $$tmpdir/$(PACKAGE)-$(VERSION)/;\
|
||||||
|
currdir="`pwd`";\
|
||||||
|
echo "Creating the compressed tarball...";\
|
||||||
|
pushd $$tmpdir/$(PACKAGE)-$(VERSION)/ >/dev/null;\
|
||||||
|
tar cf - -C .. $(PACKAGE)-$(VERSION) |\
|
||||||
|
bzip2 -9 -c > "$$currdir"/history/$(dist_archive);\
|
||||||
|
popd >/dev/null;\
|
||||||
|
rm -fr $$tmpdir
|
||||||
|
|
||||||
dist-rpm: dist $(PACKAGE).spec
|
dist-rpm: dist $(PACKAGE).spec
|
||||||
@rpm_name=$(PACKAGE)-$(VERSION)-$(RELEASE);\
|
@rpm_name=$(PACKAGE)-$(VERSION)-$(RELEASE);\
|
||||||
|
Loading…
Reference in New Issue
Block a user