aboutsummaryrefslogtreecommitdiffstats
path: root/package/maradns
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2005-04-30 20:45:11 +0000
committerFelix Fietkau <nbd@openwrt.org>2005-04-30 20:45:11 +0000
commitdd245380cb6a7ca6f5ef57524ef1a29ce69197f0 (patch)
treed6db5d409ef68633393a9ab1653822cd3bc6f27b /package/maradns
parent613ed46db3b8e0d8eee4e1d628249cb2653afe9a (diff)
downloadupstream-dd245380cb6a7ca6f5ef57524ef1a29ce69197f0.tar.gz
upstream-dd245380cb6a7ca6f5ef57524ef1a29ce69197f0.tar.bz2
upstream-dd245380cb6a7ca6f5ef57524ef1a29ce69197f0.zip
add maradns
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@777 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/maradns')
-rw-r--r--package/maradns/Config.in5
-rw-r--r--package/maradns/Makefile87
-rwxr-xr-xpackage/maradns/files/etc/init.d/S60maradns2
-rw-r--r--package/maradns/files/etc/maradns/maradnsrc9
-rw-r--r--package/maradns/maradns.control10
-rw-r--r--package/maradns/patches/cross-compile-fix.patch12
6 files changed, 125 insertions, 0 deletions
diff --git a/package/maradns/Config.in b/package/maradns/Config.in
new file mode 100644
index 0000000000..8b89dcd5b3
--- /dev/null
+++ b/package/maradns/Config.in
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_MARADNS
+ tristate "MaraDNS"
+ default m if CONFIG_DEVEL
+ help
+ A small secure DNS server
diff --git a/package/maradns/Makefile b/package/maradns/Makefile
new file mode 100644
index 0000000000..7394630c69
--- /dev/null
+++ b/package/maradns/Makefile
@@ -0,0 +1,87 @@
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=maradns
+PKG_VERSION:=1.0.26
+PKG_RELEASE:=1
+PKG_MD5SUM:=b3180ad1f250a4e3820613e711ae159b
+
+PKG_SOURCE_URL:=http://www.maradns.org/download
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_CAT:=bzcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+IPKG_MARADNS:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
+IDIR_MARADNS:=$(PKG_BUILD_DIR)/ipkg/$(PKG_NAME)
+INFO_MARADNS:=$(IPKG_STATE_DIR)/info/$(PKG_NAME).list
+
+$(DL_DIR)/$(PKG_SOURCE):
+ $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
+
+$(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
+ $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ $(PATCH) $(PKG_BUILD_DIR) ./patches
+ touch $(PKG_BUILD_DIR)/.prepared
+
+$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
+ (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
+ $(TARGET_CONFIGURE_OPTS) \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --program-prefix="" \
+ --program-suffix="" \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --datadir=/usr/share \
+ --includedir=/usr/include \
+ --infodir=/usr/share/info \
+ --libdir=/usr/lib \
+ --libexecdir=/usr/lib \
+ --localstatedir=/var \
+ --mandir=/usr/share/man \
+ --sbindir=/usr/sbin \
+ --sysconfdir=/etc \
+ $(DISABLE_NLS) \
+ $(DISABLE_LARGEFILE) \
+ );
+ touch $(PKG_BUILD_DIR)/.configured
+
+$(PKG_BUILD_DIR)/$(PKG_NAME): $(PKG_BUILD_DIR)/.configured
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ FLAGS="$(TARGET_CFLAGS)" \
+ CC=$(TARGET_CC) \
+ HOSTCC="$(HOSTCC)"
+
+$(IPKG_MARADNS): $(PKG_BUILD_DIR)/$(PKG_NAME)
+ $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_MARADNS) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
+ mkdir -p $(IDIR_MARADNS)/usr/bin
+ mkdir -p $(IDIR_MARADNS)/usr/sbin
+ cp $(PKG_BUILD_DIR)/server/maradns $(IDIR_MARADNS)/usr/sbin/
+ cp $(PKG_BUILD_DIR)/tuzona/getzone $(IDIR_MARADNS)/usr/bin/
+ cp $(PKG_BUILD_DIR)/tuzona/zoneserver $(IDIR_MARADNS)/usr/sbin/
+ cp $(PKG_BUILD_DIR)/tools/askmara $(IDIR_MARADNS)/usr/bin/
+ $(STRIP) $(IDIR_MARADNS)/usr/sbin/*
+ $(STRIP) $(IDIR_MARADNS)/usr/bin/*
+ cp -a ./files/* $(IDIR_MARADNS)/
+ find $(IDIR_MARADNS) -name CVS | xargs rm -rf
+ echo "/etc/maradns/maradnsrc" > $(IDIR_MARADNS)/CONTROL/conffiles
+ chmod 755 $(IDIR_MARADNS)/etc/init.d/*
+ mkdir -p $(PACKAGE_DIR)
+ $(IPKG_BUILD) $(IDIR_MARADNS) $(PACKAGE_DIR)
+
+$(INFO_MARADNS): $(IPKG_MARADNS)
+ $(IPKG) install $(IPKG_MARADNS)
+
+source: $(DL_DIR)/$(PKG_SOURCE)
+prepare: $(PKG_BUILD_DIR)/.prepared
+compile: $(IPKG_MARADNS)
+install: $(INFO_MARADNS)
+
+clean:
+ rm -rf $(PKG_BUILD_DIR) $(IPKG_MARADNS)
diff --git a/package/maradns/files/etc/init.d/S60maradns b/package/maradns/files/etc/init.d/S60maradns
new file mode 100755
index 0000000000..a7a92a8ce5
--- /dev/null
+++ b/package/maradns/files/etc/init.d/S60maradns
@@ -0,0 +1,2 @@
+#!/bin/sh
+/usr/sbin/maradns -f /etc/maradns/maradnsrc >/dev/null 2>&1 &
diff --git a/package/maradns/files/etc/maradns/maradnsrc b/package/maradns/files/etc/maradns/maradnsrc
new file mode 100644
index 0000000000..ee91cbc1ef
--- /dev/null
+++ b/package/maradns/files/etc/maradns/maradnsrc
@@ -0,0 +1,9 @@
+hide_disclaimer="YES"
+chroot_dir="/etc/maradns"
+bind_address="0.0.0.0"
+run_as_root=1
+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/package/maradns/maradns.control b/package/maradns/maradns.control
new file mode 100644
index 0000000000..b2175038d0
--- /dev/null
+++ b/package/maradns/maradns.control
@@ -0,0 +1,10 @@
+Package: maradns
+Maintainer: Felix Fietkau <nbd@vd-s.ath.cx>
+Source: buildroot internal
+Section: net
+Priority: optional
+Depends: libpthread
+Description: MaraDNS is a small, secure DNS Server
+ MaraDNS is intended for environments where a DNS
+ server must be secure and where the server must use
+ the absolute minimum number of resources possible.
diff --git a/package/maradns/patches/cross-compile-fix.patch b/package/maradns/patches/cross-compile-fix.patch
new file mode 100644
index 0000000000..d8ee0e0512
--- /dev/null
+++ b/package/maradns/patches/cross-compile-fix.patch
@@ -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