2004-04-04 04:33:03 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# dnsmasq
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
2007-09-10 11:04:03 +02:00
|
|
|
DNSMASQ_SITE:=http://thekelleys.org.uk/dnsmasq
|
2008-03-02 15:36:46 +01:00
|
|
|
DNSMASQ_UPVER:=2.41
|
2007-09-10 11:04:03 +02:00
|
|
|
DNSMASQ_SOURCE:=dnsmasq-$(DNSMASQ_UPVER).tar.gz
|
|
|
|
DNSMASQ_DIR:=$(BUILD_DIR)/dnsmasq-$(DNSMASQ_UPVER)
|
|
|
|
DNSMASQ_BINARY:=dnsmasq
|
|
|
|
DNSMASQ_TARGET_BINARY:=usr/sbin/dnsmasq
|
|
|
|
|
|
|
|
DNSMASQ_COPTS:=
|
2008-03-02 15:36:40 +01:00
|
|
|
|
|
|
|
ifneq ($(BR2_INET_IPV6),y)
|
|
|
|
DNSMASQ_COPTS+=-DNO_IPV6
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(BR2_PACKAGE_DNSMASQ_TFTP),y)
|
|
|
|
DNSMASQ_COPTS+=-DNO_TFTP
|
2004-04-04 04:33:03 +02:00
|
|
|
endif
|
|
|
|
|
2008-03-02 15:36:43 +01:00
|
|
|
ifeq ($(strip $(BR2_PACKAGE_DBUS)),y)
|
|
|
|
DNSMASQ_DBUS:=$(TARGET_DIR)/usr/bin/dbus-daemon
|
|
|
|
else
|
|
|
|
DNSMASQ_DBUS:=
|
|
|
|
endif
|
|
|
|
|
2004-04-04 04:33:03 +02:00
|
|
|
$(DL_DIR)/$(DNSMASQ_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(DNSMASQ_SITE)/$(DNSMASQ_SOURCE)
|
|
|
|
|
|
|
|
$(DNSMASQ_DIR)/.source: $(DL_DIR)/$(DNSMASQ_SOURCE)
|
2006-10-01 17:17:52 +02:00
|
|
|
$(ZCAT) $(DL_DIR)/$(DNSMASQ_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2008-03-02 15:36:35 +01:00
|
|
|
toolchain/patch-kernel.sh $(DNSMASQ_DIR) package/dnsmasq/ \*.patch
|
2007-08-20 11:25:47 +02:00
|
|
|
touch $@
|
2004-04-04 04:33:03 +02:00
|
|
|
|
2008-03-02 15:36:43 +01:00
|
|
|
$(DNSMASQ_DIR)/src/$(DNSMASQ_BINARY): $(DNSMASQ_DIR)/.source $(DNSMASQ_DBUS)
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_DBUS)),y)
|
|
|
|
$(SED) 's^.*#define HAVE_DBUS.*^#define HAVE_DBUS^' \
|
|
|
|
$(DNSMASQ_DIR)/src/config.h
|
|
|
|
else
|
|
|
|
$(SED) 's^.*#define HAVE_DBUS.*^/* #define HAVE_DBUS */^' \
|
|
|
|
$(DNSMASQ_DIR)/src/config.h
|
|
|
|
endif
|
2004-04-04 04:33:03 +02:00
|
|
|
$(MAKE) CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" \
|
2008-03-02 15:36:40 +01:00
|
|
|
COPTS='$(DNSMASQ_COPTS)' PREFIX=/usr -C $(DNSMASQ_DIR)
|
2004-04-04 04:33:03 +02:00
|
|
|
|
2004-10-08 17:49:42 +02:00
|
|
|
$(TARGET_DIR)/$(DNSMASQ_TARGET_BINARY): $(DNSMASQ_DIR)/src/$(DNSMASQ_BINARY)
|
2007-08-20 11:25:47 +02:00
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(DNSMASQ_DIR) install
|
2007-10-01 18:15:31 +02:00
|
|
|
$(STRIPCMD) $(TARGET_DIR)/$(DNSMASQ_TARGET_BINARY)
|
2007-07-23 10:47:32 +02:00
|
|
|
mkdir -p $(TARGET_DIR)/var/lib/misc
|
2008-03-02 15:36:35 +01:00
|
|
|
# Isn't this vulnerable to symlink attacks?
|
2007-07-23 10:47:32 +02:00
|
|
|
ln -sf /tmp/dnsmasq.leases $(TARGET_DIR)/var/lib/misc/dnsmasq.leases
|
2007-09-10 11:04:03 +02:00
|
|
|
ifneq ($(BR2_HAVE_MANPAGES),y)
|
|
|
|
rm -rf $(TARGET_DIR)/usr/share/man
|
|
|
|
endif
|
2004-04-04 04:33:03 +02:00
|
|
|
|
|
|
|
dnsmasq: uclibc $(TARGET_DIR)/$(DNSMASQ_TARGET_BINARY)
|
|
|
|
|
|
|
|
dnsmasq-source: $(DL_DIR)/$(DNSMASQ_SOURCE)
|
|
|
|
|
|
|
|
dnsmasq-clean:
|
2007-08-20 11:25:47 +02:00
|
|
|
rm -f $(addprefix $(TARGET_DIR)/,var/lib/misc/dnsmasq.leases \
|
|
|
|
usr/share/man/man?/dnsmasq.* \
|
|
|
|
$(DNSMASQ_TARGET_BINARY))
|
2004-04-04 04:33:03 +02:00
|
|
|
-$(MAKE) -C $(DNSMASQ_DIR) clean
|
|
|
|
|
|
|
|
dnsmasq-dirclean:
|
|
|
|
rm -rf $(DNSMASQ_DIR)
|
2005-02-10 04:06:39 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_DNSMASQ)),y)
|
|
|
|
TARGETS+=dnsmasq
|
|
|
|
endif
|