upgrade dnsmasq to latest version, rewrite dnsmasq init script for uci, rename /bin...
[openwrt/svn-archive/archive.git] / package / dnsmasq / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=dnsmasq
12 PKG_VERSION:=2.38
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
17 PKG_MD5SUM:=ab066a97c226066485ad20e5ad5ce424
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/dnsmasq
22 SECTION:=net
23 CATEGORY:=Base system
24 TITLE:=A lightweight DNS and DHCP server
25 DESCRIPTION:=\
26 It is intended to provide coupled DNS and DHCP service to a LAN.
27 URL:=http://www.thekelleys.org.uk/dnsmasq/
28 endef
29
30 define Package/dnsmasq/conffiles
31 /etc/dnsmasq.conf
32 endef
33
34 define Build/Compile
35 $(MAKE) -C $(PKG_BUILD_DIR) \
36 $(TARGET_CONFIGURE_OPTS) \
37 CFLAGS="$(TARGET_CFLAGS) -DHAVE_ISC_READER=1" \
38 BINDIR="/usr/sbin" MANDIR="/usr/man" \
39 all
40 endef
41
42 define Package/dnsmasq/install
43 $(INSTALL_DIR) $(1)/usr/sbin
44 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dnsmasq $(1)/usr/sbin/
45 $(INSTALL_DIR) $(1)/etc/config
46 $(INSTALL_DATA) ./files/dhcp.conf $(1)/etc/config/dhcp
47 $(INSTALL_DATA) ./files/dnsmasq.conf $(1)/etc/dnsmasq.conf
48 $(INSTALL_DIR) $(1)/etc/init.d
49 $(INSTALL_BIN) ./files/dnsmasq.init $(1)/etc/init.d/dnsmasq
50 endef
51
52 $(eval $(call BuildPackage,dnsmasq))