2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2004-04-04 04:33:03 +02:00
|
|
|
#
|
|
|
|
# dnsmasq
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2004-04-04 04:33:03 +02:00
|
|
|
|
2019-06-18 07:24:15 +02:00
|
|
|
DNSMASQ_VERSION = 2.80
|
2013-09-06 08:14:15 +02:00
|
|
|
DNSMASQ_SOURCE = dnsmasq-$(DNSMASQ_VERSION).tar.xz
|
2009-09-01 23:02:06 +02:00
|
|
|
DNSMASQ_SITE = http://thekelleys.org.uk/dnsmasq
|
2013-03-25 09:31:41 +01:00
|
|
|
DNSMASQ_MAKE_ENV = $(TARGET_MAKE_ENV) CC="$(TARGET_CC)"
|
2014-09-27 21:32:38 +02:00
|
|
|
DNSMASQ_MAKE_OPTS = COPTS="$(DNSMASQ_COPTS)" PREFIX=/usr CFLAGS="$(TARGET_CFLAGS)"
|
2018-05-01 15:10:08 +02:00
|
|
|
DNSMASQ_MAKE_OPTS += DESTDIR=$(TARGET_DIR) LDFLAGS="$(TARGET_LDFLAGS)" \
|
|
|
|
LIBS+=$(TARGET_NLS_LIBS)
|
|
|
|
DNSMASQ_DEPENDENCIES = host-pkgconf $(TARGET_NLS_DEPENDENCIES)
|
2017-03-30 15:43:33 +02:00
|
|
|
DNSMASQ_LICENSE = GPL-2.0 or GPL-3.0
|
2012-09-06 04:34:42 +02:00
|
|
|
DNSMASQ_LICENSE_FILES = COPYING COPYING-v3
|
2007-09-10 11:04:03 +02:00
|
|
|
|
2018-05-01 15:10:08 +02:00
|
|
|
DNSMASQ_I18N = $(if $(BR2_SYSTEM_ENABLE_NLS),-i18n)
|
|
|
|
|
2009-09-01 23:02:06 +02:00
|
|
|
ifneq ($(BR2_PACKAGE_DNSMASQ_DHCP),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
DNSMASQ_COPTS += -DNO_DHCP
|
2008-03-02 15:36:40 +01:00
|
|
|
endif
|
|
|
|
|
2014-04-11 19:46:33 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_DNSMASQ_DNSSEC),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
DNSMASQ_DEPENDENCIES += gmp nettle
|
|
|
|
DNSMASQ_COPTS += -DHAVE_DNSSEC
|
2014-12-03 22:41:29 +01:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
DNSMASQ_COPTS += -DHAVE_DNSSEC_STATIC
|
2014-04-11 19:46:33 +02:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2008-03-02 15:36:40 +01:00
|
|
|
ifneq ($(BR2_PACKAGE_DNSMASQ_TFTP),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
DNSMASQ_COPTS += -DNO_TFTP
|
2004-04-04 04:33:03 +02:00
|
|
|
endif
|
|
|
|
|
2009-11-13 16:12:09 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_DNSMASQ_IDN),y)
|
2019-06-20 18:23:24 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBIDN2),y)
|
|
|
|
DNSMASQ_DEPENDENCIES += libidn2
|
|
|
|
DNSMASQ_COPTS += -DHAVE_LIBIDN2
|
|
|
|
else
|
2018-05-01 15:10:08 +02:00
|
|
|
DNSMASQ_DEPENDENCIES += libidn
|
2015-03-31 09:21:57 +02:00
|
|
|
DNSMASQ_COPTS += -DHAVE_IDN
|
2012-05-04 05:16:47 +02:00
|
|
|
endif
|
2019-06-20 18:23:24 +02:00
|
|
|
endif
|
2012-05-04 05:16:47 +02:00
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_DNSMASQ_CONNTRACK),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
DNSMASQ_DEPENDENCIES += libnetfilter_conntrack
|
2017-10-02 19:38:26 +02:00
|
|
|
DNSMASQ_COPTS += -DHAVE_CONNTRACK
|
2012-03-13 14:20:15 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_DNSMASQ_LUA),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
DNSMASQ_DEPENDENCIES += lua
|
2017-10-02 19:38:26 +02:00
|
|
|
DNSMASQ_COPTS += -DHAVE_LUASCRIPT
|
2014-06-12 10:46:41 +02:00
|
|
|
|
|
|
|
# liblua uses dlopen when dynamically linked
|
2014-12-03 22:41:29 +01:00
|
|
|
ifneq ($(BR2_STATIC_LIBS),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
DNSMASQ_MAKE_OPTS += LIBS+="-ldl"
|
2014-06-12 10:46:41 +02:00
|
|
|
endif
|
2012-03-13 14:20:15 +01:00
|
|
|
|
2017-10-02 19:38:26 +02:00
|
|
|
define DNSMASQ_TWEAK_LIBLUA
|
2017-10-02 19:38:25 +02:00
|
|
|
$(SED) 's/lua5.2/lua/g' $(DNSMASQ_DIR)/Makefile
|
2012-03-13 14:20:15 +01:00
|
|
|
endef
|
2009-11-13 16:12:09 +01:00
|
|
|
endif
|
|
|
|
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_DBUS),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
DNSMASQ_DEPENDENCIES += dbus
|
2017-10-02 19:38:26 +02:00
|
|
|
DNSMASQ_COPTS += -DHAVE_DBUS
|
|
|
|
|
|
|
|
define DNSMASQ_INSTALL_DBUS
|
|
|
|
$(INSTALL) -m 0644 -D $(@D)/dbus/dnsmasq.conf \
|
|
|
|
$(TARGET_DIR)/etc/dbus-1/system.d/dnsmasq.conf
|
|
|
|
endef
|
2008-03-02 15:36:43 +01:00
|
|
|
endif
|
|
|
|
|
2019-06-18 07:24:15 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_UBUS),y)
|
|
|
|
DNSMASQ_DEPENDENCIES += ubus
|
|
|
|
DNSMASQ_COPTS += -DHAVE_UBUS
|
|
|
|
endif
|
|
|
|
|
2012-03-13 14:20:15 +01:00
|
|
|
define DNSMASQ_FIX_PKGCONFIG
|
|
|
|
$(SED) 's^PKG_CONFIG = pkg-config^PKG_CONFIG = $(PKG_CONFIG_HOST_BINARY)^' \
|
|
|
|
$(DNSMASQ_DIR)/Makefile
|
|
|
|
endef
|
|
|
|
|
2010-06-24 14:11:06 +02:00
|
|
|
define DNSMASQ_BUILD_CMDS
|
2012-03-13 14:20:15 +01:00
|
|
|
$(DNSMASQ_FIX_PKGCONFIG)
|
2017-10-02 19:38:26 +02:00
|
|
|
$(DNSMASQ_TWEAK_LIBLUA)
|
2016-03-11 18:40:40 +01:00
|
|
|
$(DNSMASQ_MAKE_ENV) $(MAKE) -C $(@D) $(DNSMASQ_MAKE_OPTS) all$(DNSMASQ_I18N)
|
2010-06-24 14:11:06 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define DNSMASQ_INSTALL_TARGET_CMDS
|
2014-09-27 21:32:38 +02:00
|
|
|
$(DNSMASQ_MAKE_ENV) $(MAKE) -C $(@D) $(DNSMASQ_MAKE_OPTS) install$(DNSMASQ_I18N)
|
2011-12-02 11:49:11 +01:00
|
|
|
mkdir -p $(TARGET_DIR)/var/lib/misc/
|
2014-12-31 00:51:14 +01:00
|
|
|
$(DNSMASQ_INSTALL_DBUS)
|
2010-06-24 14:11:06 +02:00
|
|
|
endef
|
|
|
|
|
2014-03-29 10:01:02 +01:00
|
|
|
define DNSMASQ_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -m 755 -D package/dnsmasq/S80dnsmasq \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S80dnsmasq
|
|
|
|
endef
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(generic-package))
|