aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/hawk
diff options
context:
space:
mode:
authorsunpoet <sunpoet@FreeBSD.org>2014-05-30 13:31:46 +0800
committersunpoet <sunpoet@FreeBSD.org>2014-05-30 13:31:46 +0800
commitd8932d0c40e90e9270917671380b517caed7fc85 (patch)
treeb079d2d9f5cf6184ae3e4e4819158b7993ab8f00 /net-mgmt/hawk
parent565893039188db245d62c68abdc2381ba7ce4efc (diff)
downloadfreebsd-ports-gnome-d8932d0c40e90e9270917671380b517caed7fc85.tar.gz
freebsd-ports-gnome-d8932d0c40e90e9270917671380b517caed7fc85.tar.zst
freebsd-ports-gnome-d8932d0c40e90e9270917671380b517caed7fc85.zip
- 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>
Diffstat (limited to 'net-mgmt/hawk')
-rw-r--r--net-mgmt/hawk/Makefile72
-rw-r--r--net-mgmt/hawk/files/pkg-message.in8
-rw-r--r--net-mgmt/hawk/pkg-plist6
3 files changed, 39 insertions, 47 deletions
diff --git a/net-mgmt/hawk/Makefile b/net-mgmt/hawk/Makefile
index 8f3fb6d80767..0c13b3e5d0d3 100644
--- a/net-mgmt/hawk/Makefile
+++ b/net-mgmt/hawk/Makefile
@@ -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>
diff --git a/net-mgmt/hawk/files/pkg-message.in b/net-mgmt/hawk/files/pkg-message.in
new file mode 100644
index 000000000000..ccdaddd73521
--- /dev/null
+++ b/net-mgmt/hawk/files/pkg-message.in
@@ -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. ****
+******************************************************************************
+
diff --git a/net-mgmt/hawk/pkg-plist b/net-mgmt/hawk/pkg-plist
index 6237ccc9c93c..ead3f7ea4b4c 100644
--- a/net-mgmt/hawk/pkg-plist
+++ b/net-mgmt/hawk/pkg-plist
@@ -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%%