public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/netifrc:master commit in: /, mk/
@ 2014-03-05 18:40 Robin H. Johnson
  0 siblings, 0 replies; only message in thread
From: Robin H. Johnson @ 2014-03-05 18:40 UTC (permalink / raw
  To: gentoo-commits

commit:     4f9dd2ad7875debf5da68e46e75257e9f0870fed
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  4 19:00:40 2014 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Tue Mar  4 19:00:40 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/netifrc.git;a=commit;h=4f9dd2ad

packaging: better dist rule

Improve distfile generation to include a changelog, which is not
possible with git-archive

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

---
 .gitignore |  1 +
 mk/dist.mk | 11 ++++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..56631ab
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+ChangeLog

diff --git a/mk/dist.mk b/mk/dist.mk
index 82fb8cb..383826a 100644
--- a/mk/dist.mk
+++ b/mk/dist.mk
@@ -14,9 +14,18 @@ SNAP=		${_SNAP}
 SNAPDIR=	${DISTPREFIX}-${SNAP}
 SNAPFILE=	${SNAPDIR}.tar.bz2
 
-dist:
+gitdist:
 	git archive --prefix=${DISTPREFIX}/ ${GITREF} | bzip2 > ${DISTFILE}
 
+dist:
+	sh -c ' \
+	D=$$(mktemp -d) && \
+	mkdir $${D}/${DISTPREFIX} && \
+	git checkout-index -f -a --prefix=$${D}/${DISTPREFIX}/ && \
+	git log >$${D}/${DISTPREFIX}/ChangeLog && \
+	tar cjf ${DISTFILE} --owner=0 --group=0 --format=posix --mode=a+rX -C $$D ${DISTPREFIX} && \
+	rm -rf $$D '
+
 distcheck: dist
 	rm -rf ${DISTPREFIX}
 	tar xf ${DISTFILE}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-05 18:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-05 18:40 [gentoo-commits] proj/netifrc:master commit in: /, mk/ Robin H. Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox