- Simplify and fix installation, use BSD_* commands, switch to pkg-plist, use WRKSRC_SUBDIR

This commit is contained in:
Dmitry Marakasov 2018-03-13 14:13:26 +00:00
parent d0b84518f8
commit 241359a3e1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=464377
4 changed files with 29 additions and 33 deletions

View File

@ -17,12 +17,7 @@ CONFLICTS= gnucflow-[0-9]* cflow-[0-9]*
USES= gmake
MAKE_ENV= MANDIR=${PREFIX}/man
MAKE_JOBS_UNSAFE= yes
PLIST_FILES= bin/asmgraph bin/cgraph bin/cflow \
man/man1/asmgraph.1.gz man/man1/cflow.1.gz \
man/man1/cgraph.1.gz
WRKSRC= ${WRKDIR}/${DISTNAME}/gnu
WRKSRC_SUBDIR= gnu
post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/cgraph

View File

@ -0,0 +1,22 @@
--- Makefile.orig 2010-04-03 09:52:16 UTC
+++ Makefile
@@ -67,11 +67,11 @@ clean:
$(RM) $(CFLOWMAN).gz $(CMAN).gz $(ASMMAN).gz
install: mkdirs build
- $(INSTALL) -d $(PREFIX)/bin
- $(INSTALL) -c -m 0755 $(CFLOW) $(PREFIX)/bin/$(CFLOW)
- $(INSTALL) -c -m 0755 $(ASMPROG) $(PREFIX)/bin/$(ASMPROG)
- $(INSTALL) -c -m 0755 $(CPROG) $(PREFIX)/bin/$(CPROG)
- $(INSTALL) -d $(MAN1DIR)
- $(INSTALL) -c -m 0644 $(CFLOWMAN).gz $(MAN1DIR)/$(CFLOWMAN).gz
- $(INSTALL) -c -m 0644 $(ASMMAN).gz $(MAN1DIR)/$(ASMMAN).gz
- $(INSTALL) -c -m 0644 $(CMAN).gz $(MAN1DIR)/$(CMAN).gz
+ $(MKDIR) $(DESTDIR)$(PREFIX)/bin
+ $(BSD_INSTALL_SCRIPT) $(CFLOW) $(DESTDIR)$(PREFIX)/bin/$(CFLOW)
+ $(BSD_INSTALL_PROGRAM) $(ASMPROG) $(DESTDIR)$(PREFIX)/bin/$(ASMPROG)
+ $(BSD_INSTALL_PROGRAM) $(CPROG) $(DESTDIR)$(PREFIX)/bin/$(CPROG)
+ $(MKDIR) $(DESTDIR)$(MAN1DIR)
+ $(BSD_INSTALL_MAN) $(CFLOWMAN).gz $(DESTDIR)$(MAN1DIR)/$(CFLOWMAN).gz
+ $(BSD_INSTALL_MAN) $(ASMMAN).gz $(DESTDIR)$(MAN1DIR)/$(ASMMAN).gz
+ $(BSD_INSTALL_MAN) $(CMAN).gz $(DESTDIR)$(MAN1DIR)/$(CMAN).gz

View File

@ -1,27 +0,0 @@
--- Makefile.orig 2010-04-03 09:52:16 UTC
+++ Makefile
@@ -1,3 +1,4 @@
+DESTDIR?=
PREFIX?=/usr/local
MANDIR?=$(PREFIX)/share/man
MAN1DIR=$(MANDIR)/man1
@@ -67,11 +68,11 @@ clean:
$(RM) $(CFLOWMAN).gz $(CMAN).gz $(ASMMAN).gz
install: mkdirs build
- $(INSTALL) -d $(PREFIX)/bin
- $(INSTALL) -c -m 0755 $(CFLOW) $(PREFIX)/bin/$(CFLOW)
- $(INSTALL) -c -m 0755 $(ASMPROG) $(PREFIX)/bin/$(ASMPROG)
- $(INSTALL) -c -m 0755 $(CPROG) $(PREFIX)/bin/$(CPROG)
- $(INSTALL) -d $(MAN1DIR)
- $(INSTALL) -c -m 0644 $(CFLOWMAN).gz $(MAN1DIR)/$(CFLOWMAN).gz
- $(INSTALL) -c -m 0644 $(ASMMAN).gz $(MAN1DIR)/$(ASMMAN).gz
- $(INSTALL) -c -m 0644 $(CMAN).gz $(MAN1DIR)/$(CMAN).gz
+ $(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
+ $(INSTALL) -c -m 0755 $(CFLOW) $(DESTDIR)$(PREFIX)/bin/$(CFLOW)
+ $(INSTALL) -c -m 0755 $(ASMPROG) $(DESTDIR)$(PREFIX)/bin/$(ASMPROG)
+ $(INSTALL) -c -m 0755 $(CPROG) $(DESTDIR)$(PREFIX)/bin/$(CPROG)
+ $(INSTALL) -d $(DESTDIR)$(MAN1DIR)
+ $(INSTALL) -c -m 0644 $(CFLOWMAN).gz $(DESTDIR)$(MAN1DIR)/$(CFLOWMAN).gz
+ $(INSTALL) -c -m 0644 $(ASMMAN).gz $(DESTDIR)$(MAN1DIR)/$(ASMMAN).gz
+ $(INSTALL) -c -m 0644 $(CMAN).gz $(DESTDIR)$(MAN1DIR)/$(CMAN).gz

6
devel/bsdcflow/pkg-plist Normal file
View File

@ -0,0 +1,6 @@
bin/asmgraph
bin/cflow
bin/cgraph
man/man1/asmgraph.1.gz
man/man1/cflow.1.gz
man/man1/cgraph.1.gz