989bbd90df73e6ecac4e6f528af3dc8984c3db5a
[openwrt/svn-archive/archive.git] / net / maradns / 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:=maradns
12 PKG_VERSION:=1.2.07.2
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://www.maradns.org/download/1.2/1.2.07.2/
17 PKG_MD5SUM:=dc67f6a496e668127871382a40367733
18 PKG_CAT:=bzcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/maradns
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+libpthread
29 TITLE:=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 # it's not GNU autoconf stuff
39 (cd $(PKG_BUILD_DIR); \
40 $(TARGET_CONFIGURE_OPTS) \
41 ./configure \
42 );
43 endef
44
45 define Build/Compile
46 $(MAKE) -C $(PKG_BUILD_DIR) \
47 CFLAGS="$(TARGET_CFLAGS)" \
48 FLAGS="$(TARGET_CFLAGS)" \
49 CC="$(TARGET_CC)" \
50 HOSTCC="$(HOSTCC)" \
51 V=
52 mkdir -p $(PKG_INSTALL_DIR)/usr/{bin,sbin}
53 mkdir -p $(PKG_INSTALL_DIR)/usr/man/man{1,5,8}
54 $(MAKE) -C $(PKG_BUILD_DIR) \
55 PREFIX="$(PKG_INSTALL_DIR)/usr" \
56 RPM_BUILD_ROOT="$(PKG_INSTALL_DIR)" \
57 V= \
58 install
59 endef
60
61 define Package/maradns/install
62 install -d -m0755 $(1)/etc
63 install -m0644 ./files/mararc $(1)/etc/mararc
64 install -d -m0755 $(1)/etc/init.d
65 install -m0755 ./files/maradns.init $(1)/etc/init.d/maradns
66 install -d -m0755 $(1)/usr/bin
67 $(CP) $(PKG_INSTALL_DIR)/usr/bin/{askmara,getzone,fetchzone,duende} $(1)/usr/bin/
68 install -d -m0755 $(1)/usr/sbin
69 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/{maradns,zoneserver} $(1)/usr/sbin/
70 endef
71
72 $(eval $(call BuildPackage,maradns))