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: Makefile 8682 2007-09-07 20:57:08Z nbd $ 8 9include $(TOPDIR)/rules.mk 10 11PKG_NAME:=dnsmasq 12PKG_VERSION:=2.39 13PKG_RELEASE:=1 14 15PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) 16include $(INCLUDE_DIR)/package.mk 17 18config-$(CONFIG_DNSMASQ_SUP_PARENTAL_CTL) += --enable-parental_ctl_support 19config-$(CONFIG_DNSMASQ_SUP_STATIC_PPTP) += --enable-static_pptp_support 20config-$(CONFIG_DNSMASQ_SUP_USBSHARE_DOMAIN) += --enable-usbshare_domain_support 21config-$(CONFIG_DNSMASQ_SUP_IPV6_FEATURE) += --enable-dni_ipv6_feature 22config-$(CONFIG_DNSMASQ_BIND_SRVSOCK_TO_WAN) += --enable-bind_srvsock_to_wan 23config-$(CONFIG_DNSMASQ_START_WHEN_BOOT_UP) += --enable-start_dnsmasq_when_boot_up 24 25define Package/dnsmasq 26 SECTION:=net 27 CATEGORY:=Base system 28 TITLE:=A lightweight DNS and DHCP server 29 URL:=http://www.thekelleys.org.uk/dnsmasq/ 30endef 31 32define Package/dnsmasq/conffiles 33/etc/dnsmasq.conf 34endef 35 36define Package/dnsmasq/description 37 It is intended to provide coupled DNS and DHCP service to a LAN. 38endef 39 40define Package/dnsmasq/config 41 menu "Configuration" 42 depends on PACKAGE_dnsmasq 43 source "$(SOURCE)/Config.in" 44 endmenu 45endef 46 47define Build/Prepare 48 $(CP) $(GIT_HOME)/dnsmasq.git/* $(PKG_BUILD_DIR)/ 49endef 50 51define Build/Configure 52 (cd $(PKG_BUILD_DIR); \ 53 ./configure \ 54 $(config-y) \ 55 ); 56endef 57 58define Build/Compile 59 $(MAKE) -C $(PKG_BUILD_DIR) \ 60 $(TARGET_CONFIGURE_OPTS) \ 61 CFLAGS="$(TARGET_CFLAGS)" \ 62 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -lconfig" \ 63 BINDIR="/usr/sbin" MANDIR="/usr/man" \ 64 all 65endef 66 67define Package/dnsmasq/install 68 $(INSTALL_DIR) $(1)/usr/sbin 69 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dns-hijack $(1)/usr/sbin/ 70 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dnsmasq $(1)/usr/sbin/ 71 $(INSTALL_DIR) $(1)/etc/init.d 72 $(INSTALL_DATA) $(PKG_BUILD_DIR)/dnsmasq.conf $(1)/etc/dnsmasq.conf 73 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dnsmasq.init $(1)/etc/init.d/dnsmasq 74 $(INSTALL_DIR) $(1)/sbin 75 $(INSTALL_BIN) ./files/mul_pppoe_dns $(1)/sbin/ 76endef 77 78$(eval $(call BuildPackage,dnsmasq)) 79