Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Aug 2014 13:48:24 +0000 (UTC)
From:      William Grzybowski <wg@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r366763 - in head/www/larbin: . files
Message-ID:  <201408311348.s7VDmOq9049010@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: wg
Date: Sun Aug 31 13:48:24 2014
New Revision: 366763
URL: http://svnweb.freebsd.org/changeset/ports/366763
QAT: https://qat.redports.org/buildarchive/r366763/

Log:
  www/larbin: support stage
  
  - Add LICENSE
  - Use pkg-message instead of manual echo
  - Add DOCS option
  
  PR:		193170
  Submitted by:	Ports Fury

Added:
  head/www/larbin/files/pkg-message.in   (contents, props changed)
Modified:
  head/www/larbin/Makefile

Modified: head/www/larbin/Makefile
==============================================================================
--- head/www/larbin/Makefile	Sun Aug 31 13:46:37 2014	(r366762)
+++ head/www/larbin/Makefile	Sun Aug 31 13:48:24 2014	(r366763)
@@ -8,23 +8,24 @@ CATEGORIES=	www
 MASTER_SITES=	SF
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	Powerful HTTP crawler with an easy interface
+COMMENT=	HTTP crawler with an easy interface
+
+LICENSE=	GPLv2
 
 BUILD_DEPENDS=	bash:${PORTSDIR}/shells/bash \
 		makedepend:${PORTSDIR}/devel/makedepend
 
-OPTIONS_DEFINE=	DOCS
-
-USES=		shebangfix gmake
+USES=		gmake shebangfix
 SHEBANG_FILES=	configure
 GNU_CONFIGURE=	yes
 MAKE_JOBS_UNSAFE=	yes
 
+SUB_FILES=	pkg-message
+
 PORTDOCS=	*
 PLIST_FILES=	bin/larbin etc/larbin.conf.sample
 
-NO_STAGE=	yes
-.include <bsd.port.options.mk>
+OPTIONS_DEFINE=	DOCS
 
 pre-everything::
 	@${ECHO_MSG} "====================================================================="
@@ -34,6 +35,9 @@ pre-everything::
 	@${ECHO_MSG} ""
 	@${ECHO_MSG} "====================================================================="
 
+post-extract:
+	@(cd ${WRKSRC}/src/utils && ${MV} string.h mystring.h)
+
 post-patch:
 	@${REINPLACE_CMD} -e \
 		'/CC=/s|echo|${TRUE:T}| ; \
@@ -46,24 +50,22 @@ post-patch:
 		 s|-I-||' ${WRKSRC}/src/larbin.make
 	@${REINPLACE_CMD} -e \
 		'/delete \[\] tab/s|^|//|' ${WRKSRC}/src/utils/histogram.cc
+	@${FIND} ${WRKSRC}/src -name "*.cc" -or -name "*.h" | ${XARGS} \
+		${REINPLACE_CMD} -e \
+		's|utils/string.h|utils/mystring.h| ; \
+		 s|<iostream.h>|<iostream>| ; \
+		 s|<string.h>|<cstring>| ; \
+		 s|\([[:blank:]]\)cerr|\1std::cerr|g ; \
+		 s|\([[:blank:]]\)cout|\1std::cout|g ; \
+		 s|\([[:blank:]]\)endl|\1std::endl|g'
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/larbin ${PREFIX}/bin
-	${INSTALL_DATA} ${WRKSRC}/larbin.conf ${PREFIX}/etc/larbin.conf.sample
-.if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
-.endif
-
-post-install:
-	@${ECHO_MSG} "====================================================================="
-	@${ECHO_MSG} ""
-	@${ECHO_MSG} "You must invoke larbin with the name of the configuration file, e.g:"
-	@${ECHO_MSG} "larbin -c config-file"
-	@${ECHO_MSG} ""
-	@${ECHO_MSG} "Documentation: ${DOCSDIR}"
-	@${ECHO_MSG} "Sample Configuration file: ${PREFIX}/etc/larbin.conf.sample"
-	@${ECHO_MSG} ""
-	@${ECHO_MSG} "====================================================================="
+	(cd ${WRKSRC} && ${INSTALL_PROGRAM} larbin \
+		${STAGEDIR}${PREFIX}/bin)
+	(cd ${WRKSRC} && ${INSTALL_DATA} larbin.conf \
+		${STAGEDIR}${PREFIX}/etc/larbin.conf.sample)
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	(cd ${WRKSRC}/doc && ${INSTALL_DATA} * \
+		${STAGEDIR}${DOCSDIR})
 
 .include <bsd.port.mk>

Added: head/www/larbin/files/pkg-message.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/larbin/files/pkg-message.in	Sun Aug 31 13:48:24 2014	(r366763)
@@ -0,0 +1,9 @@
+=====================================================================
+
+You must invoke larbin with the name of the configuration file, e.g:
+larbin -c config-file
+
+Documentation: %%DOCSDIR%%
+Configuration file: %%PREFIX%%/etc/larbin.conf.sample
+
+=====================================================================



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