| @@ -1,140 +1,141 @@ | | | @@ -1,140 +1,141 @@ |
1 | # $NetBSD: Makefile,v 1.75 2008/11/02 08:30:07 adam Exp $ | | 1 | # $NetBSD: Makefile,v 1.76 2009/02/15 11:31:51 tron Exp $ |
2 | | | 2 | |
3 | DISTNAME= net-snmp-5.4.2.1 | | 3 | DISTNAME= net-snmp-5.4.2.1 |
| | | 4 | PKGREVISION= 1 |
4 | CATEGORIES= net | | 5 | CATEGORIES= net |
5 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=net-snmp/} | | 6 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=net-snmp/} |
6 | | | 7 | |
7 | MAINTAINER= adam@NetBSD.org | | 8 | MAINTAINER= adam@NetBSD.org |
8 | HOMEPAGE= http://www.net-snmp.org/ | | 9 | HOMEPAGE= http://www.net-snmp.org/ |
9 | COMMENT= Extensible SNMP implementation | | 10 | COMMENT= Extensible SNMP implementation |
10 | | | 11 | |
11 | CONFLICTS= ucd-snmp-[0-9]* | | 12 | CONFLICTS= ucd-snmp-[0-9]* |
12 | CONFLICTS+= nocol-[0-9]* # bin/snmpget bin/snmpwalk | | 13 | CONFLICTS+= nocol-[0-9]* # bin/snmpget bin/snmpwalk |
13 | | | 14 | |
14 | USE_LIBTOOL= yes | | 15 | USE_LIBTOOL= yes |
15 | GNU_CONFIGURE= yes | | 16 | GNU_CONFIGURE= yes |
16 | | | 17 | |
17 | MAKE_JOBS_SAFE= NO | | 18 | MAKE_JOBS_SAFE= NO |
18 | | | 19 | |
19 | MAKE_ENV+= OPSYS=${OPSYS} | | 20 | MAKE_ENV+= OPSYS=${OPSYS} |
20 | | | 21 | |
21 | # The self-test of Perl modules only works after installation because perl | | 22 | # The self-test of Perl modules only works after installation because perl |
22 | # can't load the shared libraries from WRKSRC/ | | 23 | # can't load the shared libraries from WRKSRC/ |
23 | # Until this is fixed you can test them after installation by doing | | 24 | # Until this is fixed you can test them after installation by doing |
24 | # `make test TEST_TARGET=perltest' | | 25 | # `make test TEST_TARGET=perltest' |
25 | TEST_TARGET= test | | 26 | TEST_TARGET= test |
26 | | | 27 | |
27 | .include "../../mk/bsd.prefs.mk" | | 28 | .include "../../mk/bsd.prefs.mk" |
28 | | | 29 | |
29 | .if ${OPSYS} == "DragonFly" | | 30 | .if ${OPSYS} == "DragonFly" |
30 | MAKE_ENV+= MIB_SYSTEM_LIBS=-lkinfo | | 31 | MAKE_ENV+= MIB_SYSTEM_LIBS=-lkinfo |
31 | .endif | | 32 | .endif |
32 | | | 33 | |
33 | .if ${OPSYS} == "NetBSD" | | 34 | .if ${OPSYS} == "NetBSD" |
34 | OSVERSION_SPECIFIC= YES | | 35 | OSVERSION_SPECIFIC= YES |
35 | . if empty(CFLAGS:U:M*-Dnetbsd1*) | | 36 | . if empty(CFLAGS:U:M*-Dnetbsd1*) |
36 | CFLAGS+= -Dnetbsd1 | | 37 | CFLAGS+= -Dnetbsd1 |
37 | . endif | | 38 | . endif |
38 | .endif | | 39 | .endif |
39 | | | 40 | |
40 | .if (${OPSYS} == "NetBSD") || !exists(/usr/bin/lpstat) | | 41 | .if (${OPSYS} == "NetBSD") || !exists(/usr/bin/lpstat) |
41 | CONFIGURE_ENV+= ac_cv_path_LPSTAT_PATH=no | | 42 | CONFIGURE_ENV+= ac_cv_path_LPSTAT_PATH=no |
42 | .endif | | 43 | .endif |
43 | | | 44 | |
44 | NET_SNMP_SYS_CONTACT?= default_user@contact.domain | | 45 | NET_SNMP_SYS_CONTACT?= default_user@contact.domain |
45 | NET_SNMP_SYS_LOCATION?= defaultlocation | | 46 | NET_SNMP_SYS_LOCATION?= defaultlocation |
46 | NET_SNMP_PERSISTENTDIR?= ${VARBASE}/net-snmp | | 47 | NET_SNMP_PERSISTENTDIR?= ${VARBASE}/net-snmp |
47 | NET_SNMP_MIBDIRS?= \$$HOME/.snmp/mibs:${PREFIX}/share/snmp/mibs:${PREFIX}/lib/tcl/tnm2.1.10/mibs:/usr/local/share/snmp/mibs | | 48 | NET_SNMP_MIBDIRS?= \$$HOME/.snmp/mibs:${PREFIX}/share/snmp/mibs:${PREFIX}/lib/tcl/tnm2.1.10/mibs:/usr/local/share/snmp/mibs |
48 | | | 49 | |
49 | BUILD_DEFS+= NET_SNMP_SYS_CONTACT | | 50 | BUILD_DEFS+= NET_SNMP_SYS_CONTACT |
50 | BUILD_DEFS+= NET_SNMP_SYS_LOCATION | | 51 | BUILD_DEFS+= NET_SNMP_SYS_LOCATION |
51 | BUILD_DEFS+= NET_SNMP_PERSISTENTDIR | | 52 | BUILD_DEFS+= NET_SNMP_PERSISTENTDIR |
52 | BUILD_DEFS+= NET_SNMP_MIBDIRS | | 53 | BUILD_DEFS+= NET_SNMP_MIBDIRS |
53 | | | 54 | |
54 | CONFIGURE_ARGS+= --enable-shared | | 55 | CONFIGURE_ARGS+= --enable-shared |
55 | CONFIGURE_ARGS+= --with-defaults | | 56 | CONFIGURE_ARGS+= --with-defaults |
56 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} | | 57 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} |
57 | CONFIGURE_ARGS+= --with-libwrap=${BUILDLINK_PREFIX.tcp_wrappers}/lib | | 58 | CONFIGURE_ARGS+= --with-libwrap=${BUILDLINK_PREFIX.tcp_wrappers}/lib |
58 | CONFIGURE_ARGS+= --with-sys-contact=${NET_SNMP_SYS_CONTACT:Q} | | 59 | CONFIGURE_ARGS+= --with-sys-contact=${NET_SNMP_SYS_CONTACT:Q} |
59 | CONFIGURE_ARGS+= --with-sys-location=${NET_SNMP_SYS_LOCATION:Q} | | 60 | CONFIGURE_ARGS+= --with-sys-location=${NET_SNMP_SYS_LOCATION:Q} |
60 | # | | 61 | # |
61 | # NOTE: if you specify a logfile then this file will be written to by | | 62 | # NOTE: if you specify a logfile then this file will be written to by |
62 | # default and although it can be disabled on the command line, the | | 63 | # default and although it can be disabled on the command line, the |
63 | # daemon must be stopped to cycle it properly. Remember rc.d/snmpd | | 64 | # daemon must be stopped to cycle it properly. Remember rc.d/snmpd |
64 | # will use '-s' to enable standard syslog logging anyway. | | 65 | # will use '-s' to enable standard syslog logging anyway. |
65 | # | | 66 | # |
66 | CONFIGURE_ARGS+= --with-logfile=none | | 67 | CONFIGURE_ARGS+= --with-logfile=none |
67 | CONFIGURE_ARGS+= --with-persistent-directory=${NET_SNMP_PERSISTENTDIR} | | 68 | CONFIGURE_ARGS+= --with-persistent-directory=${NET_SNMP_PERSISTENTDIR} |
68 | .if !empty(NET_SNMP_MIBDIRS) | | 69 | .if !empty(NET_SNMP_MIBDIRS) |
69 | CONFIGURE_ARGS+= --with-mibdirs=${NET_SNMP_MIBDIRS:Q} | | 70 | CONFIGURE_ARGS+= --with-mibdirs=${NET_SNMP_MIBDIRS:Q} |
70 | .endif | | 71 | .endif |
71 | .if ${OPSYS} == "NetBSD" | | 72 | .if ${OPSYS} == "NetBSD" |
72 | CONFIGURE_ARGS+= --with-mib-modules="smux host ucd-snmp/diskio" | | 73 | CONFIGURE_ARGS+= --with-mib-modules="smux host ucd-snmp/diskio" |
73 | .else | | 74 | .else |
74 | CONFIGURE_ARGS+= --with-mib-modules="smux host" | | 75 | CONFIGURE_ARGS+= --with-mib-modules="smux host" |
75 | .endif | | 76 | .endif |
76 | .if !empty(MACHINE_PLATFORM:MDarwin-[567].*) | | 77 | .if !empty(MACHINE_PLATFORM:MDarwin-[567].*) |
77 | CONFIGURE_ARGS+= --with-out-mib-modules="ucd-snmp/diskio mibII" | | 78 | CONFIGURE_ARGS+= --with-out-mib-modules="ucd-snmp/diskio mibII" |
78 | .endif | | 79 | .endif |
79 | .if !empty(MACHINE_PLATFORM:MDarwin-9.*) | | 80 | .if !empty(MACHINE_PLATFORM:MDarwin-9.*) |
80 | CONFIGURE_ARGS+= --with-mib-modules="host ucd-snmp/diskio" | | 81 | CONFIGURE_ARGS+= --with-mib-modules="host ucd-snmp/diskio" |
81 | CONFIGURE_ARGS+= --with-out-mib-modules="mibII/icmp host/hr_swrun" | | 82 | CONFIGURE_ARGS+= --with-out-mib-modules="mibII/icmp host/hr_swrun" |
82 | CONFIGURE_ARGS+= --enable-as-needed | | 83 | CONFIGURE_ARGS+= --enable-as-needed |
83 | CONFIGURE_ARGS+= --without-kmem-usage | | 84 | CONFIGURE_ARGS+= --without-kmem-usage |
84 | CONFIGURE_ARGS+= --without-rpm | | 85 | CONFIGURE_ARGS+= --without-rpm |
85 | .endif | | 86 | .endif |
86 | # | | 87 | # |
87 | # Using "dummy" values is technically not compliant with SNMP specs, but | | 88 | # Using "dummy" values is technically not compliant with SNMP specs, but |
88 | # otherwise, some tools, e.g. net/tcl-scotty, net/tkined, may ignore results | | 89 | # otherwise, some tools, e.g. net/tcl-scotty, net/tkined, may ignore results |
89 | # when they shouldn't. | | 90 | # when they shouldn't. |
90 | # | | 91 | # |
91 | CONFIGURE_ARGS+= --with-dummy-values | | 92 | CONFIGURE_ARGS+= --with-dummy-values |
92 | # | | 93 | # |
93 | # Install the UCD-SNMP look-alike headers and libraries to ease porting of | | 94 | # Install the UCD-SNMP look-alike headers and libraries to ease porting of |
94 | # older software to use net-snmp. | | 95 | # older software to use net-snmp. |
95 | # | | 96 | # |
96 | CONFIGURE_ARGS+= --enable-ucd-snmp-compatibility | | 97 | CONFIGURE_ARGS+= --enable-ucd-snmp-compatibility |
97 | # | | 98 | # |
98 | # Enable the perl modules build and installation | | 99 | # Enable the perl modules build and installation |
99 | # | | 100 | # |
100 | PERL5_CONFIGURE= no | | 101 | PERL5_CONFIGURE= no |
101 | PERL5_PACKLIST= auto/Bundle/NetSNMP/.packlist | | 102 | PERL5_PACKLIST= auto/Bundle/NetSNMP/.packlist |
102 | CONFIGURE_ARGS+= --with-perl-modules=${MAKE_PARAMS:Q} | | 103 | CONFIGURE_ARGS+= --with-perl-modules=${MAKE_PARAMS:Q} |
103 | CONFIGURE_ENV+= PERLPROG=${PERL5:Q} | | 104 | CONFIGURE_ENV+= PERLPROG=${PERL5:Q} |
104 | | | 105 | |
105 | .include "options.mk" | | 106 | .include "options.mk" |
106 | | | 107 | |
107 | # Handle ${PREFIX}/share/snmp in the DEINSTALL script since it may contain | | 108 | # Handle ${PREFIX}/share/snmp in the DEINSTALL script since it may contain |
108 | # leftover config files or pidfiles after deinstallation. | | 109 | # leftover config files or pidfiles after deinstallation. |
109 | # | | 110 | # |
110 | REQD_DIRS= ${PREFIX}/share/snmp | | 111 | REQD_DIRS= ${PREFIX}/share/snmp |
111 | RCD_SCRIPTS= snmpd snmptrapd | | 112 | RCD_SCRIPTS= snmpd snmptrapd |
112 | | | 113 | |
113 | USE_TOOLS+= sh:run | | 114 | USE_TOOLS+= sh:run |
114 | REPLACE_INTERPRETER+= bash | | 115 | REPLACE_INTERPRETER+= bash |
115 | REPLACE.bash.old= /bin/bash | | 116 | REPLACE.bash.old= /bin/bash |
116 | REPLACE.bash.new= ${SH} | | 117 | REPLACE.bash.new= ${SH} |
117 | REPLACE_FILES.bash= local/mib2c-update | | 118 | REPLACE_FILES.bash= local/mib2c-update |
118 | | | 119 | |
119 | INSTALLATION_DIRS+= share/examples/net-snmp | | 120 | INSTALLATION_DIRS+= share/examples/net-snmp |
120 | | | 121 | |
121 | post-extract: | | 122 | post-extract: |
122 | .if ${OPSYS} == "DragonFly" | | 123 | .if ${OPSYS} == "DragonFly" |
123 | cp ${FILESDIR}/cpu_dragonfly.c ${WRKSRC}/agent/mibgroup/hardware/cpu/cpu_nlist.c | | 124 | cp ${FILESDIR}/cpu_dragonfly.c ${WRKSRC}/agent/mibgroup/hardware/cpu/cpu_nlist.c |
124 | .endif | | 125 | .endif |
125 | | | 126 | |
126 | post-wrapper: | | 127 | post-wrapper: |
127 | .if !empty(MACHINE_PLATFORM:MNetBSD-1.5.[123]*-i386) | | 128 | .if !empty(MACHINE_PLATFORM:MNetBSD-1.5.[123]*-i386) |
128 | mkdir ${BUILDLINK_DIR}/include/sys | | 129 | mkdir ${BUILDLINK_DIR}/include/sys |
129 | cp ${FILESDIR}/disklabel.h ${BUILDLINK_DIR}/include/sys | | 130 | cp ${FILESDIR}/disklabel.h ${BUILDLINK_DIR}/include/sys |
130 | .endif | | 131 | .endif |
131 | | | 132 | |
132 | post-install: | | 133 | post-install: |
133 | ${INSTALL_DATA} ${WRKSRC}/EXAMPLE.conf \ | | 134 | ${INSTALL_DATA} ${WRKSRC}/EXAMPLE.conf \ |
134 | ${PREFIX}/share/examples/net-snmp/EXAMPLE.conf | | 135 | ${PREFIX}/share/examples/net-snmp/EXAMPLE.conf |
135 | ${INSTALL_SCRIPT} ${WRKSRC}/agent/snmp_perl.pl \ | | 136 | ${INSTALL_SCRIPT} ${WRKSRC}/agent/snmp_perl.pl \ |
136 | ${PREFIX}/share/snmp/ | | 137 | ${PREFIX}/share/snmp/ |
137 | | | 138 | |
138 | .include "../../lang/perl5/module.mk" | | 139 | .include "../../lang/perl5/module.mk" |
139 | .include "../../security/tcp_wrappers/buildlink3.mk" | | 140 | .include "../../security/tcp_wrappers/buildlink3.mk" |
140 | .include "../../mk/bsd.pkg.mk" | | 141 | .include "../../mk/bsd.pkg.mk" |