1 # $NetBSD: Makefile,v 1.26 2012/10/23 17:18:41 asau Exp $
4 DISTNAME
= netdisco-1.1_with_mibs
8 MASTER_SITES
= ${MASTER_SITE_SOURCEFORGE
:=netdisco
/}
10 MAINTAINER
= bouyer@NetBSD.org
11 HOMEPAGE
= http
://www.netdisco.org
/
12 COMMENT
= Open Source web-based network management tool
15 DEPENDS
+= p5-SNMP-Info
>=2.04:..
/..
/net
/p5-SNMP-Info
16 DEPENDS
+= p5-Apache-DBI-
[0-9]*:..
/..
/databases
/p5-Apache-DBI
17 DEPENDS
+= p5-Apache-Session-
[0-9]*:..
/..
/www
/p5-Apache-Session
18 DEPENDS
+= p5-DBD-postgresql-
[0-9]*:..
/..
/databases
/p5-DBD-postgresql
19 DEPENDS
+= p5-DB_File-
[0-9]*:..
/..
/databases
/p5-DB_File
20 DEPENDS
+= p5-MasonX-Request-WithApacheSession-
[0-9]*:..
/..
/www
/p5-MasonX-Request-WithApacheSession
21 DEPENDS
+= p5-HTML-Parser-
[0-9]*:..
/..
/www
/p5-HTML-Parser
22 DEPENDS
+= p5-Graph-
[0-9]*:..
/..
/devel
/p5-Graph
23 DEPENDS
+= p5-GraphViz-
[0-9]*:..
/..
/graphics
/p5-GraphViz
24 DEPENDS
+= p5-IO-Compress-
[0-9]*:..
/..
/devel
/p5-IO-Compress
25 DEPENDS
+= p5-Net-NBName-
[0-9]*:..
/..
/net
/p5-Net-NBName
27 WRKSRC
= ${WRKDIR}/${PKGNAME_NOREV}
29 .
include "../../mk/bsd.prefs.mk"
31 USE_TOOLS
+= pax perl
:run
32 REPLACE_PERL
+= bin
/device_to_csv
33 REPLACE_PERL
+= bin
/doc_munge
34 REPLACE_PERL
+= bin
/firewall_arp
35 REPLACE_PERL
+= bin
/parse_kismet_ap
36 REPLACE_PERL
+= bin
/pod_arg_link_fix
37 REPLACE_PERL
+= bin
/search_node.pl
38 REPLACE_PERL
+= bin
/test_cdp.pl
39 REPLACE_PERL
+= bin
/test_fwtable.pl
40 REPLACE_PERL
+= bin
/test_iproute.pl
41 REPLACE_PERL
+= bin
/snmpv3_key
42 REPLACE_PERL
+= netdisco
43 REPLACE_PERL
+= mibs
/chk_dups
44 REPLACE_PERL
+= mibs
/diff_dir
45 REPLACE_PERL
+= mibs
/rm_cisco_dups
46 REPLACE_PERL
+= mibs
/chk_mibs
47 REPLACE_PERL
+= mibs
/snmpwalkmib
48 REPLACE_PERL
+= mibs
/split-extreme
51 SUBST_CLASSES
+= installdir path varbase apachevers
52 SUBST_STAGE.installdir
= pre-configure
53 SUBST_FILES.installdir
= sql
/pg
54 SUBST_FILES.installdir
+= bin
/netdisco_daemon
55 SUBST_FILES.installdir
+= netdisco
56 SUBST_FILES.installdir
+= netdisco.conf netdisco.crontab
57 SUBST_FILES.installdir
+= netdisco_apache.conf netdisco_apache_dir.conf
58 SUBST_FILES.installdir
+= bin
/test_cache.pl bin
/test_cdp.pl
59 SUBST_FILES.installdir
+= bin
/test_dev.pl bin
/test_stats.pl
60 SUBST_FILES.installdir
+= bin
/debian_install.sh
61 SUBST_FILES.installdir
+= bin
/test_fwtable.pl bin
/test_iproute.pl
62 SUBST_FILES.installdir
+= doc
/INSTALL doc
/INSTALL.pod
63 SUBST_FILES.installdir
+= doc
/README.pod doc
/README.html
64 SUBST_FILES.installdir
+= doc
/UPGRADE.pod
65 SUBST_FILES.installdir
+= INSTALL README UPGRADE
66 SUBST_FILES.installdir
+= html
/doc
/README.html
67 SUBST_FILES.installdir
+= html
/admin_reconfig.html
68 SUBST_FILES.installdir
+= netdisco.crontab
69 SUBST_FILES.installdir
+= mibs
/snmp.conf
70 SUBST_SED.installdir
= -e
"s|/usr/local/netdisco|${PREFIX}/netdisco|g"
71 SUBST_MESSAGE.installdir
= Fixing hardcoded
install directory path.
73 SUBST_STAGE.path
= pre-configure
74 SUBST_FILES.path
= bin
/catalyst_mac_vlan.pl bin
/port_control
75 SUBST_FILES.path
+= bin
/test_cache.pl bin
/test_dev.pl bin
/test_stats.pl
76 SUBST_FILES.path
+= bin
/parse_mac
77 SUBST_FILES.path
+= doc
/INSTALL.pod
78 SUBST_FILES.path
+= INSTALL netdisco.crontab
79 SUBST_SED.path
= -e
"s|/usr/local/bin|${PREFIX}/bin|g"
80 SUBST_MESSAGE.path
= Fixing hardcoded path.
82 SUBST_STAGE.varbase
= pre-configure
83 SUBST_FILES.varbase
= netdisco.conf
84 SUBST_SED.varbase
= -e
"s|@VARBASE@|${VARBASE}|g"
85 SUBST_MESSAGE.varbase
= Fixing data directory.
87 NETDISCOUSER?
= netdisco
88 NETDISCOGROUP?
= netdisco
90 PKG_GROUPS_VARS
+= NETDISCOGROUP
91 PKG_USERS_VARS
+= NETDISCOUSER
93 PKG_GROUPS
= ${NETDISCOGROUP}
94 PKG_USERS
= ${NETDISCOUSER
:Q
}:${NETDISCOGROUP
:Q
}
96 PKG_GECOS.
${NETDISCOUSER}= Netdisco administrator
97 PKG_HOME.
${NETDISCOUSER}= ${PREFIX}/netdisco
98 PKG_SHELL.
${NETDISCOUSER}= ${SH}
100 PKG_SYSCONFVAR
= netdisco
101 PKG_SYSCONFDIR.netdisco
= ${PREFIX}/netdisco
102 EGDIR
= ${PREFIX}/share
/examples
/netdisco
103 CONF_FILES
= ${EGDIR
:Q
}/netdisco.conf
${PKG_SYSCONFDIR
:Q
}/netdisco.conf
104 CONF_FILES_PERMS
+= ${EGDIR
:Q
}/netdisco.conf
${PKG_SYSCONFDIR
:Q
}/netdisco.conf \
105 ${NETDISCOUSER} ${NETDISCOGROUP} 0660
106 CONF_FILES
+= ${EGDIR
:Q
}/netdisco-topology.txt
${PKG_SYSCONFDIR
:Q
}/netdisco-topology.txt
108 REQD_DIRS
+= ${PREFIX
:Q
}/netdisco
${EGDIR
:Q
}
109 OWN_DIRS_PERMS
+= ${VARBASE
:Q
}/netdisco
${NETDISCOUSER} ${NETDISCOGROUP} 0775
110 OWN_DIRS_PERMS
+= ${PREFIX
:Q
}/netdisco
/html
${NETDISCOUSER} ${NETDISCOGROUP} 0775
111 OWN_DIRS_PERMS
+= ${PREFIX
:Q
}/netdisco
/mason
${NETDISCOUSER} ${APACHE_GROUP} 0775
113 RCD_SCRIPTS
= netdisco
114 RCD_SCRIPT_SRC.netdisco
= ${WRKSRC
:Q
}/bin
/netdisco_daemon
116 .
include "../../mk/apache.mk"
118 .if
${PKG_APACHE} == "apache13"
119 SUBST_STAGE.apachevers
= pre-configure
120 SUBST_FILES.apachevers
= netdisco_apache.conf
121 SUBST_SED.apachevers
= -e
"s|@APACHE2@|\#uncomment for apache2|g"
122 SUBST_MESSAGE.apachevers
= Fixing config files for apache-1.3
123 .elif
${PKG_APACHE} == "apache2"
124 SUBST_STAGE.apachevers
= pre-configure
125 SUBST_FILES.apachevers
= netdisco_apache.conf
126 SUBST_SED.apachevers
= -e
"s|@APACHE2@||g"
127 SUBST_MESSAGE.apachevers
= Fixing config files for apache-2
131 ${RM} -f
${WRKSRC
:Q
}/html
/doc
/ChangeLog.txt
132 ${RM} -f
${WRKSRC
:Q
}/Makefile
134 for i in INSTALL README README-API-BACKEND README-API-SHARED \
135 UPGRADE ChangeLog
; do \
136 ${RM} -f
${WRKSRC
:Q
}/doc
/"$$i"; \
137 ${MV} ${WRKSRC
:Q
}/"$$i" ${WRKSRC
:Q
}/doc
/; \
140 ${FIND} . \
( -name
'*.orig' -o
-name
'*.bak' \
) -print |
${XARGS} ${RM} -f
143 ${RM} -f
${WRKSRC
:Q
}/bin
/netdisco_daemon
144 cd
${WRKSRC
:Q
} && pax
-rw
-pp .
${DESTDIR}${PREFIX
:Q
}/netdisco
145 mkdir
${DESTDIR}${EGDIR}
148 for i in netdisco.conf netdisco-topology.txt netdisco.crontab \
149 netdisco_apache.conf netdisco_apache_dir.conf
; do \
150 ${MV} ${DESTDIR}${PREFIX
:Q
}/netdisco
/"$$i" ${DESTDIR}${EGDIR
:Q
}/ ;\
153 .
include "../../mk/bsd.pkg.mk"