Bug 190311 - [PATCH] net-mgmt/hawk: Add STAGE support, take maintainership
Summary: [PATCH] net-mgmt/hawk: Add STAGE support, take maintainership
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-27 16:20 UTC by Muhammad Moinur Rahman
Modified: 2014-05-30 06:40 UTC (History)
0 users

See Also:


Attachments
hawk-0.6.patch (4.97 KB, patch)
2014-05-27 16:20 UTC, Muhammad Moinur Rahman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Muhammad Moinur Rahman freebsd_committer freebsd_triage 2014-05-27 16:20:00 UTC
- Add STAGE support
- Add LICENSE
- Take maintainership

For Committer's reference:
http://pdr.s.ubze.ro/bulk/latest-per-pkg/hawk/0.6_2/

Generated with FreeBSD Port Tools 1.02 (mode: change, diff: ports)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-05-27 16:20:04 UTC
Responsible Changed
From-To: freebsd-ports-bugs->sunpoet

sunpoet@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2014-05-30 06:31:51 UTC
Author: sunpoet
Date: Fri May 30 05:31:46 2014
New Revision: 355780
URL: http://svnweb.freebsd.org/changeset/ports/355780
QAT: https://qat.redports.org/buildarchive/r355780/

Log:
  - Add LICENSE
  - Use ETCDIR
  - Support STAGEDIR
  - Pass maintainership to submitter
  - While I'm here:
    - Use NO_BUILD
    - Simplify Makefile
  
  PR:		ports/190311
  Submitted by:	Muhammad Moinur Rahman <5u623l20@gmail.com>

Added:
  head/net-mgmt/hawk/files/pkg-message.in   (contents, props changed)
Modified:
  head/net-mgmt/hawk/Makefile
  head/net-mgmt/hawk/pkg-plist

Modified: head/net-mgmt/hawk/Makefile
==============================================================================
--- head/net-mgmt/hawk/Makefile	Fri May 30 05:31:39 2014	(r355779)
+++ head/net-mgmt/hawk/Makefile	Fri May 30 05:31:46 2014	(r355780)
@@ -2,69 +2,53 @@
 
 PORTNAME=	hawk
 PORTVERSION=	0.6
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	net-mgmt
 MASTER_SITES=	SF/iphawk/iphawk/Hawk%20${PORTVERSION}/
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	5u623l20@gmail.com
 COMMENT=	Track uptime and DNS status for machines on your networks
 
-RUN_DEPENDS=	p5-Net-Netmask>0:${PORTSDIR}/net-mgmt/p5-Net-Netmask \
-		p5-Net-Ping-External>0:${PORTSDIR}/net/p5-Net-Ping-External \
-		p5-DBI>0:${PORTSDIR}/databases/p5-DBI \
-		p5-DBD-mysql>0:${PORTSDIR}/databases/p5-DBD-mysql
+LICENSE=	GPLv2
+
+RUN_DEPENDS=	p5-Net-Netmask>=0:${PORTSDIR}/net-mgmt/p5-Net-Netmask \
+		p5-Net-Ping-External>=0:${PORTSDIR}/net/p5-Net-Ping-External \
+		p5-DBI>=0:${PORTSDIR}/databases/p5-DBI \
+		p5-DBD-mysql>=0:${PORTSDIR}/databases/p5-DBD-mysql
 
 USES=		perl5
 USE_MYSQL=	server
 USE_PHP=	mysql
 WANT_PHP_MOD=	yes
 
+NO_BUILD=	yes
 USE_RC_SUBR=	hawk
 
 SUB_LIST=	PERL=${PERL}
+SUB_FILES=	pkg-message
 
-NO_STAGE=	yes
-post-patch:
-	@${SED} -e 's#%%PREFIX%%#${PREFIX}#' \
-	    ${WRKSRC}/daemon/hawk > ${WRKSRC}/daemon/hawk.sed
-	@${MV} ${WRKSRC}/daemon/hawk.sed ${WRKSRC}/daemon/hawk
-	@${SED} -e 's#hawk.conf.inc#${PREFIX}/etc/hawk/php.conf#' \
-	    ${WRKSRC}/php/hawk.php > ${WRKSRC}/php/hawk.php.sed
-	@${MV} ${WRKSRC}/php/hawk.php.sed ${WRKSRC}/php/hawk.php
+OPTIONS_DEFINE=	DOCS
 
-do-build:
-# Empty target, nothing to build
+post-patch:
+	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' \
+	    ${WRKSRC}/daemon/hawk
+	@${REINPLACE_CMD} -e 's|hawk.conf.inc|${PREFIX}/etc/hawk/php.conf|' \
+	    ${WRKSRC}/php/hawk.php
 
 do-install:
-	${MKDIR} ${PREFIX}/etc/hawk
-	${INSTALL_DATA} ${WRKSRC}/daemon/hawk.conf ${PREFIX}/etc/hawk/daemon.conf.sample
-	${INSTALL_SCRIPT} ${WRKSRC}/daemon/hawk ${PREFIX}/sbin
-	${MKDIR} ${WWWDIR}/images
+	${MKDIR} ${STAGEDIR}${ETCDIR}
+	${INSTALL_DATA} ${WRKSRC}/daemon/hawk.conf ${STAGEDIR}${ETCDIR}/daemon.conf.sample
+	${INSTALL_SCRIPT} ${WRKSRC}/daemon/hawk ${STAGEDIR}${PREFIX}/sbin
+	${MKDIR} ${STAGEDIR}${WWWDIR}/images
 	(for f in ${WRKSRC}/php/images/* ${FILESDIR}/favicon.ico; do \
-		${INSTALL_DATA} $$f ${WWWDIR}/images; \
+		${INSTALL_DATA} $$f ${STAGEDIR}${WWWDIR}/images; \
 	done)
-	${INSTALL_DATA} ${WRKSRC}/php/hawk.php ${WWWDIR}
-	${INSTALL_DATA} ${WRKSRC}/php/hawk.css ${WWWDIR}
-	${INSTALL_DATA} ${WRKSRC}/php/hawk.conf.inc \
-	    ${PREFIX}/etc/hawk/php.conf.sample
-.if !defined(NOPORTDOCS)
-	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
-	${INSTALL_DATA} ${FILESDIR}/create_hawk_db.sql ${DOCSDIR}
-	${INSTALL_DATA} ${FILESDIR}/create_hawk_user.sql ${DOCSDIR}
-.endif
-
-PKGMESSAGE=	${WRKDIR}/pkg-message
-
-post-install:
-	@${ECHO} '******************************************************************************' > ${PKGMESSAGE}
-	@${ECHO} '***    See ${PREFIX}/share/doc/hawk/create_hawk* for instructions on	   ***' >> ${PKGMESSAGE}
-	@${ECHO} '***    creating the database and user that the PHP code expects.	   ***' >> ${PKGMESSAGE}
-	@${ECHO} '***									   ***' >> ${PKGMESSAGE}
-	@${ECHO} '***    Copy daemon.conf.sample and php.conf.sample to their non-sample     ***' >> ${PKGMESSAGE}
-	@${ECHO} '***    names in ${PREFIX}/etc/hawk, and configure local networks, etc.    ***' >> ${PKGMESSAGE}
-	@${ECHO} '******************************************************************************' >> ${PKGMESSAGE}
-
-	@${CAT} ${PKGMESSAGE}
+	${INSTALL_DATA} ${WRKSRC}/php/hawk.php ${STAGEDIR}${WWWDIR}
+	${INSTALL_DATA} ${WRKSRC}/php/hawk.css ${STAGEDIR}${WWWDIR}
+	${INSTALL_DATA} ${WRKSRC}/php/hawk.conf.inc ${STAGEDIR}${ETCDIR}/php.conf.sample
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${FILESDIR}/create_hawk_db.sql ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${FILESDIR}/create_hawk_user.sql ${STAGEDIR}${DOCSDIR}
 
 .include <bsd.port.mk>

Added: head/net-mgmt/hawk/files/pkg-message.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/hawk/files/pkg-message.in	Fri May 30 05:31:46 2014	(r355780)
@@ -0,0 +1,8 @@
+******************************************************************************
+****    See %%PREFIX%%/share/doc/hawk/create_hawk* for instructions on    ****
+****    creating the database and user that the PHP code expects.         ****
+****                                                                      ****
+****    Copy daemon.conf.sample and php.conf.sample to their non-sample   ****
+****    names in %%ETCDIR%% and configure local networks, etc.            ****
+******************************************************************************
+

Modified: head/net-mgmt/hawk/pkg-plist
==============================================================================
--- head/net-mgmt/hawk/pkg-plist	Fri May 30 05:31:39 2014	(r355779)
+++ head/net-mgmt/hawk/pkg-plist	Fri May 30 05:31:46 2014	(r355780)
@@ -1,5 +1,5 @@
-etc/hawk/daemon.conf.sample
-etc/hawk/php.conf.sample
+%%ETCDIR%%/daemon.conf.sample
+%%ETCDIR%%/php.conf.sample
 sbin/hawk
 %%WWWDIR%%/images/bluesphere.png
 %%WWWDIR%%/images/favicon.ico
@@ -15,6 +15,6 @@ sbin/hawk
 %%PORTDOCS%%%%DOCSDIR%%/create_hawk_db.sql
 %%PORTDOCS%%%%DOCSDIR%%/create_hawk_user.sql
 %%PORTDOCS%%@dirrm %%DOCSDIR%%
-@dirrmtry etc/hawk
+@dirrmtry %%ETCDIR%%
 @dirrm %%WWWDIR%%/images
 @dirrm %%WWWDIR%%
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Po-Chuan Hsieh freebsd_committer freebsd_triage 2014-05-30 06:33:56 UTC
State Changed
From-To: open->closed

Committed. Thanks!