summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorjlam <jlam>2007-09-07 22:07:31 +0000
committerjlam <jlam>2007-09-07 22:07:31 +0000
commit3045177d1ce3c7d590e5aaa6d5777696d6f55aa6 (patch)
treeb5be3bbed67e74f65d84287aaeef09f4ed76ae39 /net
parente171b3e72c0ce464b861171360ced4827f067d10 (diff)
downloadpkgsrc-3045177d1ce3c7d590e5aaa6d5777696d6f55aa6.tar.gz
Convert to use the options framework.
Diffstat (limited to 'net')
-rw-r--r--net/quagga-devel/Makefile42
-rw-r--r--net/quagga-devel/options.mk47
-rw-r--r--net/quagga/Makefile42
-rw-r--r--net/quagga/options.mk47
4 files changed, 106 insertions, 72 deletions
diff --git a/net/quagga-devel/Makefile b/net/quagga-devel/Makefile
index 079eae9c3c3..98f7c253856 100644
--- a/net/quagga-devel/Makefile
+++ b/net/quagga-devel/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2007/05/23 10:44:17 gdt Exp $
+# $NetBSD: Makefile,v 1.5 2007/09/07 22:07:31 jlam Exp $
# Based on KAME Id: Makefile,v 1.1.2.1.2.1.10.2 1999/01/05 11:03:50 itojun Exp
#
@@ -27,11 +27,11 @@ CONFLICTS+= zebra-[0-9]*
PLIST_SRC= ${WRKDIR}/PLIST
PLIST_CAT= # empty
-INFO_FILES= # PLIST
+INFO_FILES= # PLIST
-RCD_SCRIPTS= zebra bgpd ospfd ripd
-PKG_GROUPS= quagga
-PKG_USERS= quagga:quagga
+RCD_SCRIPTS= zebra bgpd ospfd ripd
+PKG_GROUPS= quagga
+PKG_USERS= quagga:quagga
# log_syslog.conf is used as a template for each config file
.for _file_ in vtysh.conf zebra.conf bgpd.conf ospfd.conf ripd.conf
@@ -39,37 +39,7 @@ CONF_FILES_PERMS+= ${PREFIX}/share/examples/quagga/log_syslog.conf \
${PKG_SYSCONFDIR}/${_file_} quagga quagga 0600
.endfor
-BUILD_DEFS+= USE_ZEBRA_VTYSH USE_ZEBRA_OSPF_OPAQUELSA
-USE_ZEBRA_VTYSH?= YES
-USE_ZEBRA_OSPF_OPAQUELSA?= YES
-
-.if defined(USE_ZEBRA_VTYSH) && ${USE_ZEBRA_VTYSH} == "YES"
-USE_GNU_READLINE= # uses rl_pending_input
-. include "../../devel/readline/buildlink3.mk"
-CONFIGURE_ARGS+= --enable-vtysh
-PLIST_CAT+= ${PKGDIR}/PLIST.vtysh
-.else
-CONFIGURE_ARGS+= --disable-vtysh
-.endif
-
-.if defined(USE_ZEBRA_OSPF_OPAQUELSA) && ${USE_ZEBRA_OSPF_OPAQUELSA} == "YES"
-CONFIGURE_ARGS+= --enable-opaque-lsa
-PLIST_CAT+= ${PKGDIR}/PLIST.opaquelsa
-.endif
-
-BUILD_DEFS+= USE_INET6
-
-.if defined(USE_INET6) && ${USE_INET6} == YES
-PLIST_CAT+= ${PKGDIR}/PLIST.v6
-RCD_SCRIPTS+= ospf6d ripngd
-.for _file_ in ospf6d.conf ripngd.conf
-CONF_FILES_PERMS+= ${PREFIX}/share/examples/quagga/log_syslog.conf \
- ${PKG_SYSCONFDIR}/${_file_} quagga quagga 0600
-.endfor
-.else
-CONFIGURE_ARGS+= --disable-ospf6d
-CONFIGURE_ARGS+= --disable-ripngd
-.endif
+.include "options.mk"
PLIST_CAT+= ${PKGDIR}/PLIST
diff --git a/net/quagga-devel/options.mk b/net/quagga-devel/options.mk
new file mode 100644
index 00000000000..bfab8710535
--- /dev/null
+++ b/net/quagga-devel/options.mk
@@ -0,0 +1,47 @@
+# $NetBSD: options.mk,v 1.1 2007/09/07 22:07:32 jlam Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.quagga
+PKG_SUPPORTED_OPTIONS= inet6
+PKG_SUPPORTED_OPTIONS+= quagga-ospf-opaque-lsa
+PKG_SUPPORTED_OPTIONS+= quagga-vtysh
+PKG_SUGGESTED_OPTIONS= quagga-ospf-opaque-lsa quagga-vtysh
+
+PKG_OPTIONS_LEGACY_VARS+= USE_ZEBRA_OSPF_OPAQUELSA:quagga-ospf-opaque-lsa
+PKG_OPTIONS_LEGACY_VARS+= USE_ZEBRA_VTYSH:quagga-vtysh
+
+.include "../../mk/bsd.options.mk"
+
+###
+### IPv6 support
+###
+.if !empty(PKG_OPTIONS:Minet6)
+PLIST_CAT+= ${PKGDIR}/PLIST.v6
+RCD_SCRIPTS+= ospf6d ripngd
+. for _file_ in ospf6d.conf ripngd.conf
+CONF_FILES_PERMS+= ${PREFIX}/share/examples/quagga/log_syslog.conf \
+ ${PKG_SYSCONFDIR}/${_file_} quagga quagga 0600
+. endfor
+.else
+CONFIGURE_ARGS+= --disable-ospf6d
+CONFIGURE_ARGS+= --disable-ripngd
+.endif
+
+###
+### ???
+###
+.if !empty(PKG_OPTIONS:Mquagga-vtysh)
+USE_GNU_READLINE= # uses rl_pending_input
+. include "../../devel/readline/buildlink3.mk"
+CONFIGURE_ARGS+= --enable-vtysh
+PLIST_CAT+= ${PKGDIR}/PLIST.vtysh
+.else
+CONFIGURE_ARGS+= --disable-vtysh
+.endif
+
+###
+### ???
+###
+.if !empty(PKG_OPTIONS:Mquagga-ospf-opaque-lsa)
+CONFIGURE_ARGS+= --enable-opaque-lsa
+PLIST_CAT+= ${PKGDIR}/PLIST.opaquelsa
+.endif
diff --git a/net/quagga/Makefile b/net/quagga/Makefile
index 6ce9b067eab..18613f18012 100644
--- a/net/quagga/Makefile
+++ b/net/quagga/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.29 2006/06/05 19:28:25 gdt Exp $
+# $NetBSD: Makefile,v 1.30 2007/09/07 22:07:31 jlam Exp $
# Based on KAME Id: Makefile,v 1.1.2.1.2.1.10.2 1999/01/05 11:03:50 itojun Exp
#
@@ -27,11 +27,11 @@ CONFLICTS+= zebra-[0-9]*
PLIST_SRC= ${WRKDIR}/PLIST
PLIST_CAT= # empty
-INFO_FILES= # PLIST
+INFO_FILES= # PLIST
-RCD_SCRIPTS= zebra bgpd ospfd ripd
-PKG_GROUPS= quagga
-PKG_USERS= quagga:quagga
+RCD_SCRIPTS= zebra bgpd ospfd ripd
+PKG_GROUPS= quagga
+PKG_USERS= quagga:quagga
# log_syslog.conf is used as a template for each config file
.for _file_ in vtysh.conf zebra.conf bgpd.conf ospfd.conf ripd.conf
@@ -39,37 +39,7 @@ CONF_FILES_PERMS+= ${PREFIX}/share/examples/quagga/log_syslog.conf \
${PKG_SYSCONFDIR}/${_file_} quagga quagga 0600
.endfor
-BUILD_DEFS+= USE_ZEBRA_VTYSH USE_ZEBRA_OSPF_OPAQUELSA
-USE_ZEBRA_VTYSH?= YES
-USE_ZEBRA_OSPF_OPAQUELSA?= YES
-
-.if defined(USE_ZEBRA_VTYSH) && ${USE_ZEBRA_VTYSH} == "YES"
-USE_GNU_READLINE= # uses rl_pending_input
-. include "../../devel/readline/buildlink3.mk"
-CONFIGURE_ARGS+= --enable-vtysh
-PLIST_CAT+= ${PKGDIR}/PLIST.vtysh
-.else
-CONFIGURE_ARGS+= --disable-vtysh
-.endif
-
-.if defined(USE_ZEBRA_OSPF_OPAQUELSA) && ${USE_ZEBRA_OSPF_OPAQUELSA} == "YES"
-CONFIGURE_ARGS+= --enable-opaque-lsa
-PLIST_CAT+= ${PKGDIR}/PLIST.opaquelsa
-.endif
-
-BUILD_DEFS+= USE_INET6
-
-.if defined(USE_INET6) && ${USE_INET6} == YES
-PLIST_CAT+= ${PKGDIR}/PLIST.v6
-RCD_SCRIPTS+= ospf6d ripngd
-.for _file_ in ospf6d.conf ripngd.conf
-CONF_FILES_PERMS+= ${PREFIX}/share/examples/quagga/log_syslog.conf \
- ${PKG_SYSCONFDIR}/${_file_} quagga quagga 0600
-.endfor
-.else
-CONFIGURE_ARGS+= --disable-ospf6d
-CONFIGURE_ARGS+= --disable-ripngd
-.endif
+.include "options.mk"
PLIST_CAT+= ${PKGDIR}/PLIST
diff --git a/net/quagga/options.mk b/net/quagga/options.mk
new file mode 100644
index 00000000000..f26e360c030
--- /dev/null
+++ b/net/quagga/options.mk
@@ -0,0 +1,47 @@
+# $NetBSD: options.mk,v 1.1 2007/09/07 22:07:31 jlam Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.quagga
+PKG_SUPPORTED_OPTIONS= inet6
+PKG_SUPPORTED_OPTIONS+= quagga-ospf-opaque-lsa
+PKG_SUPPORTED_OPTIONS+= quagga-vtysh
+PKG_SUGGESTED_OPTIONS= quagga-ospf-opaque-lsa quagga-vtysh
+
+PKG_OPTIONS_LEGACY_VARS+= USE_ZEBRA_OSPF_OPAQUELSA:quagga-ospf-opaque-lsa
+PKG_OPTIONS_LEGACY_VARS+= USE_ZEBRA_VTYSH:quagga-vtysh
+
+.include "../../mk/bsd.options.mk"
+
+###
+### IPv6 support
+###
+.if !empty(PKG_OPTIONS:Minet6)
+PLIST_CAT+= ${PKGDIR}/PLIST.v6
+RCD_SCRIPTS+= ospf6d ripngd
+. for _file_ in ospf6d.conf ripngd.conf
+CONF_FILES_PERMS+= ${PREFIX}/share/examples/quagga/log_syslog.conf \
+ ${PKG_SYSCONFDIR}/${_file_} quagga quagga 0600
+. endfor
+.else
+CONFIGURE_ARGS+= --disable-ospf6d
+CONFIGURE_ARGS+= --disable-ripngd
+.endif
+
+###
+### ???
+###
+.if !empty(PKG_OPTIONS:Mquagga-vtysh)
+USE_GNU_READLINE= # uses rl_pending_input
+. include "../../devel/readline/buildlink3.mk"
+CONFIGURE_ARGS+= --enable-vtysh
+PLIST_CAT+= ${PKGDIR}/PLIST.vtysh
+.else
+CONFIGURE_ARGS+= --disable-vtysh
+.endif
+
+###
+### ???
+###
+.if !empty(PKG_OPTIONS:Mquagga-ospf-opaque-lsa)
+CONFIGURE_ARGS+= --enable-opaque-lsa
+PLIST_CAT+= ${PKGDIR}/PLIST.opaquelsa
+.endif