1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-25 00:51:21 +00:00

Add staging support.

This commit is contained in:
Rene Ladan 2013-09-28 13:24:47 +00:00
parent 09b2c7fec0
commit 6bef8ca785
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=328566
2 changed files with 29 additions and 4 deletions

View File

@ -14,18 +14,19 @@ USE_GITHUB= yes
GH_ACCOUNT= rene0
GH_COMMIT= 75f6f04
MAKE_ARGS= FULLPREFIX="${STAGEDIR}${PREFIX}"
OPTIONS_DEFINE= DOCS
NO_STAGE= yes
.include <bsd.port.options.mk>
post-install:
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README.md ${DOCSDIR}
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
.endif
if [ ! -f ${ETCDIR}/hardware.txt ] ; then \
${CP} -p ${ETCDIR}/hardware.txt.sample ${ETCDIR}/hardware.txt ; \
${CP} -p ${STAGEDIR}${ETCDIR}/hardware.txt.sample ${STAGEDIR}${ETCDIR}/hardware.txt ; \
fi
.include <bsd.port.mk>

View File

@ -0,0 +1,24 @@
--- ./Makefile.orig 2013-09-10 17:47:08.000000000 +0200
+++ ./Makefile 2013-09-28 15:21:45.000000000 +0200
@@ -1,8 +1,9 @@
.PHONY: all clean install
PREFIX?=.
-ETCDIR?=$(PREFIX)/etc/dcf77pi
-CFLAGS+=-Wall -DETCDIR=\"$(ETCDIR)\"
+FULLPREFIX?=$(PREFIX)
+ETCDIR?=etc/dcf77pi
+CFLAGS+=-Wall -DETCDIR=\"$(PREFIX)/$(ETCDIR)\"
all: dcf77pi readpin
@@ -26,6 +27,6 @@
rm readpin readpin.o
install:
- install dcf77pi readpin $(PREFIX)/bin
- mkdir -p $(ETCDIR)
- install etc/dcf77pi/hardware.txt $(ETCDIR)/hardware.txt.sample
+ install dcf77pi readpin $(FULLPREFIX)/bin
+ mkdir -p $(FULLPREFIX)/$(ETCDIR)
+ install etc/dcf77pi/hardware.txt $(FULLPREFIX)/$(ETCDIR)/hardware.txt.sample