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
|
|
|
|
2016-05-18 21:22:27 +02:00
|
|
|
DNSMASQ_VERSION = 2.76
|
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)"
|
|
|
|
DNSMASQ_MAKE_OPTS += DESTDIR=$(TARGET_DIR) LDFLAGS="$(TARGET_LDFLAGS)"
|
2014-04-11 19:46:33 +02:00
|
|
|
DNSMASQ_DEPENDENCIES = host-pkgconf
|
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
|
|
|
|
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
|
|
|
|
|
2012-05-04 05:16:47 +02:00
|
|
|
# NLS requires IDN so only enable it (i18n) when IDN is true
|
2009-11-13 16:12:09 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_DNSMASQ_IDN),y)
|
2017-07-03 22:42:08 +02:00
|
|
|
DNSMASQ_DEPENDENCIES += libidn $(TARGET_NLS_DEPENDENCIES)
|
|
|
|
DNSMASQ_MAKE_OPTS += LIBS+=$(TARGET_NLS_LIBS)
|
2015-03-31 09:21:57 +02:00
|
|
|
DNSMASQ_COPTS += -DHAVE_IDN
|
2017-08-28 19:56:35 +02:00
|
|
|
DNSMASQ_I18N = $(if $(BR2_SYSTEM_ENABLE_NLS),-i18n)
|
2012-05-04 05:16:47 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_DNSMASQ_CONNTRACK),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
DNSMASQ_DEPENDENCIES += libnetfilter_conntrack
|
2012-05-04 05:16:47 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_DNSMASQ_CONNTRACK),y)
|
|
|
|
define DNSMASQ_ENABLE_CONNTRACK
|
|
|
|
$(SED) 's^.*#define HAVE_CONNTRACK.*^#define HAVE_CONNTRACK^' \
|
|
|
|
$(DNSMASQ_DIR)/src/config.h
|
|
|
|
endef
|
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
|
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
|
|
|
|
|
|
|
define DNSMASQ_ENABLE_LUA
|
|
|
|
$(SED) 's/lua5.1/lua/g' $(DNSMASQ_DIR)/Makefile
|
|
|
|
$(SED) 's^.*#define HAVE_LUASCRIPT.*^#define HAVE_LUASCRIPT^' \
|
|
|
|
$(DNSMASQ_DIR)/src/config.h
|
|
|
|
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
|
2008-03-02 15:36:43 +01:00
|
|
|
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
|
|
|
|
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_DBUS),y)
|
2010-06-24 14:11:06 +02:00
|
|
|
define DNSMASQ_ENABLE_DBUS
|
2008-03-02 15:36:43 +01:00
|
|
|
$(SED) 's^.*#define HAVE_DBUS.*^#define HAVE_DBUS^' \
|
|
|
|
$(DNSMASQ_DIR)/src/config.h
|
2010-06-24 14:11:06 +02:00
|
|
|
endef
|
2008-03-02 15:36:43 +01:00
|
|
|
else
|
2010-06-24 14:11:06 +02:00
|
|
|
define DNSMASQ_ENABLE_DBUS
|
2008-03-02 15:36:43 +01:00
|
|
|
$(SED) 's^.*#define HAVE_DBUS.*^/* #define HAVE_DBUS */^' \
|
|
|
|
$(DNSMASQ_DIR)/src/config.h
|
2010-06-24 14:11:06 +02:00
|
|
|
endef
|
2008-03-02 15:36:43 +01:00
|
|
|
endif
|
2004-04-04 04:33:03 +02:00
|
|
|
|
2010-06-24 14:11:06 +02:00
|
|
|
define DNSMASQ_BUILD_CMDS
|
2012-03-13 14:20:15 +01:00
|
|
|
$(DNSMASQ_FIX_PKGCONFIG)
|
2010-06-24 14:11:06 +02:00
|
|
|
$(DNSMASQ_ENABLE_DBUS)
|
2012-03-13 14:20:15 +01:00
|
|
|
$(DNSMASQ_ENABLE_LUA)
|
2012-05-04 05:16:47 +02:00
|
|
|
$(DNSMASQ_ENABLE_CONNTRACK)
|
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
|
|
|
|
|
2014-12-31 00:51:14 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_DBUS),y)
|
|
|
|
define DNSMASQ_INSTALL_DBUS
|
|
|
|
$(INSTALL) -m 0644 -D $(@D)/dbus/dnsmasq.conf \
|
|
|
|
$(TARGET_DIR)/etc/dbus-1/system.d/dnsmasq.conf
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2010-06-24 14:11:06 +02:00
|
|
|
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))
|