summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2019-04-26 15:23:22 +0100
committerRoy Marples <roy@marples.name>2019-04-26 15:23:22 +0100
commit9dbef10132b921bfe5379d22f81b349dd38aaa99 (patch)
tree742737b1be551d3a65e847a3c7fd309b34085fbd
parentc7814a6db2aa1f3cb931ff2afedb862186498f1a (diff)
downloaddhcpcd-9dbef10132b921bfe5379d22f81b349dd38aaa99.tar.xz
Allow make distinfo to work once more.
-rw-r--r--Makefile26
1 files changed, 22 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index f8934e48..36aa1055 100644
--- a/Makefile
+++ b/Makefile
@@ -51,13 +51,19 @@ SED_SYS= -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g'
DEPEND!= test -e .depend && echo ".depend" || echo ""
VERSION!= sed -n 's/\#define VERSION[[:space:]]*"\(.*\)".*/\1/p' defs.h
-FOSSILID?= dhcpcd-6
-
-DISTPREFIX?= ${PROG}-${VERSION}
+DIST!= if test -f .fslckout; then echo "dist-fossil"; \
+ elif test -d .git; then echo "dist-git"; \
+ else echo "dist-inst"; fi
+FOSSILID?= current
+GITREF?= HEAD
+
+DISTSUFFIX=
+DISTPREFIX?= dhcpcd-${VERSION}${DISTSUFFIX}
DISTFILEGZ?= ${DISTPREFIX}.tar.gz
DISTFILE?= ${DISTPREFIX}.tar.xz
DISTINFO= ${DISTFILE}.distinfo
DISTINFOSIGN= ${DISTINFO}.asc
+
CKSUM?= cksum -a SHA256
PGP?= netpgp
@@ -148,11 +154,23 @@ distclean: clean
rm -f .depend config.h config.mk config.log \
${DISTFILE} ${DISTFILEGZ} ${DISTINFO} ${DISTINFOSIGN}
-dist:
+dist-fossil:
fossil tarball --name ${DISTPREFIX} ${FOSSILID} ${DISTFILEGZ}
gunzip -c ${DISTFILEGZ} | xz >${DISTFILE}
rm ${DISTFILEGZ}
+dist-git:
+ git archive --prefix=${DISTPREFIX}/ ${GITREF} | xz >${DISTFILE}
+
+dist-inst:
+ mkdir /tmp/${DISTPREFIX}
+ cp -RPp * /tmp/${DISTPREFIX}
+ (cd /tmp/${DISTPREFIX}; make clean)
+ tar -cvjpf ${DISTFILE} -C /tmp ${DISTPREFIX}
+ rm -rf /tmp/${DISTPREFIX}
+
+dist: ${DIST}
+
distinfo: dist
rm -f ${DISTINFO} ${DISTINFOSIGN}
${CKSUM} ${DISTFILE} >${DISTINFO}