sngrep: fix error if gnutls and openssl are both enabled
[buildroot-gz.git] / package / quagga / quagga.mk
blobad2aff4ea8170a1c7448238b22cd8c7b69d24c07
1 ################################################################################
3 # quagga
5 ################################################################################
7 QUAGGA_VERSION = 1.0.20160315
8 QUAGGA_SOURCE = quagga-$(QUAGGA_VERSION).tar.xz
9 QUAGGA_SITE = http://download.savannah.gnu.org/releases/quagga
10 QUAGGA_DEPENDENCIES = host-gawk
11 QUAGGA_LICENSE = GPLv2+
12 QUAGGA_LICENSE_FILES = COPYING
14 # We need to override the sysconf and localstate directories so that
15 # quagga can create files as the quagga user without extra
16 # intervention
17 QUAGGA_CONF_OPTS = \
18 --program-transform-name='' \
19 --sysconfdir=/etc/quagga \
20 --localstatedir=/var/run/quagga
22 # 0002-configure-fix-static-linking-with-readline.patch
23 QUAGGA_AUTORECONF = YES
25 ifeq ($(BR2_PACKAGE_LIBCAP),y)
26 QUAGGA_CONF_OPTS += --enable-capabilities
27 QUAGGA_DEPENDENCIES += libcap
28 else
29 QUAGGA_CONF_OPTS += --disable-capabilities
30 endif
32 QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_ZEBRA),--enable-zebra,--disable-zebra)
33 QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_BGPD),--enable-bgpd,--disable-bgpd)
34 QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_RIPD),--enable-ripd,--disable-ripd)
35 QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_RIPNGD),--enable-ripngd,--disable-ripngd)
36 QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_OSPFD),--enable-ospfd,--disable-ospfd --disable-ospfapi)
37 QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_OSPF6D),--enable-ospf6d,--disable-ospf6d)
38 QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_PIMD),--enable-pimd,--disable-pimd)
39 QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_WATCHQUAGGA),--enable-watchquagga,--disable-watchquagga)
40 QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_ISISD),--enable-isisd,--disable-isisd)
41 QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_BGP_ANNOUNCE),--enable-bgp-announce,--disable-bgp-announce)
42 QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_TCP_ZERBRA),--enable-tcp-zebra,--disable-tcp-zebra)
44 define QUAGGA_USERS
45 quagga -1 quagga -1 * - - - Quagga priv drop user
46 endef
48 # Set the permissions of /etc/quagga such that quagga (through vtysh)
49 # can save the configuration - set the folder recursively as the files
50 # need to be 600, and then set the folder (non-recursively) to 755 so
51 # it can used. Quagga also needs to write to the folder as it moves
52 # and creates, rather than overwriting.
53 define QUAGGA_PERMISSIONS
54 /etc/quagga r 600 quagga quagga - - - - -
55 /etc/quagga d 755 quagga quagga - - - - -
56 endef
58 ifeq ($(BR2_PACKAGE_QUAGGA_SNMP),y)
59 QUAGGA_CONF_ENV += ac_cv_path_NETSNMP_CONFIG=$(STAGING_DIR)/usr/bin/net-snmp-config
60 QUAGGA_CONF_OPTS += --enable-snmp=agentx
61 QUAGGA_DEPENDENCIES += netsnmp
62 endif
64 ifeq ($(BR2_PACKAGE_QUAGGA_VTYSH),y)
65 QUAGGA_CONF_OPTS += --enable-vtysh
66 QUAGGA_DEPENDENCIES += readline
67 else
68 QUAGGA_CONF_OPTS += --disable-vtysh
69 endif
71 ifeq ($(BR2_TOOLCHAIN_SUPPORTS_PIE),)
72 QUAGGA_CONF_OPTS += --disable-pie
73 endif
75 define QUAGGA_INSTALL_INIT_SYSTEMD
76 $(INSTALL) -D -m 644 package/quagga/quagga_tmpfiles.conf \
77 $(TARGET_DIR)/usr/lib/tmpfiles.d/quagga.conf
78 $(INSTALL) -D -m 644 package/quagga/quagga@.service \
79 $(TARGET_DIR)/usr/lib/systemd/system/quagga@.service
80 endef
82 $(eval $(autotools-package))