aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt
diff options
context:
space:
mode:
authorlth <lth@FreeBSD.org>2010-01-25 02:51:29 +0800
committerlth <lth@FreeBSD.org>2010-01-25 02:51:29 +0800
commite8c9423d07f708755392e185e5a43e68f57bd64c (patch)
treef753e12cf1605cad8cda655676c41ff69012ee69 /net-mgmt
parent38c4e48a9b789a8411375cee79797b8fed575a3e (diff)
downloadfreebsd-ports-gnome-e8c9423d07f708755392e185e5a43e68f57bd64c.tar.gz
freebsd-ports-gnome-e8c9423d07f708755392e185e5a43e68f57bd64c.tar.zst
freebsd-ports-gnome-e8c9423d07f708755392e185e5a43e68f57bd64c.zip
use $SUB_FILES & $SUB_LIST to dynamically update pkg-install deinstall & message
PR: ports/143172 Submitted by: Sevan Janiyan <venture37@geeklan.co.uk>
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/ifgraph/Makefile18
-rw-r--r--net-mgmt/ifgraph/files/pkg-deinstall.in (renamed from net-mgmt/ifgraph/pkg-deinstall)2
-rw-r--r--net-mgmt/ifgraph/files/pkg-install.in (renamed from net-mgmt/ifgraph/pkg-install)4
-rw-r--r--net-mgmt/ifgraph/files/pkg-message.in (renamed from net-mgmt/ifgraph/pkg-message)0
-rw-r--r--net-mgmt/ifgraph/pkg-plist2
5 files changed, 9 insertions, 17 deletions
diff --git a/net-mgmt/ifgraph/Makefile b/net-mgmt/ifgraph/Makefile
index 14f4b3bf8a2f..ad760ca40bd8 100644
--- a/net-mgmt/ifgraph/Makefile
+++ b/net-mgmt/ifgraph/Makefile
@@ -32,26 +32,19 @@ IFGRAPH_GROUP= ifgraph
PLFILES= find-if.pl ifgraph.pl makegraph.pl
DOCFILES= CHANGELOG INSTALACAO INSTALL TODO LICENSE.TXT MUDANCAS
-FILES_SUB= USER=${IFGRAPH_USER} GROUP=${IFGRAPH_GROUP} \
- PREFIX=${PREFIX} DOCSDIR=${DOCSDIR} \
- PERL=${PERL} LOCALBASE=${LOCALBASE}
+SUB_FILES= crontab pkg-deinstall pkg-install pkg-message
+SUB_LIST= USER=${IFGRAPH_USER} GROUP=${IFGRAPH_GROUP} PERL=${PERL}
pre-install:
- @ ${SED} ${FILES_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
- ${PKGDIR}/pkg-install > ${PKGINSTALL}
@ ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
do-install:
- @ ${SED} ${FILES_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
- ${PKGDIR}/pkg-deinstall > ${PKGDEINSTALL}
- @ ${SED} ${FILES_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
- ${PKGDIR}/pkg-message > ${PKGMESSAGE}
.for plfile in ${PLFILES}
- @ ${SED} ${FILES_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ @ ${SED} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${WRKSRC}/${plfile} > ${WRKDIR}/${plfile}
@ ${INSTALL_SCRIPT} ${WRKDIR}/${plfile} ${PREFIX}/bin
.endfor
- @ ${SED} ${FILES_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ @ ${SED} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${WRKSRC}/ifgraph.conf > ${WRKSRC}/ifgraph.conf.sample
@ ${INSTALL_DATA} ${WRKSRC}/ifgraph.conf.sample ${PREFIX}/etc
@ ${MKDIR} ${PREFIX}/ifgraph
@@ -59,8 +52,7 @@ do-install:
@ ${MKDIR} ${PREFIX}/ifgraph/lib
@ ${CP} ${WRKSRC}/lib/rgb.txt ${PREFIX}/ifgraph/lib
@ ${CP} -Rp ${WRKSRC}/templates ${PREFIX}/ifgraph
- @ ${SED} ${FILES_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
- ${FILESDIR}/crontab.in > ${PREFIX}/ifgraph/crontab.in
+ @ ${INSTALL_DATA} ${WRKDIR}/crontab ${PREFIX}/ifgraph/crontab
@ ${CHOWN} -R ifgraph:ifgraph ${PREFIX}/ifgraph
@ ${MKDIR} ${PREFIX}/var/ifgraph
@ ${CHOWN} ifgraph:ifgraph ${PREFIX}/var/ifgraph
diff --git a/net-mgmt/ifgraph/pkg-deinstall b/net-mgmt/ifgraph/files/pkg-deinstall.in
index 5724a05f20ff..8c58d2e1603f 100644
--- a/net-mgmt/ifgraph/pkg-deinstall
+++ b/net-mgmt/ifgraph/files/pkg-deinstall.in
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $FreeBSD$
+# $FreeBSD: /tmp/pcvs/ports/net-mgmt/ifgraph/files/pkg-deinstall.in,v 1.1 2010-01-24 18:51:29 lth Exp $
#
PATH=/bin:/usr/bin:/usr/sbin
diff --git a/net-mgmt/ifgraph/pkg-install b/net-mgmt/ifgraph/files/pkg-install.in
index 98d6edc4c506..9cd574dd232d 100644
--- a/net-mgmt/ifgraph/pkg-install
+++ b/net-mgmt/ifgraph/files/pkg-install.in
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $FreeBSD$
+# $FreeBSD: /tmp/pcvs/ports/net-mgmt/ifgraph/files/pkg-install.in,v 1.1 2010-01-24 18:51:29 lth Exp $
#
PATH=/bin:/usr/bin:/usr/sbin
@@ -44,7 +44,7 @@ POST-INSTALL)
fi
echo "---> Creating crontab(5) file for user \"%%USER%%\""
- crontab -u "%%USER%%" "%%PREFIX%%/ifgraph/crontab.in" || exit 1
+ crontab -u "%%USER%%" "%%PREFIX%%/ifgraph/crontab" || exit 1
;;
diff --git a/net-mgmt/ifgraph/pkg-message b/net-mgmt/ifgraph/files/pkg-message.in
index 043a08c75042..043a08c75042 100644
--- a/net-mgmt/ifgraph/pkg-message
+++ b/net-mgmt/ifgraph/files/pkg-message.in
diff --git a/net-mgmt/ifgraph/pkg-plist b/net-mgmt/ifgraph/pkg-plist
index 26c1f5c8141f..07e7b372076a 100644
--- a/net-mgmt/ifgraph/pkg-plist
+++ b/net-mgmt/ifgraph/pkg-plist
@@ -5,7 +5,7 @@ bin/find-if.pl
bin/ifgraph.pl
bin/makegraph.pl
etc/ifgraph.conf.sample
-ifgraph/crontab.in
+ifgraph/crontab
ifgraph/lib/rgb.txt
ifgraph/templates/en/if-data.html
ifgraph/templates/en/if-header.html