add a default for PKG_BUILD_DIR and PKG_INSTALL_DIR (will use KERNEL_BUILD_DIR if...
[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.35
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:=57b8643dc394cf2fbd1bced64536c6df
18 PKG_CAT:=zcat
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/dnsmasq
23 SECTION:=net
24 CATEGORY:=Base system
25 TITLE:=A lightweight DNS and DHCP server
26 DESCRIPTION:=\
27 It is intended to provide coupled DNS and DHCP service to a LAN.
28 URL:=http://www.thekelleys.org.uk/dnsmasq/
29 endef
30
31 define Package/dnsmasq/conffiles
32 /etc/dnsmasq.conf
33 endef
34
35 define Build/Compile
36 $(MAKE) -C $(PKG_BUILD_DIR) \
37 $(TARGET_CONFIGURE_OPTS) \
38 CFLAGS="$(TARGET_CFLAGS) -DHAVE_ISC_READER=1" \
39 BINDIR="/usr/sbin" MANDIR="/usr/man" \
40 all
41 endef
42
43 define Package/dnsmasq/install
44 $(INSTALL_DIR) $(1)/usr/sbin
45 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dnsmasq $(1)/usr/sbin/
46 $(INSTALL_DIR) $(1)/etc
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))