summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-dns/mydns')
-rw-r--r--net-dns/mydns/Manifest1
-rw-r--r--net-dns/mydns/files/mydns-1.2.8.27-m4.patch53
-rw-r--r--net-dns/mydns/files/mydns.confd4
-rw-r--r--net-dns/mydns/files/mydns.initd35
-rw-r--r--net-dns/mydns/metadata.xml14
-rw-r--r--net-dns/mydns/mydns-1.2.8.31.ebuild84
6 files changed, 191 insertions, 0 deletions
diff --git a/net-dns/mydns/Manifest b/net-dns/mydns/Manifest
new file mode 100644
index 000000000000..2f4337b6e3b3
--- /dev/null
+++ b/net-dns/mydns/Manifest
@@ -0,0 +1 @@
+DIST mydns-1.2.8.31.tar.gz 958701 SHA256 cb10de11ccd948d3b86296c03c6fb692489945d58b0aaee5d17be083f3263629 SHA512 471dfed9b4f38b446fd5896939faa4c58f4e1b3a3e6928fa84eddf769eba8f3406ef08c77ab39ee79d2ac85c1e72a499b283c7404a0cae9830ffe0faee9e2737 WHIRLPOOL 615e8e129b4d3d7b426b58446f9fef7aaf78d025d1454ba46266d15030dff4a223a033bf6bbc4e6401159a99e1b2eae3d60b6bd76378a3d9e86e2dfd1d06e84f
diff --git a/net-dns/mydns/files/mydns-1.2.8.27-m4.patch b/net-dns/mydns/files/mydns-1.2.8.27-m4.patch
new file mode 100644
index 000000000000..c32e7613b466
--- /dev/null
+++ b/net-dns/mydns/files/mydns-1.2.8.27-m4.patch
@@ -0,0 +1,53 @@
+--- mydns-1.1.0/m4/mydns.m4.orig 2010-12-01 21:57:52.000000000 +0100
++++ mydns-1.1.0/m4/mydns.m4 2010-12-01 22:07:24.000000000 +0100
+@@ -542,46 +542,10 @@
+ ##
+ AC_DEFUN([AC_LIB_MYSQLCLIENT],
+ [
+- libmysqlclient_dirs="/usr/local/mysql/lib /usr/local/lib/mysql /usr/local/lib /usr/lib/mysql /usr/lib /lib"
+- AC_ARG_WITH(mysql-lib,
+- AC_HELP_STRING([--with-mysql-lib=DIR], [look for the MySQL client library in DIR]),
+- libmysqlclient_dirs="$withval $libmysqlclient_dirs")
+- libmysqlclient_found=no, libmysqlclient_ok=no
+- for libmysqlclient_dir in $libmysqlclient_dirs; do
+- if test "$libmysqlclient_found" != yes; then
+- AC_CHECK_FILE($libmysqlclient_dir/libmysqlclient_r.so, libmysqlclient_found=yes, libmysqlclient_found=no)
+- if test "$libmysqlclient_found" != yes; then
+- AC_CHECK_FILE($libmysqlclient_dir/libmysqlclient.so, libmysqlclient_found=yes, libmysqlclient_found=no)
+- fi
+- if test "$libmysqlclient_found" != yes; then
+- AC_CHECK_FILE($libmysqlclient_dir/libmysqlclient.a, libmysqlclient_found=yes, libmysqlclient_found=no)
+- fi
+- if test "$libmysqlclient_found" = yes; then
+- ## libmysqlclient depends on libz
+- if ! test -n "$LIBZ"; then
+- AC_LIB_Z
+- fi
+- if ! test -n "$LIBZ"; then
+- ## No zlib
+- AC_MSG_ERROR([
+-
+-][ ###
+-][ ### zlib compression library (libz.a) not found.
+-][ ###
+-][ ### Please download and install the zlib compression
+-][ ### library from the following URL:
+-][ ###
+-][ ### http://www.gzip.org/zlib/
+-][ ###
+-][ ### (Error detail might be available in `config.log')
+-][ ###
+-])
+- fi
+- LIBMYSQLCLIENT="-L$libmysqlclient_dir -lmysqlclient"
+- libmysqlclient_found=yes
+- fi
+- fi
+- done
++ AC_CHECK_PROG(LIBMYSQLCLIENT,mysql_config,`mysql_config --libs`)
++ if test -z "$LIBMYSQLCLIENT"; then
++ AC_MSG_ERROR([Could not find mysql_config script. Make sure the mysql client libraries are installed])
++ fi
+ AC_SUBST(LIBMYSQLCLIENT)
+ ]
+ )
diff --git a/net-dns/mydns/files/mydns.confd b/net-dns/mydns/files/mydns.confd
new file mode 100644
index 000000000000..1040f4b93c15
--- /dev/null
+++ b/net-dns/mydns/files/mydns.confd
@@ -0,0 +1,4 @@
+MYDNS_CONFFILE="/etc/mydns.conf"
+
+#MYDNS_EXTRA_OPTS="--verbose"
+MYDNS_EXTRA_OPTS=""
diff --git a/net-dns/mydns/files/mydns.initd b/net-dns/mydns/files/mydns.initd
new file mode 100644
index 000000000000..970876191731
--- /dev/null
+++ b/net-dns/mydns/files/mydns.initd
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+MYDNS_CHECKCONF="/usr/bin/mydnscheck"
+MYDNS_CONFFILE="${MYDNS_CONFFILE:-/etc/mydns.conf}"
+
+command="/usr/sbin/mydns"
+command_args="--background --conf=${MYDNS_CONFFILE} ${MYDNS_EXTRA_OPTS}"
+extra_commands="configtest"
+extra_started_commands="reload"
+pidfile="$(grep '^pidfile' ${MYDNS_CONFFILE} | sed -e 's/^pidfile\s*=\s*\([^# ]\+\?\)\s*\(#.*\)\?$/\1/')"
+pidfile="${pidfile:-/var/run/mydns.pid}"
+
+depend() {
+ need net
+ use logger mysql postgresql
+}
+
+checkconfig() {
+ "${MYDNS_CHECKCONF}" --conf="${MYDNS_CONFFILE}"
+ return $?
+}
+
+configtest() {
+ ebegin "Checking ${SVCNAME} configuration"
+ checkconfig
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+}
diff --git a/net-dns/mydns/metadata.xml b/net-dns/mydns/metadata.xml
new file mode 100644
index 000000000000..64ae6d97c0f6
--- /dev/null
+++ b/net-dns/mydns/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name='alias'>Enable David Phillips aliasing</flag>
+ <flag name='status'>Enable the STATUS opcode to check server status</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">mydns-ng</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dns/mydns/mydns-1.2.8.31.ebuild b/net-dns/mydns/mydns-1.2.8.31.ebuild
new file mode 100644
index 000000000000..f415cff53f8e
--- /dev/null
+++ b/net-dns/mydns/mydns-1.2.8.31.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="A DNS-Server which gets its data from a MySQL-/PostgreSQL-database"
+HOMEPAGE="http://www.mydns.pl/"
+SRC_URI="mirror://sourceforge/mydns-ng/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~hppa ia64 ~ppc sparc x86"
+IUSE="alias debug nls mysql postgres ssl static status"
+
+RDEPEND="mysql? ( virtual/mysql )
+ nls? ( virtual/libintl )
+ postgres? ( dev-db/postgresql )
+ ssl? ( dev-libs/openssl )
+ virtual/libiconv"
+DEPEND="${RDEPEND}
+ nls? ( >=sys-devel/gettext-0.12 )
+ sys-devel/bison"
+
+REQUIRED_USE="^^ ( mysql postgres )"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.2.8.27-m4.patch"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable alias) \
+ $(use_enable nls) \
+ $(use_enable debug) \
+ $(use_with mysql) \
+ $(use_with postgres pgsql) \
+ $(use_enable static) \
+ $(use_enable static static-build) \
+ $(use_enable status) \
+ $(use_with ssl openssl) \
+ --without-included-gettext
+}
+
+src_install() {
+ default
+
+ dodoc AUTHORS BUGS ChangeLog QUICKSTART* NEWS README* TODO
+ docinto contrib
+ dodoc contrib/*.php contrib/*.pl contrib/*.pm contrib/README*
+
+ newinitd "${FILESDIR}/mydns.initd" mydns
+ newconfd "${FILESDIR}/mydns.confd" mydns
+
+ ## Avoid file collision
+ rm -f "${ED}/usr/share/locale/locale.alias"
+
+ # Install config file
+ insinto /etc
+ newins mydns.conf mydns.conf
+ fowners root:root /etc/mydns.conf
+ fperms 0600 /etc/mydns.conf
+}
+
+pkg_postinst() {
+ if use postgres; then
+ elog "# createdb mydns"
+ elog "# /usr/sbin/mydns --create-tables | psql mydns"
+ elog
+ elog "to create the tables in the PostgreSQL-Database."
+ elog "For more info see QUICKSTART.postgres."
+ fi
+ if use mysql; then
+ elog "# mysqladmin -u <useruname> -p create mydns"
+ elog "# /usr/sbin/mydns --create-tables | mysql -u <username> -p mydns"
+ elog
+ elog "to create the tables in the MySQL-Database."
+ elog "For more info see QUICKSTART.mysql."
+ fi
+ elog
+}