View | Details | Raw Unified | Return to bug 120968
Collapse All | Expand All

(-)vnstat/Makefile (-1 / +1 lines)
Lines 25-31 Link Here
25
post-extract:
25
post-extract:
26
	@cd ${WRKSRC} && ${CP} cron/vnstat vnstat-cron
26
	@cd ${WRKSRC} && ${CP} cron/vnstat vnstat-cron
27
	@${REINPLACE_CMD} -e 's|/usr/bin|/usr/local/bin|g' \
27
	@${REINPLACE_CMD} -e 's|/usr/bin|/usr/local/bin|g' \
28
		${WRKSRC}/vnstat-cron
28
		-e 's|/var/lib|/var/db|g' ${WRKSRC}/vnstat-cron
29
29
30
post-install:
30
post-install:
31
.if !defined(NOPORTDOCS)
31
.if !defined(NOPORTDOCS)
(-)vnstat/files/patch-Makefile (-6 / +6 lines)
Lines 1-5 Link Here
1
--- Makefile.orig	2008-02-03 19:23:03.000000000 +0100
1
--- Makefile.orig	2008-02-03 13:23:03.000000000 -0500
2
+++ Makefile	2008-02-19 18:02:58.000000000 +0100
2
+++ Makefile	2008-02-21 19:51:31.000000000 -0500
3
@@ -1,106 +1,29 @@
3
@@ -1,106 +1,29 @@
4
-# bin, man and cron dirs
4
-# bin, man and cron dirs
5
-BIN = $(DESTDIR)/usr/bin
5
-BIN = $(DESTDIR)/usr/bin
Lines 93-101 Link Here
93
-	@if [ `grep -c vnstat /etc/crontab` -eq 0 ]; \
93
-	@if [ `grep -c vnstat /etc/crontab` -eq 0 ]; \
94
-	then cat cron/vnstat >>/etc/crontab; \
94
-	then cat cron/vnstat >>/etc/crontab; \
95
-	sed -i "" -e 's/lib\/vnstat/db\/vnstat/g' -e 's/\/usr\/bin\/vnstat/\/usr\/local\/bin\/vnstat/g' /etc/crontab; \
95
-	sed -i "" -e 's/lib\/vnstat/db\/vnstat/g' -e 's/\/usr\/bin\/vnstat/\/usr\/local\/bin\/vnstat/g' /etc/crontab; \
96
+	@if [ ! -f ${PREFIX}/etc/vnstat.conf ]; \
96
+	@if [ ! -f ${PREFIX}/etc/vnstat.conf.sample ]; \
97
+	then install -m 644 cfg/vnstat.conf ${PREFIX}/etc; \
97
+	then install -m 644 cfg/vnstat.conf ${PREFIX}/etc/vnstat.conf.sample; \
98
+	sed -i "" -e 's/lib/db/g' ${PREFIX}/etc/vnstat.conf; \
98
+	sed -i "" -e 's/lib/db/g' ${PREFIX}/etc/vnstat.conf.sample; \
99
 	fi
99
 	fi
100
 
100
 
101
 # update man page	
101
 # update man page	
Lines 120-123 Link Here
120
-	@echo "The cron entry from /etc/crontab needs to be removed manually."
120
-	@echo "The cron entry from /etc/crontab needs to be removed manually."
121
+	rm -f ${PREFIX}/bin/vnstat
121
+	rm -f ${PREFIX}/bin/vnstat
122
+	rm -f ${PREFIX}/man/man1/vnstat.1*
122
+	rm -f ${PREFIX}/man/man1/vnstat.1*
123
+	rm -f ${PREFIX}/etc/vnstat.conf
123
+	rm -f ${PREFIX}/etc/vnstat.conf.sample
(-)vnstat/files/pkg-message.in (-1 / +2 lines)
Lines 2-8 Link Here
2
vnstat has been installed.
2
vnstat has been installed.
3
3
4
This port neeeds a cron entry. Please copy the contents of:
4
This port neeeds a cron entry. Please copy the contents of:
5
%%DOCSDIR%%/vnstat-cron to your crontab.
5
%%DOCSDIR%%/vnstat-cron to your crontab. A Sample 
6
configuration file has be installed in %%PREFIX%%/etc/
6
7
7
For more information about vnStat use "man vnstat" or visit:
8
For more information about vnStat use "man vnstat" or visit:
8
http://humdi.net/vnstat/
9
http://humdi.net/vnstat/
(-)vnstat/pkg-plist (-2 / +3 lines)
Lines 1-3 Link Here
1
@exec mkdir -p /var/db/vnstat
1
bin/vnstat
2
bin/vnstat
2
etc/vnstat.conf
3
etc/vnstat.conf.sample
3
@unexec rm -rf /var/db/vnstat 2>&1 >/dev/null || true
4
@dirrmtry /var/db/vnstat

Return to bug 120968