diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-04-30 20:45:11 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-04-30 20:45:11 +0000 |
commit | 1c6c103a4ffeb0aff697d723462f44b8ed0839f8 (patch) | |
tree | d2895baf9b5c0d8ff8bc5ba760592eaf2492fcad | |
parent | f1dc797d9fc0f0d934a04a347c145e60370c9f9d (diff) |
add maradns
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@777 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | openwrt/package/Config.in | 1 | ||||
-rw-r--r-- | openwrt/package/Makefile | 1 | ||||
-rw-r--r-- | openwrt/package/maradns/Config.in | 5 | ||||
-rw-r--r-- | openwrt/package/maradns/Makefile | 87 | ||||
-rwxr-xr-x | openwrt/package/maradns/files/etc/init.d/S60maradns | 2 | ||||
-rw-r--r-- | openwrt/package/maradns/files/etc/maradns/maradnsrc | 9 | ||||
-rw-r--r-- | openwrt/package/maradns/maradns.control | 10 | ||||
-rw-r--r-- | openwrt/package/maradns/patches/cross-compile-fix.patch | 12 |
8 files changed, 127 insertions, 0 deletions
diff --git a/openwrt/package/Config.in b/openwrt/package/Config.in index efd7937001..835001c1ab 100644 --- a/openwrt/package/Config.in +++ b/openwrt/package/Config.in @@ -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" diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile index bf9d04f89a..7a2e962249 100644 --- a/openwrt/package/Makefile +++ b/openwrt/package/Makefile @@ -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 index 0000000000..8b89dcd5b3 --- /dev/null +++ b/openwrt/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/openwrt/package/maradns/Makefile b/openwrt/package/maradns/Makefile new file mode 100644 index 0000000000..7394630c69 --- /dev/null +++ b/openwrt/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/openwrt/package/maradns/files/etc/init.d/S60maradns b/openwrt/package/maradns/files/etc/init.d/S60maradns new file mode 100755 index 0000000000..a7a92a8ce5 --- /dev/null +++ b/openwrt/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/openwrt/package/maradns/files/etc/maradns/maradnsrc b/openwrt/package/maradns/files/etc/maradns/maradnsrc new file mode 100644 index 0000000000..ee91cbc1ef --- /dev/null +++ b/openwrt/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/openwrt/package/maradns/maradns.control b/openwrt/package/maradns/maradns.control new file mode 100644 index 0000000000..b2175038d0 --- /dev/null +++ b/openwrt/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/openwrt/package/maradns/patches/cross-compile-fix.patch b/openwrt/package/maradns/patches/cross-compile-fix.patch new file mode 100644 index 0000000000..d8ee0e0512 --- /dev/null +++ b/openwrt/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 |