Root/package/dnsmasq/Makefile

1#
2# Copyright (C) 2006-2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=dnsmasq
11PKG_VERSION:=2.58
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
16PKG_MD5SUM:=14c5c81debb324adc261db971730f4c6
17
18include $(INCLUDE_DIR)/package.mk
19
20define Package/dnsmasq
21  SECTION:=net
22  CATEGORY:=Base system
23  TITLE:=A lightweight DNS and DHCP server
24  URL:=http://www.thekelleys.org.uk/dnsmasq/
25endef
26
27define Package/dnsmasq/description
28  It is intended to provide coupled DNS and DHCP service to a LAN.
29endef
30
31define Package/dnsmasq/conffiles
32/etc/config/dhcp
33/etc/dnsmasq.conf
34endef
35
36TARGET_CFLAGS += -ffunction-sections -fdata-sections
37
38define Build/Compile
39    $(MAKE) -C $(PKG_BUILD_DIR) \
40        $(TARGET_CONFIGURE_OPTS) \
41        CFLAGS="$(TARGET_CFLAGS)" \
42        BINDIR="/usr/sbin" \
43        MANDIR="/usr/man" \
44        AWK="awk" \
45        LDFLAGS="-Wl,--gc-sections" \
46        all
47endef
48
49define Package/dnsmasq/install
50    $(INSTALL_DIR) $(1)/usr/sbin
51    $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dnsmasq $(1)/usr/sbin/
52    $(INSTALL_DIR) $(1)/etc/config
53    $(INSTALL_DATA) ./files/dhcp.conf $(1)/etc/config/dhcp
54    $(INSTALL_DATA) ./files/dnsmasq.conf $(1)/etc/dnsmasq.conf
55    $(INSTALL_DIR) $(1)/etc/init.d
56    $(INSTALL_BIN) ./files/dnsmasq.init $(1)/etc/init.d/dnsmasq
57endef
58
59$(eval $(call BuildPackage,dnsmasq))
60

Archive Download this file



interactive