diff options
author | wiz <wiz> | 2005-08-01 11:55:55 +0000 |
---|---|---|
committer | wiz <wiz> | 2005-08-01 11:55:55 +0000 |
commit | 818e3970edc189dab7c23fd273cf95e64f6491a6 (patch) | |
tree | cdcce813d6b4ba3e7f31878207f76fb5dc3a862f /net/net-snmp | |
parent | 603562a192c96f510651973a5cac96926f7e1a94 (diff) | |
download | pkgsrc-818e3970edc189dab7c23fd273cf95e64f6491a6.tar.gz |
Convert to options framework.
While here, sort Makefile a bit to make it easier to read.
Diffstat (limited to 'net/net-snmp')
-rw-r--r-- | net/net-snmp/Makefile | 56 | ||||
-rw-r--r-- | net/net-snmp/options.mk | 26 |
2 files changed, 45 insertions, 37 deletions
diff --git a/net/net-snmp/Makefile b/net/net-snmp/Makefile index e4085c6c388..17c1c249401 100644 --- a/net/net-snmp/Makefile +++ b/net/net-snmp/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.34 2005/07/31 02:30:18 rtr Exp $ +# $NetBSD: Makefile,v 1.35 2005/08/01 11:55:55 wiz Exp $ DISTNAME= net-snmp-5.2.1.2 CATEGORIES= net @@ -11,15 +11,7 @@ COMMENT= Extensible SNMP implementation CONFLICTS= ucd-snmp-[0-9]* -BUILD_DEFS+= USE_INET6 - -.include "../../mk/bsd.prefs.mk" - -NET_SNMP_SYS_CONTACT?= default_user@contact.domain -NET_SNMP_SYS_LOCATION?= defaultlocation -NET_SNMP_PERSISTENTDIR?= ${VARBASE}/net-snmp -NET_SNMP_MIBDIRS?= \$$HOME/.snmp/mibs:${PREFIX}/share/snmp/mibs:${PREFIX}/lib/tcl/tnm2.1.10/mibs:/usr/local/share/snmp/mibs - +GNU_CONFIGURE= yes USE_LIBTOOL= yes # The self-test of Perl modules only works after installation because perl @@ -31,31 +23,27 @@ TEST_TARGET?= test USE_PKGINSTALL= yes DEINSTALL_EXTRA_TMPL+= ${.CURDIR}/DEINSTALL -.if ${OPSYS} == "NetBSD" && empty(CFLAGS:U:M*-Dnetbsd1*) +.include "../../mk/bsd.prefs.mk" + +.if ${OPSYS} == "NetBSD" +OSVERSION_SPECIFIC= YES +. if empty(CFLAGS:U:M*-Dnetbsd1*) CFLAGS+= -Dnetbsd1 +. endif .endif -GNU_CONFIGURE= yes +.if (${OPSYS} == "NetBSD") || !exists(/usr/bin/lpstat) +CONFIGURE_ENV+= ac_cv_path_LPSTAT_PATH=no +.endif + +NET_SNMP_SYS_CONTACT?= default_user@contact.domain +NET_SNMP_SYS_LOCATION?= defaultlocation +NET_SNMP_PERSISTENTDIR?= ${VARBASE}/net-snmp +NET_SNMP_MIBDIRS?= \$$HOME/.snmp/mibs:${PREFIX}/share/snmp/mibs:${PREFIX}/lib/tcl/tnm2.1.10/mibs:/usr/local/share/snmp/mibs CONFIGURE_ARGS+= --enable-shared -# net-snmp doesn't do IPv6 on Solaris -.if (defined(USE_INET6) && (${USE_INET6} == "YES")) && ${OPSYS} != "SunOS" && ${OPSYS} != "Darwin" -CONFIGURE_ARGS+= --enable-ipv6 -PLIST_SUBST+= IPV6H= -.else -CONFIGURE_ARGS+= --disable-ipv6 -PLIST_SUBST+= IPV6H="@comment " -.endif CONFIGURE_ARGS+= --with-defaults - -.include "../../security/tcp_wrappers/buildlink3.mk" CONFIGURE_ARGS+= --with-libwrap - -.if defined(NET_SNMP_USE_SSL) && ${NET_SNMP_USE_SSL} == "YES" -. include "../../security/openssl/buildlink3.mk" -CONFIGURE_ARGS+= --with-openssl -.endif - CONFIGURE_ARGS+= --with-sys-contact="${NET_SNMP_SYS_CONTACT}" CONFIGURE_ARGS+= --with-sys-location="${NET_SNMP_SYS_LOCATION}" # @@ -90,15 +78,9 @@ CONFIGURE_ARGS+= --enable-ucd-snmp-compatibility CONFIGURE_ARGS+= --with-perl-modules=${MAKE_PARAMS:Q} PERL5_CONFIGURE= NO PERL5_PACKLIST= auto/Bundle/NetSNMP/.packlist - -.if (${OPSYS} == "NetBSD") || !exists(/usr/bin/lpstat) -CONFIGURE_ENV+= ac_cv_path_LPSTAT_PATH=no -.endif CONFIGURE_ENV+= PERLPROG="${PERL5}" -.if (${OPSYS} == "NetBSD") -OSVERSION_SPECIFIC= YES -.endif +.include "options.mk" # Handle ${PREFIX}/share/snmp in the DEINSTALL script since it may contain # leftover config files or pidfiles after deinstallation. @@ -106,8 +88,6 @@ OSVERSION_SPECIFIC= YES OWN_DIRS= ${PREFIX}/share/snmp RCD_SCRIPTS= snmpd snmptrapd -.include "../../lang/perl5/module.mk" - post-wrapper: .if !empty(MACHINE_PLATFORM:MNetBSD-1.5.[123]*-i386) ${MKDIR} ${BUILDLINK_DIR}/include/sys @@ -119,4 +99,6 @@ post-install: ${INSTALL_DATA} ${WRKSRC}/EXAMPLE.conf \ ${PREFIX}/share/examples/net-snmp/EXAMPLE.conf +.include "../../lang/perl5/module.mk" +.include "../../security/tcp_wrappers/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/net/net-snmp/options.mk b/net/net-snmp/options.mk new file mode 100644 index 00000000000..4c42313d02a --- /dev/null +++ b/net/net-snmp/options.mk @@ -0,0 +1,26 @@ +# $NetBSD: options.mk,v 1.1 2005/08/01 11:55:55 wiz Exp $ + +PKG_OPTIONS_VAR= PKG_OPTIONS.net-snmp +PKG_SUPPORTED_OPTIONS= ssl + +.include "../../mk/bsd.prefs.mk" + +.if ${OPSYS} != "SunOS" && ${OPSYS} != "Darwin" +# net-snmp doesn't do IPv6 on Solaris & Darwin +PKG_SUPPORTED_OPTIONS+= inet6 +.endif + +.include "../../mk/bsd.options.mk" + +.if !empty(PKG_OPTIONS:Minet6) +CONFIGURE_ARGS+= --enable-ipv6 +PLIST_SUBST+= IPV6H= +.else +CONFIGURE_ARGS+= --disable-ipv6 +PLIST_SUBST+= IPV6H="@comment " +.endif + +.if !empty(PKG_OPTIONS:Mssl) +. include "../../security/openssl/buildlink3.mk" +CONFIGURE_ARGS+= --with-openssl +.endif |