Port maradns to -ng
authorFlorian Fainelli <florian@openwrt.org>
Thu, 3 Aug 2006 14:16:41 +0000 (14:16 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Thu, 3 Aug 2006 14:16:41 +0000 (14:16 +0000)
SVN-Revision: 4423

net/maradns/Makefile [new file with mode: 0644]
net/maradns/files/maradns.init [new file with mode: 0644]
net/maradns/files/mararc [new file with mode: 0644]
net/maradns/patches/cross-compile-fix.patch [new file with mode: 0644]

diff --git a/net/maradns/Makefile b/net/maradns/Makefile
new file mode 100644 (file)
index 0000000..d019f94
--- /dev/null
@@ -0,0 +1,69 @@
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=maradns
+PKG_VERSION:=1.2.07.2
+PKG_RELEASE:=1
+PKG_MD5SUM:=dc67f6a496e668127871382a40367733
+
+PKG_SOURCE_URL:=http://www.maradns.org/download/1.2/1.2.07.2/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_CAT:=bzcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/maradns
+  SECTION:=net
+  CATEGORY:=Network
+  DEPENDS:=+libpthread
+  TITLE:=Small and secure DNS Server
+  DESCRIPTION:=A small and secure DNS server
+  URL:=http://www.maradns.org/
+endef
+
+define Package/maradns/conffiles
+/etc/mararc
+endef
+
+define Build/Configure
+       (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
+               $(TARGET_CONFIGURE_OPTS) \
+               ./configure \
+       );
+endef
+
+define Build/Compile   
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               CFLAGS="$(TARGET_CFLAGS)" \
+               FLAGS="$(TARGET_CFLAGS)" \
+               CC=$(TARGET_CC) \
+               HOSTCC="$(HOSTCC)"
+       mkdir -p $(PKG_INSTALL_DIR)/usr/{bin,sbin}
+       mkdir -p $(PKG_INSTALL_DIR)/usr/man/man{1,5,8}
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               PREFIX="$(PKG_INSTALL_DIR)/usr" \
+               RPM_BUILD_ROOT="$(PKG_INSTALL_DIR)" \
+               install
+endef
+
+define Package/maradns/install 
+       install -d -m0755 $(1)/etc
+       install -m0644 ./files/mararc $(1)/etc/mararc
+       install -d -m0755 $(1)/etc/init.d
+       install -m0755 ./files/maradns.init $(1)/etc/init.d/S60maradns
+       install -d -m0755 $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/{askmara,getzone,fetchzone,duende} $(1)/usr/bin/
+       install -d -m0755 $(1)/usr/sbin
+       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/{maradns,zoneserver} $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,maradns))
diff --git a/net/maradns/files/maradns.init b/net/maradns/files/maradns.init
new file mode 100644 (file)
index 0000000..1b3df1f
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+[ -d /etc/maradns ] || mkdir -p /etc/maradns
+[ -d /etc/maradns/logger ] || mkdir -p /etc/maradns/logger
+duende /usr/sbin/maradns
+duende /usr/sbin/zoneserver
diff --git a/net/maradns/files/mararc b/net/maradns/files/mararc
new file mode 100644 (file)
index 0000000..e67ee99
--- /dev/null
@@ -0,0 +1,9 @@
+hide_disclaimer="YES"
+chroot_dir="/etc/maradns"
+bind_address="0.0.0.0"
+maradns_uid=65534
+maxprocs=10
+random_seed_file="/dev/urandom"
+recursive_acl="192.168.1.0/24"
+root_servers={}
+root_servers["."]="198.41.0.4,128.9.0.107,192.33.4.12,128.8.10.90,192.203.230.10,192.5.5.241,192.112.36.4,128.63.2.53,192.36.148.17,192.58.128.30,193.0.14.129,198.32.64.12,202.12.27.33"
diff --git a/net/maradns/patches/cross-compile-fix.patch b/net/maradns/patches/cross-compile-fix.patch
new file mode 100644 (file)
index 0000000..d8ee0e0
--- /dev/null
@@ -0,0 +1,12 @@
+diff -urN maradns-1.0.26.old/rng/Makefile maradns-1.0.26.dev/rng/Makefile
+--- maradns-1.0.26.old/rng/Makefile    2003-08-02 21:39:36.000000000 +0200
++++ maradns-1.0.26.dev/rng/Makefile    2005-04-30 23:29:30.000000000 +0200
+@@ -20,7 +20,7 @@
+       $(CC) -c $(FLAGS) -o rng-api-fst.o rng-api-fst.c
+ make_32bit_tables: make_32bit_tables.c
+-      $(CC) -o make_32bit_tables make_32bit_tables.c
++      $(HOSTCC) -o make_32bit_tables make_32bit_tables.c
+ rng-32bit-tables.h: make_32bit_tables
+       ./make_32bit_tables > rng-32bit-tables.h