add maradns
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 30 Apr 2005 20:45:11 +0000 (20:45 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 30 Apr 2005 20:45:11 +0000 (20:45 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@777 3c298f89-4303-0410-b956-a3cf2f4a3e73

openwrt/package/Config.in
openwrt/package/Makefile
openwrt/package/maradns/Config.in [new file with mode: 0644]
openwrt/package/maradns/Makefile [new file with mode: 0644]
openwrt/package/maradns/files/etc/init.d/S60maradns [new file with mode: 0755]
openwrt/package/maradns/files/etc/maradns/maradnsrc [new file with mode: 0644]
openwrt/package/maradns/maradns.control [new file with mode: 0644]
openwrt/package/maradns/patches/cross-compile-fix.patch [new file with mode: 0644]

index efd7937..835001c 100644 (file)
@@ -57,6 +57,7 @@ source "package/nmap/Config.in"
 source "package/l2tpd/Config.in"
 source "package/tinc/Config.in"
 source "package/fprobe/Config.in"
+source "package/maradns/Config.in"
 
 comment "Libraries"
 source "package/libpthread/Config.in"
index bf9d04f..7a2e962 100644 (file)
@@ -34,6 +34,7 @@ package-$(BR2_PACKAGE_LIBPTHREAD) += libpthread
 package-$(BR2_PACKAGE_LIBUSB) += libusb
 package-$(BR2_PACKAGE_LZO) += lzo
 package-$(BR2_PACKAGE_MATRIXSSL) += matrixssl
+package-$(BR2_PACKAGE_MARADNS) += maradns
 package-$(BR2_PACKAGE_MICROPERL) += microperl
 package-$(BR2_PACKAGE_MONIT) += monit
 package-$(BR2_PACKAGE_NCURSES) += ncurses
diff --git a/openwrt/package/maradns/Config.in b/openwrt/package/maradns/Config.in
new file mode 100644 (file)
index 0000000..8b89dcd
--- /dev/null
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_MARADNS
+       tristate "MaraDNS"
+       default m if CONFIG_DEVEL
+       help
+         A small secure DNS server
diff --git a/openwrt/package/maradns/Makefile b/openwrt/package/maradns/Makefile
new file mode 100644 (file)
index 0000000..7394630
--- /dev/null
@@ -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/openwrt/package/maradns/files/etc/init.d/S60maradns b/openwrt/package/maradns/files/etc/init.d/S60maradns
new file mode 100755 (executable)
index 0000000..a7a92a8
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+/usr/sbin/maradns -f /etc/maradns/maradnsrc >/dev/null 2>&1 &
diff --git a/openwrt/package/maradns/files/etc/maradns/maradnsrc b/openwrt/package/maradns/files/etc/maradns/maradnsrc
new file mode 100644 (file)
index 0000000..ee91cbc
--- /dev/null
@@ -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/openwrt/package/maradns/maradns.control b/openwrt/package/maradns/maradns.control
new file mode 100644 (file)
index 0000000..b217503
--- /dev/null
@@ -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/openwrt/package/maradns/patches/cross-compile-fix.patch b/openwrt/package/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
This page took 0.030336 seconds and 4 git commands to generate.