aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/cw
diff options
context:
space:
mode:
authorjhale <jhale@FreeBSD.org>2013-11-09 23:18:18 +0800
committerjhale <jhale@FreeBSD.org>2013-11-09 23:18:18 +0800
commit433de5ad1078a18e39bb56428585f2fc07f882fe (patch)
treef5a71e58301e61e70d48202eac87229b32962059 /sysutils/cw
parent1e9e236ead4f326d47d664376235bc06069a2e7a (diff)
downloadfreebsd-ports-gnome-433de5ad1078a18e39bb56428585f2fc07f882fe.tar.gz
freebsd-ports-gnome-433de5ad1078a18e39bb56428585f2fc07f882fe.tar.zst
freebsd-ports-gnome-433de5ad1078a18e39bb56428585f2fc07f882fe.zip
- Fix staging
- Manpages are now installed in STAGEDIR and added to pkg-plist [1] - Fix shebangs (they had STAGEDIR in them previously due to useage of the cwu update tool...we'll use shebangfix instead) - Allow build by non-priviledged user and actually do build during build target instead of install target - Add LICENSE (GPLv2) - Simplify PORTDOCS installation - Strip binaries - Bump PORTREVISION since manpages were lost and shebangs were wrong Reported by: Redports QAT [1]
Diffstat (limited to 'sysutils/cw')
-rw-r--r--sysutils/cw/Makefile24
-rw-r--r--sysutils/cw/files/patch-Makefile.in40
-rw-r--r--sysutils/cw/pkg-plist11
3 files changed, 51 insertions, 24 deletions
diff --git a/sysutils/cw/Makefile b/sysutils/cw/Makefile
index bad704b821ec..df3db717c944 100644
--- a/sysutils/cw/Makefile
+++ b/sysutils/cw/Makefile
@@ -3,6 +3,7 @@
PORTNAME= cw
PORTVERSION= 1.0.16
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://cwrapper.sourceforge.net/ \
http://www.fakehalo.us/cw/
@@ -10,18 +11,27 @@ MASTER_SITES= http://cwrapper.sourceforge.net/ \
MAINTAINER= ports@FreeBSD.org
COMMENT= Non-intrusive color wrapper for common commands
+LICENSE= GPLv2
+
+USES= shebangfix
+
+SHEBANG_FILES= def/*
+SHEBANG_LANG= cw
+cw_OLD_CMD= /cw
+cw_CMD= ${PREFIX}/bin/cw
+
GNU_CONFIGURE= yes
+ALL_TARGET= local
-OPTIONS_DEFINE= DOCS
+PORTDOCS= CHANGES CONTRIB FILES INSTALL PLATFORM README VERSION
-.include <bsd.port.options.mk>
+OPTIONS_DEFINE= DOCS
post-install:
-.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
-. for file in CHANGES CONTRIB FILES INSTALL PLATFORM README VERSION
- ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR}
-. endfor
-.endif
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
+.for file in cw cwu
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${file}
+.endfor
.include <bsd.port.mk>
diff --git a/sysutils/cw/files/patch-Makefile.in b/sysutils/cw/files/patch-Makefile.in
index 73e6c5118589..8b5066ad8d78 100644
--- a/sysutils/cw/files/patch-Makefile.in
+++ b/sysutils/cw/files/patch-Makefile.in
@@ -1,9 +1,31 @@
---- Makefile.in.orig 2013-11-08 22:45:17.000000000 +0800
-+++ Makefile.in 2013-11-08 22:46:17.000000000 +0800
-@@ -1,5 +1,5 @@
- # this was NOT generated by automake.
--PREFIX=@prefix@
-+PREFIX=${DESTDIR}@prefix@
- BINDIR=${PREFIX}/bin
- LIBDIR=${PREFIX}/lib
- MANDIR=@mandir@
+--- ./Makefile.in.orig 2010-06-20 00:39:51.000000000 -0400
++++ ./Makefile.in 2013-11-09 08:49:46.000000000 -0500
+@@ -54,20 +54,18 @@
+ @$(ECHO) "* PLEASE view the ./README file for more information if"\
+ "you haven't already."
+
+-install: cleanpub cw cwu
++install:
+ @$(ECHO) "* Installing color wrapper..."
+- @for FILE in bin/*;do $(INSTALL) -o 0 -g 0 -m 755 $$FILE $(BINDIR);done
+- @$(LN) -sf $(BINDIR)/cw $(BINDIR)/cwe
++ @for FILE in bin/*;do $(INSTALL) -m 755 $$FILE $(DESTDIR)$(BINDIR);done
++ @$(LN) -sf cw $(DESTDIR)$(BINDIR)/cwe
+ @$(ECHO) "* Installing color wrapper generic definition files..."
+- @$(MKDIR) -m 755 $(LIBDIR)/cw/
+- @for FILE in def/*;do $(INSTALL) -o 0 -g 0 -m 755 $$FILE $(LIBDIR)/cw/;done
++ @$(MKDIR) -m 755 $(DESTDIR)$(LIBDIR)/cw/
++ @for FILE in def/*;do $(INSTALL) -m 555 $$FILE $(DESTDIR)$(LIBDIR)/cw/;done
+ @$(ECHO) "* Installing color wrapper generic header/footer files..."
+- @$(MKDIR) -m 755 $(LIBDIR)/cw/etc
+- @for FILE in etc/*;do $(INSTALL) -o 0 -g 0 -m 644 $$FILE $(LIBDIR)/cw/etc;done
++ @$(MKDIR) -m 755 $(DESTDIR)$(LIBDIR)/cw/etc
++ @for FILE in etc/*;do $(INSTALL) -m 444 $$FILE $(DESTDIR)$(LIBDIR)/cw/etc;done
+ @$(ECHO) "* Installing manual pages..."
+- @for FILE in man/*;do $(INSTALL) -o 0 -g 0 -m 644 $$FILE $(MANDIR)/man1/;done
+- @$(ECHO) "* Updating definition files..."
+- @$(BINDIR)/cwu $(LIBDIR)/cw $(BINDIR)/cw
++ @for FILE in man/*;do $(INSTALL) -m 444 $$FILE $(DESTDIR)$(MANDIR)/man1/;done
+ @$(ECHO) "-----------------------------------------------------------"
+ @$(ECHO) "* Complete, definitions are stored in: $(LIBDIR)/cw"
+ @$(ECHO) "* For bash: place 'export PATH=\"$(LIBDIR)/cw:\$$PATH\"'"\
diff --git a/sysutils/cw/pkg-plist b/sysutils/cw/pkg-plist
index b0479e0302c2..eaf9ff46af0e 100644
--- a/sysutils/cw/pkg-plist
+++ b/sysutils/cw/pkg-plist
@@ -121,13 +121,8 @@ lib/cw/wc
lib/cw/whereis
lib/cw/who
lib/cw/xferlog@
-%%PORTDOCS%%%%DOCSDIR%%/CHANGES
-%%PORTDOCS%%%%DOCSDIR%%/CONTRIB
-%%PORTDOCS%%%%DOCSDIR%%/FILES
-%%PORTDOCS%%%%DOCSDIR%%/INSTALL
-%%PORTDOCS%%%%DOCSDIR%%/PLATFORM
-%%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%%%DOCSDIR%%/VERSION
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
+man/man1/cw.1.gz
+man/man1/cwe.1.gz
+man/man1/cwu.1.gz
@dirrm lib/cw/etc
@dirrm lib/cw