add quotes to TARGET_CC and TARGET_CROSS to help with distcc and ccache (yet again)
[openwrt/svn-archive/archive.git] / net / maradns / Makefile
1 # Copyright (C) 2006 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6 # $Id$
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=maradns
11 PKG_VERSION:=1.2.07.2
12 PKG_RELEASE:=1
13 PKG_MD5SUM:=dc67f6a496e668127871382a40367733
14
15 PKG_SOURCE_URL:=http://www.maradns.org/download/1.2/1.2.07.2/
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_CAT:=bzcat
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/maradns
25 SECTION:=net
26 CATEGORY:=Network
27 DEPENDS:=+libpthread
28 TITLE:=Small and secure DNS Server
29 DESCRIPTION:=A small and secure DNS server
30 URL:=http://www.maradns.org/
31 endef
32
33 define Package/maradns/conffiles
34 /etc/mararc
35 endef
36
37 define Build/Configure
38 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
39 $(TARGET_CONFIGURE_OPTS) \
40 ./configure \
41 );
42 endef
43
44 define Build/Compile
45 $(MAKE) -C $(PKG_BUILD_DIR) \
46 CFLAGS="$(TARGET_CFLAGS)" \
47 FLAGS="$(TARGET_CFLAGS)" \
48 CC="$(TARGET_CC)" \
49 HOSTCC="$(HOSTCC)"
50 mkdir -p $(PKG_INSTALL_DIR)/usr/{bin,sbin}
51 mkdir -p $(PKG_INSTALL_DIR)/usr/man/man{1,5,8}
52 $(MAKE) -C $(PKG_BUILD_DIR) \
53 PREFIX="$(PKG_INSTALL_DIR)/usr" \
54 RPM_BUILD_ROOT="$(PKG_INSTALL_DIR)" \
55 install
56 endef
57
58 define Package/maradns/install
59 install -d -m0755 $(1)/etc
60 install -m0644 ./files/mararc $(1)/etc/mararc
61 install -d -m0755 $(1)/etc/init.d
62 install -m0755 ./files/maradns.init $(1)/etc/init.d/S60maradns
63 install -d -m0755 $(1)/usr/bin
64 $(CP) $(PKG_INSTALL_DIR)/usr/bin/{askmara,getzone,fetchzone,duende} $(1)/usr/bin/
65 install -d -m0755 $(1)/usr/sbin
66 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/{maradns,zoneserver} $(1)/usr/sbin/
67 endef
68
69 $(eval $(call BuildPackage,maradns))