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.gz
15 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
16 PKG_MD5SUM:=d10faeb409717eae94718d7716ca63a4
18 include $(INCLUDE_DIR)/package.mk
20 define Package/dnsmasq
23 TITLE:=A lightweight DNS and DHCP server
24 URL:=http://www.thekelleys.org.uk/dnsmasq/
27 define Package/dnsmasq/description
28 It is intended to provide coupled DNS and DHCP service to a LAN.
31 define Package/dnsmasq/conffiles
36 TARGET_CFLAGS += -ffunction-sections -fdata-sections
39 $(MAKE) -C $(PKG_BUILD_DIR) \
40 $(TARGET_CONFIGURE_OPTS) \
41 CFLAGS="$(TARGET_CFLAGS)" \
42 BINDIR="/usr/sbin" MANDIR="/usr/man" \
44 LDFLAGS="-Wl,--gc-sections" \
48 define Package/dnsmasq/install
49 $(INSTALL_DIR) $(1)/usr/sbin
50 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dnsmasq $(1)/usr/sbin/
51 $(INSTALL_DIR) $(1)/etc/config
52 $(INSTALL_DATA) ./files/dhcp.conf $(1)/etc/config/dhcp
53 $(INSTALL_DATA) ./files/dnsmasq.conf $(1)/etc/dnsmasq.conf
54 $(INSTALL_DIR) $(1)/etc/init.d
55 $(INSTALL_BIN) ./files/dnsmasq.init $(1)/etc/init.d/dnsmasq
58 $(eval $(call BuildPackage,dnsmasq))