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