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

(-)cacti.new/Makefile (-49 / +69 lines)
Lines 5-71 Link Here
5
# $FreeBSD: ports/net/cacti/Makefile,v 1.33 2007/02/25 16:50:19 sem Exp $
5
# $FreeBSD: ports/net/cacti/Makefile,v 1.33 2007/02/25 16:50:19 sem Exp $
6
#
6
#
7
7
8
PORTNAME=	cacti
8
PORTNAME=		cacti
9
PORTVERSION=	0.8.6j${PATCHLEVEL}
9
PORTVERSION=		0.8.6j${PATCHLEVEL}
10
PORTREVISION=	1
10
PORTREVISION=		1
11
CATEGORIES=	net www
11
CATEGORIES=		net www
12
MASTER_SITES=	http://www.cacti.net/downloads/
12
MASTER_SITES=		http://www.cacti.net/downloads/
13
DISTNAME=	${PORTNAME}-${SITEDISTVERSION}
13
DISTFILES=		${PORTNAME}-${SITEDISTVERSION}.tar.gz
14
15
MAINTAINER=	sem@FreeBSD.org
16
COMMENT=	Web-driven graphing interface for RRDTool
17
14
18
# Vendor's patches
15
# Vendor's patches
19
PATCH_SITES=	http://www.cacti.net/downloads/patches/${SITEDISTVERSION}/
16
PATCH_SITES=		http://www.cacti.net/downloads/patches/${SITEDISTVERSION}/
20
PATCHFILES=	ping_php_version4_snmpgetnext.patch \
17
PATCHFILES=		ping_php_version4_snmpgetnext.patch \
21
		tree_console_missing_hosts.patch \
18
			tree_console_missing_hosts.patch \
22
		thumbnail_graphs_not_working.patch
19
			thumbnail_graphs_not_working.patch
23
PATCHLEVEL=	.3
20
PATCH_DIST_STRIP=	-p1
24
SITEDISTVERSION=	${PORTVERSION:S/${PATCHLEVEL}$//}
21
25
22
MAINTAINER=		sem@FreeBSD.org
26
PATCH_DIST_STRIP=-p1
23
COMMENT=		Web-driven graphing interface for RRDTool
24
25
RUN_DEPENDS=		rrdtool:${PORTSDIR}/net/rrdtool
26
27
PATCH_STRIP=		-p1
28
PATCHLEVEL=		.3
29
USE_MYSQL=		yes
30
USE_PHP=		mysql pcre session snmp xml
31
WANT_PHP_WEB=		yes
32
NO_BUILD=		yes
33
PKGMESSAGE=		${WRKDIR}/pkg-message
34
PKGINSTALL=		${WRKDIR}/pkg-install
35
SUB_FILES=		pkg-message pkg-install
36
37
CACTIDIR?=		share/cacti
38
CACTIUSER?=		cacti
39
CACTIGROUP?=		${CACTIUSER}
40
WRKSRC=			${WRKDIR}/${PORTNAME}-${SITEDISTVERSION}
27
41
28
RUN_DEPENDS=	rrdtool:${PORTSDIR}/net/rrdtool
42
OPTIONS=		PLUGIN_ARCH "With plugin architecture" On
29
30
USE_MYSQL=	yes
31
USE_PHP=	mysql pcre session snmp xml
32
WANT_PHP_WEB=	yes
33
NO_BUILD=	yes
34
PKGMESSAGE=	${WRKDIR}/pkg-message
35
PKGINSTALL=	${WRKDIR}/pkg-install
36
SUB_FILES=	pkg-message pkg-install
37
38
CACTIDIR?=	share/cacti
39
CACTIUSER?=	cacti
40
CACTIGROUP?=	${CACTIUSER}
41
PLIST_SUB+=	CACTIDIR=${CACTIDIR}
42
SUB_LIST+=	CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} \
43
		CACTIGROUP=${CACTIGROUP}
44
43
45
.include <bsd.port.pre.mk>
44
.include <bsd.port.pre.mk>
46
45
46
SITEDISTVERSION=	${PORTVERSION:S/${PATCHLEVEL}$//}
47
# Extra patches
48
.if !defined(WITHOUT_PLUGIN_ARCH)
49
MASTER_SITES+=		http://cactiusers.org/downloads/:plugin
50
DISTFILES+=		cacti-plugin-arch.tar.gz:plugin
51
EXTRA_PATCHES+=		${WRKDIR}/${PORTNAME}-plugin-${SITEDISTVERSION}.diff
52
PLIST_SUB+=		PLUGIN=""
53
.else
54
PLIST_SUB+=		PLUGIN="@comment "
55
.endif
56
57
PLIST_SUB+=		CACTIDIR=${CACTIDIR}
58
SUB_LIST+=		CACTIDIR=${CACTIDIR} \
59
			CACTIUSER=${CACTIUSER} \
60
			CACTIGROUP=${CACTIGROUP}
61
62
.if !defined(WITHOUT_PLUGIN_ARCH)
63
post-extract:
64
			@${CP} ${WRKDIR}/cacti-plugin-arch/${PORTNAME}-plugin-${SITEDISTVERSION}.diff ${WRKDIR}
65
.endif
66
47
post-patch:
67
post-patch:
48
	@${FIND} ${WRKSRC} -name \*.orig -delete; \
68
			@${FIND} ${WRKSRC} -name \*.orig -delete; \
49
	${MV} ${WRKSRC}/include/db-settings.php ${WRKSRC}/include/db-settings.php.orig
69
			${MV} ${WRKSRC}/include/db-settings.php ${WRKSRC}/include/db-settings.php.orig
50
	${MV} ${WRKSRC}/include/config.php ${WRKSRC}/include/config.php.orig
70
			${MV} ${WRKSRC}/include/config.php ${WRKSRC}/include/config.php.orig
51
71
52
pre-install:
72
pre-install:
53
	@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL; \
73
			@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
54
74
55
do-install:
75
do-install:
56
	@${MKDIR} ${PREFIX}/${CACTIDIR}; \
76
			@${MKDIR} ${PREFIX}/${CACTIDIR}; \
57
	${CP} -R ${WRKSRC}/* ${PREFIX}/${CACTIDIR}/; \
77
			${CP} -R ${WRKSRC}/* ${PREFIX}/${CACTIDIR}/; \
58
	if [ ! -f ${PREFIX}/${CACTIDIR}/include/db-settings.php ]; then \
78
		    	if [ ! -f ${PREFIX}/${CACTIDIR}/include/db-settings.php ]; then \
59
		${CP} ${PREFIX}/${CACTIDIR}/include/db-settings.php.orig \
79
			    ${CP} ${PREFIX}/${CACTIDIR}/include/db-settings.php.orig \
60
			${PREFIX}/${CACTIDIR}/include/db-settings.php; \
80
				${PREFIX}/${CACTIDIR}/include/db-settings.php; \
61
	fi
81
			fi
62
	@if [ ! -f ${PREFIX}/${CACTIDIR}/include/config.php ]; then \
82
			@if [ ! -f ${PREFIX}/${CACTIDIR}/include/config.php ]; then \
63
		${CP} ${PREFIX}/${CACTIDIR}/include/config.php.orig \
83
			    ${CP} ${PREFIX}/${CACTIDIR}/include/config.php.orig \
64
			${PREFIX}/${CACTIDIR}/include/config.php; \
84
			    	${PREFIX}/${CACTIDIR}/include/config.php; \
65
	fi
85
			fi
66
86
67
post-install:
87
post-install:
68
	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
88
		    	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
69
	@${CAT} ${PKGMESSAGE}
89
		    	@${CAT} ${PKGMESSAGE}
70
90
71
.include <bsd.port.post.mk>
91
.include <bsd.port.post.mk>
(-)cacti.new/distinfo (+3 lines)
Lines 1-6 Link Here
1
MD5 (cacti-0.8.6j.tar.gz) = 29436be46b289d13dfce48e7618129e2
1
MD5 (cacti-0.8.6j.tar.gz) = 29436be46b289d13dfce48e7618129e2
2
SHA256 (cacti-0.8.6j.tar.gz) = 0ddf8a740a5725de67eeea71c38433447ff75388e6e399ce92ccadc36d25bd46
2
SHA256 (cacti-0.8.6j.tar.gz) = 0ddf8a740a5725de67eeea71c38433447ff75388e6e399ce92ccadc36d25bd46
3
SIZE (cacti-0.8.6j.tar.gz) = 1126337
3
SIZE (cacti-0.8.6j.tar.gz) = 1126337
4
MD5 (cacti-plugin-arch.tar.gz) = baaf01f3a863148d6a76510ffc53986d
5
SHA256 (cacti-plugin-arch.tar.gz) = 9d9600912f5bb347cd82a51f966438469676e01748b4b598fd193a1599feed4c
6
SIZE (cacti-plugin-arch.tar.gz) = 263447
4
MD5 (ping_php_version4_snmpgetnext.patch) = bedf583646e59dd628d4aced7e83fdf3
7
MD5 (ping_php_version4_snmpgetnext.patch) = bedf583646e59dd628d4aced7e83fdf3
5
SHA256 (ping_php_version4_snmpgetnext.patch) = 1e19110c696eb56c6de68247c926c5ec7a2e7554df222f39a663556241644170
8
SHA256 (ping_php_version4_snmpgetnext.patch) = 1e19110c696eb56c6de68247c926c5ec7a2e7554df222f39a663556241644170
6
SIZE (ping_php_version4_snmpgetnext.patch) = 1262
9
SIZE (ping_php_version4_snmpgetnext.patch) = 1262
(-)cacti.new/files/patch-include-config.php (-2 / +2 lines)
Lines 1-5 Link Here
1
--- include/config.php.orig	Fri Jan  6 00:27:51 2006
1
--- cacti-0.8.6j/include/config.php.orig	Fri Jan  6 00:27:51 2006
2
+++ include/config.php	Fri Jan  6 00:28:39 2006
2
+++ cacti-0.8.6j/include/config.php	Fri Jan  6 00:28:39 2006
3
@@ -24,7 +24,11 @@
3
@@ -24,7 +24,11 @@
4
  +-------------------------------------------------------------------------+
4
  +-------------------------------------------------------------------------+
5
 */
5
 */
(-)cacti.new/files/patch-include-db-settings.php (-1 / +1 lines)
Lines 1-5 Link Here
1
--- /dev/null	Tue Jun 21 16:31:36 2005
1
--- /dev/null	Tue Jun 21 16:31:36 2005
2
+++ include/db-settings.php	Tue Jun 21 16:29:15 2005
2
+++ cacti-0.8.6j/include/db-settings.php	Tue Jun 21 16:29:15 2005
3
@@ -0,0 +1,9 @@
3
@@ -0,0 +1,9 @@
4
+<?php
4
+<?php
5
+/* make sure these values refect your actual database/host/user/password */
5
+/* make sure these values refect your actual database/host/user/password */
(-)cacti.new/files/patch-scripts-diskfree.pl (-2 / +2 lines)
Lines 1-5 Link Here
1
--- scripts/diskfree.pl.orig	Wed Jan  4 06:08:30 2006
1
--- cacti-0.8.6j/scripts/diskfree.pl.orig	Wed Jan  4 06:08:30 2006
2
+++ scripts/diskfree.pl	Fri Jan  6 00:16:58 2006
2
+++ cacti-0.8.6j/scripts/diskfree.pl	Fri Jan  6 00:16:58 2006
3
@@ -1,5 +1,5 @@
3
@@ -1,5 +1,5 @@
4
 #!/usr/bin/perl
4
 #!/usr/bin/perl
5
-open(PROCESS,"df --block-size=1024 -P $ARGV[0] | grep -v Filesystem |");
5
-open(PROCESS,"df --block-size=1024 -P $ARGV[0] | grep -v Filesystem |");
(-)cacti.new/files/patch-scripts-ping.pl (-2 / +2 lines)
Lines 1-5 Link Here
1
--- scripts/ping.pl.orig	Sat Apr 15 22:26:44 2006
1
--- cacti-0.8.6j/scripts/ping.pl.orig	Sat Apr 15 22:26:44 2006
2
+++ scripts/ping.pl	Sat Apr 15 22:27:16 2006
2
+++ cacti-0.8.6j/scripts/ping.pl	Sat Apr 15 22:27:16 2006
3
@@ -1,6 +1,6 @@
3
@@ -1,6 +1,6 @@
4
 #!/usr/bin/perl 
4
 #!/usr/bin/perl 
5
 
5
 
(-)cacti.new/files/pkg-install.in (-7 / +8 lines)
Lines 3-12 Link Here
3
PW=/usr/sbin/pw
3
PW=/usr/sbin/pw
4
UID=107
4
UID=107
5
GID=${UID}
5
GID=${UID}
6
CACTIUSER=%%CACTIUSER%%
6
CACTIUSER="%%CACTIUSER%%"
7
CACTIGROUP=%%CACTIGROUP%%
7
CACTIGROUP="%%CACTIGROUP%%"
8
CACTIDIR=%%CACTIDIR%%
8
CACTIDIR="%%CACTIDIR%%"
9
PREFIX=%%PREFIX%%
9
PREFIX="%%PREFIX%%"
10
10
11
case $2 in
11
case $2 in
12
12
Lines 39-47 Link Here
39
39
40
POST-INSTALL)
40
POST-INSTALL)
41
41
42
	chown ${CACTIUSER}:${CACTIGROUP} ${PREFIX}/${CACTIDIR}/rra/
42
	chown ${CACTIUSER}:${CACTIGROUP} "${PREFIX}/${CACTIDIR}/rra/"
43
	chown -R ${CACTIUSER}:${CACTIGROUP} ${PREFIX}/${CACTIDIR}/log/
43
	[ -d "${PREFIX}/${CACTIDIR}/log/" ] || mkdir -p "${PREFIX}/${CACTIDIR}/log/"
44
	chmod -R a+r ${PREFIX}/${CACTIDIR}/scripts/
44
	chown -R ${CACTIUSER}:${CACTIGROUP} "${PREFIX}/${CACTIDIR}/log/"
45
	chmod -R a+r "${PREFIX}/${CACTIDIR}/scripts/"
45
	;;
46
	;;
46
*)
47
*)
47
	exit 1
48
	exit 1
(-)cacti.new/pkg-plist (+3 lines)
Lines 144-149 Link Here
144
@unexec cmp -s %D/%%CACTIDIR%%/include/db-settings.php.orig %D/%%CACTIDIR%%/include/db-settings.php && rm -f %D/%%CACTIDIR%%/include/db-settings.php || true
144
@unexec cmp -s %D/%%CACTIDIR%%/include/db-settings.php.orig %D/%%CACTIDIR%%/include/db-settings.php && rm -f %D/%%CACTIDIR%%/include/db-settings.php || true
145
%%CACTIDIR%%/include/db-settings.php.orig
145
%%CACTIDIR%%/include/db-settings.php.orig
146
@exec [ -f %D/%%CACTIDIR%%/include/db-settings.php ] || cp %D/%%CACTIDIR%%/include/db-settings.php.orig %D/%%CACTIDIR%%/include/db-settings.php
146
@exec [ -f %D/%%CACTIDIR%%/include/db-settings.php ] || cp %D/%%CACTIDIR%%/include/db-settings.php.orig %D/%%CACTIDIR%%/include/db-settings.php
147
%%PLUGIN%%%%CACTIDIR%%/include/plugins.php
148
%%PLUGIN%%%%CACTIDIR%%/plugins/index.php
147
%%CACTIDIR%%/include/html/inc_data_source_filter_table.php
149
%%CACTIDIR%%/include/html/inc_data_source_filter_table.php
148
%%CACTIDIR%%/include/html/inc_data_template_filter_table.php
150
%%CACTIDIR%%/include/html/inc_data_template_filter_table.php
149
%%CACTIDIR%%/include/html/inc_device_filter_table.php
151
%%CACTIDIR%%/include/html/inc_device_filter_table.php
Lines 418-423 Link Here
418
@dirrm %%CACTIDIR%%/include/jscalendar
420
@dirrm %%CACTIDIR%%/include/jscalendar
419
@dirrm %%CACTIDIR%%/include/html
421
@dirrm %%CACTIDIR%%/include/html
420
@dirrmtry %%CACTIDIR%%/include
422
@dirrmtry %%CACTIDIR%%/include
423
%%PLUGIN%%@dirrmtry %%CACTIDIR%%/plugins
421
@dirrm %%CACTIDIR%%/images
424
@dirrm %%CACTIDIR%%/images
422
@dirrm %%CACTIDIR%%/docs/text
425
@dirrm %%CACTIDIR%%/docs/text
423
@dirrm %%CACTIDIR%%/docs/pdf
426
@dirrm %%CACTIDIR%%/docs/pdf

Return to bug 110649