From b24e3ffea13d7228f138a66d0f01c0d371cd79b9 Mon Sep 17 00:00:00 2001 From: Danilo Egea Gondolfo Date: Sun, 23 Feb 2014 01:48:15 +0000 Subject: [PATCH] - Add stage support --- sysutils/installwatch/Makefile | 9 ++------- sysutils/installwatch/files/patch-Makefile | 18 +++++++++++++++--- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/sysutils/installwatch/Makefile b/sysutils/installwatch/Makefile index 4daca992106d..2458e87d1ca5 100644 --- a/sysutils/installwatch/Makefile +++ b/sysutils/installwatch/Makefile @@ -18,13 +18,8 @@ PLIST_FILES= bin/installwatch lib/installwatch.so PORTDOCS= BUGS CHANGELOG INSTALL README TODO OPTIONS_DEFINE= DOCS -NO_STAGE= yes -.include - -.if ${PORT_OPTIONS:MDOCS} post-install: - @${MKDIR} ${DOCSDIR} - cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} -.endif + @${MKDIR} ${STAGEDIR}${DOCSDIR} + cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} .include diff --git a/sysutils/installwatch/files/patch-Makefile b/sysutils/installwatch/files/patch-Makefile index 34f7756789c1..e6a486f37bef 100644 --- a/sysutils/installwatch/files/patch-Makefile +++ b/sysutils/installwatch/files/patch-Makefile @@ -1,5 +1,5 @@ ---- Makefile.bak Fri Jan 2 17:45:26 2004 -+++ Makefile Fri Jan 2 17:48:33 2004 +--- ./Makefile.orig 2001-12-22 21:55:11.000000000 -0200 ++++ ./Makefile 2014-02-22 22:45:43.000000000 -0300 @@ -4,7 +4,6 @@ # Well, the only configurable part is the following variable. # Make sure the directory you specify exists. @@ -8,7 +8,7 @@ # End of configurable part -@@ -16,10 +15,10 @@ +@@ -16,19 +15,19 @@ all: installwatch.so installwatch.so: installwatch.o @@ -21,6 +21,18 @@ localdecls.h: ./create-localdecls + + install: all +- if [ -r $(LIBDIR)/installwatch.so ]; then rm $(LIBDIR)/installwatch.so; export LD_PRELOAD=""; cp installwatch.so $(LIBDIR); LD_PRELOAD=$(LIBDIR)/installwatch.so; else cp installwatch.so $(LIBDIR); fi ++ if [ -r ${DESTDIR}$(LIBDIR)/installwatch.so ]; then rm ${DESTDIR}$(LIBDIR)/installwatch.so; export LD_PRELOAD=""; cp installwatch.so ${DESTDIR}$(LIBDIR); LD_PRELOAD=${DESTDIR}$(LIBDIR)/installwatch.so; else cp installwatch.so ${DESTDIR}$(LIBDIR); fi + +- sed -e "s|#PREFIX#|$(PREFIX)|" < installwatch > $(BINDIR)/installwatch +- chmod 755 $(BINDIR)/installwatch ++ sed -e "s|#PREFIX#|$(PREFIX)|" < installwatch > ${DESTDIR}$(BINDIR)/installwatch ++ chmod 755 ${DESTDIR}$(BINDIR)/installwatch + + uninstall: + rm $(LIBDIR)/installwatch.so @@ -41,7 +40,7 @@ tar -czvC .. -f ../installwatch-$(VERSION).tar.gz installwatch-$(VERSION)