summaryrefslogtreecommitdiff
path: root/package/dnsmasq/dnsmasq.mk
diff options
context:
space:
mode:
Diffstat (limited to 'package/dnsmasq/dnsmasq.mk')
-rw-r--r--package/dnsmasq/dnsmasq.mk45
1 files changed, 27 insertions, 18 deletions
diff --git a/package/dnsmasq/dnsmasq.mk b/package/dnsmasq/dnsmasq.mk
index d32b794ae..ea47e9698 100644
--- a/package/dnsmasq/dnsmasq.mk
+++ b/package/dnsmasq/dnsmasq.mk
@@ -4,57 +4,66 @@
#
#############################################################
-DNSMASQ_VERSION = 2.52
+DNSMASQ_VERSION = 2.55
DNSMASQ_SITE = http://thekelleys.org.uk/dnsmasq
-DNSMASQ_AUTORECONF = NO
DNSMASQ_MAKE_ENV = CC="$(TARGET_CC)" LDFLAGS="$(TARGET_LDFLAGS)"
DNSMASQ_MAKE_OPT = COPTS="$(DNSMASQ_COPTS)" PREFIX=/usr CFLAGS="$(TARGET_CFLAGS)"
-DNSMASQ_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) PREFIX=/usr install
+DNSMASQ_MAKE_OPT += DESTDIR=$(TARGET_DIR)
ifneq ($(BR2_INET_IPV6),y)
-DNSMASQ_COPTS += -DNO_IPV6
+ DNSMASQ_COPTS += -DNO_IPV6
endif
ifneq ($(BR2_PACKAGE_DNSMASQ_DHCP),y)
-DNSMASQ_COPTS += -DNO_DHCP
+ DNSMASQ_COPTS += -DNO_DHCP
endif
ifneq ($(BR2_PACKAGE_DNSMASQ_TFTP),y)
-DNSMASQ_COPTS += -DNO_TFTP
+ DNSMASQ_COPTS += -DNO_TFTP
endif
ifeq ($(BR2_PACKAGE_DNSMASQ_IDN),y)
-DNSMASQ_MAKE_OPT += all-i18n
-DNSMASQ_DEPENDENCIES += libidn libintl
-DNSMASQ_MAKE_ENV += LDFLAGS+="-lintl"
+ DNSMASQ_MAKE_OPT += all-i18n
+ DNSMASQ_DEPENDENCIES += libidn libintl
+ DNSMASQ_MAKE_ENV += LDFLAGS+="-lintl"
endif
ifneq ($(BR2_LARGEFILE),y)
-DNSMASQ_COPTS += -DNO_LARGEFILE
+ DNSMASQ_COPTS += -DNO_LARGEFILE
endif
ifeq ($(BR2_PACKAGE_DBUS),y)
-DNSMASQ_DEPENDENCIES += host-pkg-config dbus
+ DNSMASQ_DEPENDENCIES += host-pkg-config dbus
endif
-$(eval $(call AUTOTARGETS,package,dnsmasq))
-
-$(DNSMASQ_TARGET_CONFIGURE):
ifeq ($(BR2_PACKAGE_DBUS),y)
+define DNSMASQ_ENABLE_DBUS
$(SED) 's^.*#define HAVE_DBUS.*^#define HAVE_DBUS^' \
$(DNSMASQ_DIR)/src/config.h
$(SED) 's^PKG_CONFIG = pkg-config^PKG_CONFIG = $(PKG_CONFIG_HOST_BINARY)^' \
$(DNSMASQ_DIR)/Makefile
$(SED) 's^--cflags dbus-1^--cflags dbus-1 \| sed s\\\#-I/\\\#-I$(STAGING_DIR)/\\\#g^' \
$(DNSMASQ_DIR)/Makefile
+endef
else
+define DNSMASQ_ENABLE_DBUS
$(SED) 's^.*#define HAVE_DBUS.*^/* #define HAVE_DBUS */^' \
$(DNSMASQ_DIR)/src/config.h
+endef
endif
- touch $@
-$(DNSMASQ_TARGET_UNINSTALL):
- $(call MESSAGE,"Uninstalling")
+define DNSMASQ_BUILD_CMDS
+ $(DNSMASQ_ENABLE_DBUS)
+ $(DNSMASQ_MAKE_ENV) $(MAKE) -C $(@D) $(DNSMASQ_MAKE_OPT)
+endef
+
+define DNSMASQ_INSTALL_TARGET_CMDS
+ $(DNSMASQ_MAKE_ENV) $(MAKE) -C $(@D) $(DNSMASQ_MAKE_OPT) install
+endef
+
+define DNSMASQ_UNINSTALL_TARGET_CMDS
rm -f $(TARGET_DIR)/usr/sbin/dnsmasq
rm -f $(TARGET_DIR)/usr/share/man/man8/dnsmasq.8
- rm -f $(DNSMASQ_TARGET_INSTALL_TARGET) $(DNSMASQ_HOOK_POST_INSTALL)
+endef
+
+$(eval $(call GENTARGETS,package,dnsmasq))