summaryrefslogtreecommitdiff
path: root/ports-mgmt
diff options
context:
space:
mode:
authorShaun Amott <shaun@FreeBSD.org>2014-07-04 15:48:37 +0000
committerShaun Amott <shaun@FreeBSD.org>2014-07-04 15:48:37 +0000
commit6acc56d7fb8b272b07b89a1eba08def14cb69b32 (patch)
treecd7844377556d752e408bba3bc1b0b8a6764f380 /ports-mgmt
parentUpdate to 2.15 (diff)
Add staging support.
Notes
Notes: svn path=/head/; revision=360637
Diffstat (limited to 'ports-mgmt')
-rw-r--r--ports-mgmt/portscout/Makefile69
1 files changed, 40 insertions, 29 deletions
diff --git a/ports-mgmt/portscout/Makefile b/ports-mgmt/portscout/Makefile
index 8a4259cd1237..09d0b6f52184 100644
--- a/ports-mgmt/portscout/Makefile
+++ b/ports-mgmt/portscout/Makefile
@@ -20,7 +20,10 @@ NO_BUILD= yes
PORTDOCS= UPDATING portscout-portconfig.txt xml-datasrc-example.xml
-MAN1= portscout.1
+#MAN1= portscout.1
+
+USES= shebangfix
+SHEBANG_FILES= ${WRKSRC}/portscout.pl
RUN_DEPENDS= p5-DBI>=0:${PORTSDIR}/databases/p5-DBI \
p5-Proc-Queue>=0:${PORTSDIR}/devel/p5-Proc-Queue \
@@ -30,15 +33,23 @@ RUN_DEPENDS= p5-DBI>=0:${PORTSDIR}/databases/p5-DBI \
p5-MIME-Lite>=0:${PORTSDIR}/mail/p5-MIME-Lite \
p5-libwww>=0:${PORTSDIR}/www/p5-libwww
-NO_STAGE= yes
+SITE_PERL_REL?=lib/perl5/site_perl/${PERL_VER}
+SITE_PERL?=${LOCALBASE}/${SITE_PERL_REL}
+PLIST_SUB+= PERL_VERSION=${PERL_VERSION} \
+ PERL_VER=${PERL_VER} \
+ PERL_ARCH=${PERL_ARCH} \
+ PERL5_MAN3=lib/perl5/${PERL_VER}/man/man3 \
+ SITE_PERL=${SITE_PERL_REL}
+
+
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MSQLITE3}
-USE_SQLITE= 3
-RUN_DEPENDS+= p5-DBD-SQLite>=0:${PORTSDIR}/databases/p5-DBD-SQLite
+#USE_SQLITE= 3
+#RUN_DEPENDS+= p5-DBD-SQLite>=0:${PORTSDIR}/databases/p5-DBD-SQLite
.elif !defined(WITHOUT_PGSQL)
-USE_PGSQL= yes
-RUN_DEPENDS+= p5-DBD-Pg>=0:${PORTSDIR}/databases/p5-DBD-Pg
+#USE_PGSQL= yes
+#RUN_DEPENDS+= p5-DBD-Pg>=0:${PORTSDIR}/databases/p5-DBD-Pg
.endif
pre-everything::
@@ -63,39 +74,39 @@ post-patch:
@${MV} ${WRKSRC}/docs/*.* ${WRKSRC}
do-install:
- @${MKDIR} ${SITE_PERL}/Portscout
- @${MKDIR} ${SITE_PERL}/Portscout/DataSrc
- @${MKDIR} ${SITE_PERL}/Portscout/SiteHandler
- @${MKDIR} ${SITE_PERL}/Portscout/SQL
- ${INSTALL_SCRIPT} ${WRKSRC}/Portscout/*.pm ${SITE_PERL}/Portscout/
- ${INSTALL_SCRIPT} ${WRKSRC}/Portscout/DataSrc/*.pm ${SITE_PERL}/Portscout/DataSrc/
- ${INSTALL_SCRIPT} ${WRKSRC}/Portscout/SiteHandler/*.pm ${SITE_PERL}/Portscout/SiteHandler/
- ${INSTALL_SCRIPT} ${WRKSRC}/Portscout/SQL/*.pm ${SITE_PERL}/Portscout/SQL/
- ${INSTALL_SCRIPT} ${WRKSRC}/Portscout.pm ${SITE_PERL}/Portscout.pm
- ${INSTALL_SCRIPT} ${WRKSRC}/portscout.pl ${PREFIX}/bin/portscout
-
- ${INSTALL_DATA} ${WRKSRC}/portscout.pod ${SITE_PERL}
+ @${MKDIR} ${STAGEDIR}${SITE_PERL}/Portscout
+ @${MKDIR} ${STAGEDIR}${SITE_PERL}/Portscout/DataSrc
+ @${MKDIR} ${STAGEDIR}${SITE_PERL}/Portscout/SiteHandler
+ @${MKDIR} ${STAGEDIR}${SITE_PERL}/Portscout/SQL
+ ${INSTALL_SCRIPT} ${WRKSRC}/Portscout/*.pm ${STAGEDIR}${SITE_PERL}/Portscout/
+ ${INSTALL_SCRIPT} ${WRKSRC}/Portscout/DataSrc/*.pm ${STAGEDIR}${SITE_PERL}/Portscout/DataSrc/
+ ${INSTALL_SCRIPT} ${WRKSRC}/Portscout/SiteHandler/*.pm ${STAGEDIR}${SITE_PERL}/Portscout/SiteHandler/
+ ${INSTALL_SCRIPT} ${WRKSRC}/Portscout/SQL/*.pm ${STAGEDIR}${SITE_PERL}/Portscout/SQL/
+ ${INSTALL_SCRIPT} ${WRKSRC}/Portscout.pm ${STAGEDIR}${SITE_PERL}/Portscout.pm
+ ${INSTALL_SCRIPT} ${WRKSRC}/portscout.pl ${STAGEDIR}${PREFIX}/bin/portscout
+
+ ${INSTALL_DATA} ${WRKSRC}/portscout.pod ${STAGEDIR}${SITE_PERL}
pod2man ${WRKSRC}/portscout.pod ${WRKSRC}/portscout.1
- ${INSTALL_MAN} ${WRKSRC}/portscout.1 ${MAN1PREFIX}/man/man1/
+ ${INSTALL_MAN} ${WRKSRC}/portscout.1 ${STAGEDIR}${MAN1PREFIX}/man/man1/
- @${MKDIR} ${DATADIR}/templates
+ @${MKDIR} ${STAGEDIR}${DATADIR}/templates
cd ${WRKSRC}/templates \
- && ${INSTALL_DATA} * ${DATADIR}/templates
+ && ${INSTALL_DATA} * ${STAGEDIR}${DATADIR}/templates
- @${MKDIR} ${DATADIR}/sql
- cd ${WRKSRC}/sql && ${INSTALL_DATA} *.sql ${DATADIR}/sql
+ @${MKDIR} ${STAGEDIR}${DATADIR}/sql
+ cd ${WRKSRC}/sql && ${INSTALL_DATA} *.sql ${STAGEDIR}${DATADIR}/sql
- ${INSTALL_DATA} ${WRKSRC}/portscout.conf ${PREFIX}/etc/portscout.conf.sample
+ ${INSTALL_DATA} ${WRKSRC}/portscout.conf ${STAGEDIR}${PREFIX}/etc/portscout.conf.sample
post-install:
- @if [ ! -f ${PREFIX}/etc/portscout.conf ]; then \
- ${CP} -p ${PREFIX}/etc/portscout.conf.sample ${PREFIX}/etc/portscout.conf; \
- fi
+ #@if [ ! -f ${PREFIX}/etc/portscout.conf ]; then \
+ # ${CP} -p ${PREFIX}/etc/portscout.conf.sample ${STAGEDIR}${PREFIX}/etc/portscout.conf; \
+ #fi
.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
. for f in ${PORTDOCS}
- ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
. endfor
.endif