2 # Copyright (C) 2006-2013 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=http
://thekelleys.org.uk
/dnsmasq
16 PKG_MD5SUM
:=c5eb8fb88847a5e9bf18db67c74efd47
19 PKG_LICENSE_FILES
:=COPYING
21 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
26 include $(INCLUDE_DIR
)/package.mk
28 define Package
/dnsmasq
/Default
31 TITLE
:=A lightweight DNS and DHCP server
32 URL
:=http
://www.thekelleys.org.uk
/dnsmasq
/
35 define Package
/dnsmasq
36 $(call Package
/dnsmasq
/Default
)
40 define Package
/dnsmasq-dhcpv6
41 $(call Package
/dnsmasq
/Default
)
42 TITLE
+= (with DHCPv6 support
)
43 DEPENDS
:=@IPV6
+kmod-ipv6
47 define Package
/dnsmasq
/description
48 It is intended to provide coupled DNS and DHCP service to a LAN.
51 define Package
/dnsmasq-dhcpv6
/description
52 $(call Package
/dnsmasq
/description
)
54 This is a variant with DHCPv6 support
57 define Package
/dnsmasq
/conffiles
62 Package
/dnsmasq-dhcpv6
/conffiles
= $(Package
/dnsmasq
/conffiles
)
65 -ffunction-sections
-fdata-sections \
66 $(if
$(CONFIG_IPV6
),,-DNO_IPV6
) -DNO_IPSET
-DNO_AUTH
68 ifeq ($(BUILD_VARIANT
),nodhcpv6
)
69 TARGET_CFLAGS
+= -DNO_DHCP6
73 $(TARGET_CONFIGURE_OPTS
) \
74 CFLAGS
="$(TARGET_CFLAGS)" \
75 LDFLAGS
="-Wl,--gc-sections" \
78 define Package
/dnsmasq
/install
79 $(INSTALL_DIR
) $(1)/usr
/sbin
80 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/dnsmasq
$(1)/usr
/sbin
/
81 $(INSTALL_DIR
) $(1)/etc
/config
82 $(INSTALL_DATA
) .
/files
/dhcp.conf
$(1)/etc
/config
/dhcp
83 $(INSTALL_DATA
) .
/files
/dnsmasq.conf
$(1)/etc
/dnsmasq.conf
84 $(INSTALL_DIR
) $(1)/etc
/init.d
85 $(INSTALL_BIN
) .
/files
/dnsmasq.init
$(1)/etc
/init.d
/dnsmasq
88 Package
/dnsmasq-dhcpv6
/install = $(Package
/dnsmasq
/install)
90 $(eval
$(call BuildPackage
,dnsmasq
))
91 $(eval
$(call BuildPackage
,dnsmasq-dhcpv6
))