Port maradns to -ng

git-svn-id: svn://svn.openwrt.org/openwrt/packages@4423 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2006-08-03 14:16:41 +00:00
parent d9332a6295
commit d66c286be3
4 changed files with 95 additions and 0 deletions

69
net/maradns/Makefile Normal file
View File

@ -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))

View File

@ -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

9
net/maradns/files/mararc Normal file
View File

@ -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"

View File

@ -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