cb723d528f1c47a55f1aa37e6e0ee73c7803d409
[openwrt/openwrt.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.40
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:=91b6063ae81146b9d70b4381b2f3e44f
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 URL:=http://www.thekelleys.org.uk/dnsmasq/
26 endef
27
28 define Package/dnsmasq/conffiles
29 /etc/dnsmasq.conf
30 endef
31
32 define Package/dnsmasq/description
33 It is intended to provide coupled DNS and DHCP service to a LAN.
34 endef
35
36 define Build/Compile
37 $(MAKE) -C $(PKG_BUILD_DIR) \
38 $(TARGET_CONFIGURE_OPTS) \
39 CFLAGS="$(TARGET_CFLAGS) -DHAVE_ISC_READER=1" \
40 BINDIR="/usr/sbin" MANDIR="/usr/man" \
41 all
42 endef
43
44 define Package/dnsmasq/install
45 $(INSTALL_DIR) $(1)/usr/sbin
46 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dnsmasq $(1)/usr/sbin/
47 $(INSTALL_DIR) $(1)/etc/config
48 $(INSTALL_DATA) ./files/dhcp.conf $(1)/etc/config/dhcp
49 $(INSTALL_DATA) ./files/dnsmasq.conf $(1)/etc/dnsmasq.conf
50 $(INSTALL_DIR) $(1)/etc/init.d
51 $(INSTALL_BIN) ./files/dnsmasq.init $(1)/etc/init.d/dnsmasq
52 endef
53
54 $(eval $(call BuildPackage,dnsmasq))