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
|
|
|
|
2014-05-20 18:46:44 +02:00
|
|
|
DNSMASQ_VERSION = 2.71
|
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)"
|
2010-04-01 17:44:28 +02:00
|
|
|
DNSMASQ_MAKE_OPT = COPTS="$(DNSMASQ_COPTS)" PREFIX=/usr CFLAGS="$(TARGET_CFLAGS)"
|
2012-03-13 14:20:15 +01:00
|
|
|
DNSMASQ_MAKE_OPT += DESTDIR=$(TARGET_DIR) LDFLAGS="$(TARGET_LDFLAGS)"
|
2014-04-11 19:46:33 +02:00
|
|
|
DNSMASQ_DEPENDENCIES = host-pkgconf
|
2012-09-06 04:34:42 +02:00
|
|
|
DNSMASQ_LICENSE = Dual GPLv2/GPLv3
|
|
|
|
DNSMASQ_LICENSE_FILES = COPYING COPYING-v3
|
2007-09-10 11:04:03 +02:00
|
|
|
|
2008-03-02 15:36:40 +01:00
|
|
|
ifneq ($(BR2_INET_IPV6),y)
|
2010-06-24 14:11:06 +02:00
|
|
|
DNSMASQ_COPTS += -DNO_IPV6
|
2009-09-01 23:02:06 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(BR2_PACKAGE_DNSMASQ_DHCP),y)
|
2010-06-24 14:11:06 +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)
|
|
|
|
DNSMASQ_DEPENDENCIES += gmp nettle
|
|
|
|
DNSMASQ_COPTS += -DHAVE_DNSSEC
|
|
|
|
ifeq ($(BR2_PREFER_STATIC_LIB),y)
|
|
|
|
DNSMASQ_COPTS += -DHAVE_DNSSEC_STATIC
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2008-03-02 15:36:40 +01:00
|
|
|
ifneq ($(BR2_PACKAGE_DNSMASQ_TFTP),y)
|
2010-06-24 14:11:06 +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)
|
2013-03-25 09:31:41 +01:00
|
|
|
DNSMASQ_DEPENDENCIES += libidn $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-gettext
|
2012-05-04 05:16:47 +02:00
|
|
|
DNSMASQ_MAKE_OPT += LDFLAGS+="-lidn $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),-lintl)"
|
|
|
|
DNSMASQ_COPTS += -DHAVE_IDN
|
|
|
|
DNSMASQ_I18N = $(if $(BR2_ENABLE_LOCALE),-i18n)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_DNSMASQ_CONNTRACK),y)
|
2014-04-11 19:46:33 +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)
|
2014-04-11 19:46:33 +02:00
|
|
|
DNSMASQ_DEPENDENCIES += lua
|
2012-03-13 14:20:15 +01:00
|
|
|
DNSMASQ_MAKE_OPT += LDFLAGS+="-ldl"
|
|
|
|
|
|
|
|
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-08-08 20:15:29 +02:00
|
|
|
ifneq ($(BR2_LARGEFILE),y)
|
2010-06-24 14:11:06 +02:00
|
|
|
DNSMASQ_COPTS += -DNO_LARGEFILE
|
2008-08-08 20:15:29 +02:00
|
|
|
endif
|
|
|
|
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_DBUS),y)
|
2014-04-11 19:46:33 +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)
|
2013-04-17 14:10:35 +02:00
|
|
|
$(DNSMASQ_MAKE_ENV) $(MAKE1) -C $(@D) $(DNSMASQ_MAKE_OPT) all$(DNSMASQ_I18N)
|
2010-06-24 14:11:06 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define DNSMASQ_INSTALL_TARGET_CMDS
|
2012-05-04 05:16:47 +02:00
|
|
|
$(DNSMASQ_MAKE_ENV) $(MAKE) -C $(@D) $(DNSMASQ_MAKE_OPT) install$(DNSMASQ_I18N)
|
2011-12-02 11:49:11 +01:00
|
|
|
mkdir -p $(TARGET_DIR)/var/lib/misc/
|
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))
|