Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Nov 2013 15:18:19 +0000 (UTC)
From:      "Jason E. Hale" <jhale@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r333299 - in head/sysutils/cw: . files
Message-ID:  <201311091518.rA9FIJ2D020576@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhale
Date: Sat Nov  9 15:18:18 2013
New Revision: 333299
URL: http://svnweb.freebsd.org/changeset/ports/333299

Log:
  - 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]

Modified:
  head/sysutils/cw/Makefile   (contents, props changed)
  head/sysutils/cw/files/patch-Makefile.in
  head/sysutils/cw/pkg-plist   (contents, props changed)

Modified: head/sysutils/cw/Makefile
==============================================================================
--- head/sysutils/cw/Makefile	Sat Nov  9 15:17:54 2013	(r333298)
+++ head/sysutils/cw/Makefile	Sat Nov  9 15:18:18 2013	(r333299)
@@ -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.sourceforg
 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>

Modified: head/sysutils/cw/files/patch-Makefile.in
==============================================================================
--- head/sysutils/cw/files/patch-Makefile.in	Sat Nov  9 15:17:54 2013	(r333298)
+++ head/sysutils/cw/files/patch-Makefile.in	Sat Nov  9 15:18:18 2013	(r333299)
@@ -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\"'"\

Modified: head/sysutils/cw/pkg-plist
==============================================================================
--- head/sysutils/cw/pkg-plist	Sat Nov  9 15:17:54 2013	(r333298)
+++ head/sysutils/cw/pkg-plist	Sat Nov  9 15:18:18 2013	(r333299)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311091518.rA9FIJ2D020576>