Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jul 2014 19:52:12 +0000 (UTC)
From:      Pawel Pekala <pawel@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r361127 - in head/sysutils/apcpwr: . files
Message-ID:  <201407071952.s67JqCjW070582@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pawel
Date: Mon Jul  7 19:52:11 2014
New Revision: 361127
URL: http://svnweb.freebsd.org/changeset/ports/361127
QAT: https://qat.redports.org/buildarchive/r361127/

Log:
  - Add staging support
  - Fix perl shebang
  - Use SUB_FILES for pkg-message substitutions

Added:
  head/sysutils/apcpwr/files/
  head/sysutils/apcpwr/files/pkg-message.in
     - copied unchanged from r360738, head/sysutils/apcpwr/pkg-message
Deleted:
  head/sysutils/apcpwr/pkg-message
Modified:
  head/sysutils/apcpwr/Makefile

Modified: head/sysutils/apcpwr/Makefile
==============================================================================
--- head/sysutils/apcpwr/Makefile	Mon Jul  7 19:49:26 2014	(r361126)
+++ head/sysutils/apcpwr/Makefile	Mon Jul  7 19:52:11 2014	(r361127)
@@ -3,6 +3,7 @@
 
 PORTNAME=		apcpwr
 PORTVERSION=		1.3
+PORTREVISION=		1
 CATEGORIES=		sysutils net
 MASTER_SITES=		${MASTER_SITE_LOCAL}
 MASTER_SITE_SUBDIR=	jwd
@@ -12,13 +13,16 @@ COMMENT=	Control APC 9211 MasterSwitchs 
 
 RUN_DEPENDS=	snmpwalk:${PORTSDIR}/net-mgmt/net-snmp
 
-PLIST_FILES=	bin/apcpwr etc/apcpwr.conf.dist
-MAN8=		apcpwr.8
+USES=		shebangfix
+SHEBANG_FILES=	apcpwr.pl
 
-NO_STAGE=	yes
-post-install:
-	@ ${ECHO}
-	@ ${SED} -e "s:%%PREFIX%%:${PREFIX}:g" pkg-message | fmt
-	@ ${ECHO}
+SUB_FILES=	pkg-message
+
+PLIST_FILES=	bin/apcpwr etc/apcpwr.conf.dist man/man8/apcpwr.8.gz
+
+do-install:
+	${INSTALL} -m 4555 ${WRKSRC}/apcpwr ${STAGEDIR}${PREFIX}/bin
+	${INSTALL} -m 600 ${WRKSRC}/apcpwr.conf.dist ${STAGEDIR}${PREFIX}/etc
+	${INSTALL_MAN} ${WRKSRC}/apcpwr.8 ${STAGEDIR}${MANPREFIX}/man/man8
 
 .include <bsd.port.mk>

Copied: head/sysutils/apcpwr/files/pkg-message.in (from r360738, head/sysutils/apcpwr/pkg-message)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/apcpwr/files/pkg-message.in	Mon Jul  7 19:52:11 2014	(r361127, copy of r360738, head/sysutils/apcpwr/pkg-message)
@@ -0,0 +1,13 @@
+Please copy the file
+%%PREFIX%%/etc/apcpwr.conf.dist
+to
+%%PREFIX%%/etc/apcpwr.conf
+and make the appropriate changes.
+It is suggested that apcpwr.conf only be readable by root as
+it contains the read/write community strings required to
+communicate with the APC MasterSwitch.
+
+WARNING: WARNING WARNING WARNING WARNING WARNING WARNING
+
+This port is usable only by root unless the perl utility
+program /usr/bin/suidperl is installed with setuid permissions.



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