2 # Copyright (C) 2006-2011 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.xz
15 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
16 PKG_MD5SUM:=00f5ee66b4e4b7f14538bf62ae3c9461
18 include $(INCLUDE_DIR)/package.mk
20 TARGET_CFLAGS += -ffunction-sections -fdata-sections
21 TARGET_LDFLAGS += -Wl,--gc-sections
23 COPTS = -DNO_IPV6 -DNO_DHCP6 -DNO_AUTH -DNO_IPSET -DNO_LARGEFILE -DNO_INOTIFY
26 $(TARGET_CONFIGURE_OPTS) \
27 CFLAGS="$(TARGET_CFLAGS)" \
28 LDFLAGS="$(TARGET_LDFLAGS)" \
32 define Package/dnsmasq
35 TITLE:=A lightweight DNS and DHCP server
36 URL:=http://www.thekelleys.org.uk/dnsmasq/
39 define Package/dnsmasq/description
40 It is intended to provide coupled DNS and DHCP service to a LAN.
43 define Package/dnsmasq/conffiles
49 $(MAKE) -C $(PKG_BUILD_DIR) \
51 $(TARGET_CONFIGURE_OPTS) \
52 CFLAGS="$(TARGET_CFLAGS)" \
53 BINDIR="/usr/sbin" MANDIR="/usr/man" \
58 define Package/dnsmasq/install
59 $(INSTALL_DIR) $(1)/usr/sbin
60 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dnsmasq $(1)/usr/sbin/
61 $(INSTALL_DIR) $(1)/etc/config
62 $(INSTALL_DATA) ./files/dhcp.conf $(1)/etc/config/dhcp
63 $(INSTALL_DATA) ./files/dnsmasq.conf $(1)/etc/dnsmasq.conf
64 $(INSTALL_DIR) $(1)/etc/init.d
65 $(INSTALL_BIN) ./files/dnsmasq.init $(1)/etc/init.d/dnsmasq
68 $(eval $(call BuildPackage,dnsmasq))