--- mydns-1.1.0-r2.ebuild 2008-12-28 02:38:57.000000000 +0100 +++ mydns-1.2.8.27.ebuild 2009-04-09 01:40:51.292413526 +0200 @@ -1,40 +1,29 @@ -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-dns/mydns/mydns-1.1.0-r2.ebuild,v 1.1 2008/12/28 01:38:57 matsuu Exp $ - -WANT_AUTOCONF="latest" -WANT_AUTOMAKE="latest" +# $Header: inherit autotools eutils -DESCRIPTION="A DNS-Server which gets its data from mysql-databases" -HOMEPAGE="http://mydns.bboy.net/" -SRC_URI="http://mydns.bboy.net/download/${P}.tar.bz2" +DESCRIPTION="A DNS-Server which gets its data from a MySQL-/PostgreSQL-database" +HOMEPAGE="http://www.mydns.pl/" +SRC_URI="http://switch.dl.sourceforge.net/sourceforge/mydns-ng/${P}.tar.gz" +S=${WORKDIR}/${P%\.*} LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~sparc ~x86" -IUSE="debug nls postgres ssl static zlib" +IUSE="alias debug nls postgres ssl static status zlib" RDEPEND="ssl? ( dev-libs/openssl ) zlib? ( sys-libs/zlib ) postgres? ( virtual/postgresql-server ) - !postgres? ( virtual/mysql )" + !postgres? ( virtual/mysql ) + virtual/libiconv" DEPEND="${RDEPEND} sys-devel/bison" -src_unpack() { - unpack ${A} - - cd "${S}" - epatch "${FILESDIR}/${P}-m4.patch" - epatch "${FILESDIR}/04-update-smash-fix.dpatch" - epatch "${FILESDIR}/${P}-gentoo.patch" - eautoreconf -} - src_compile() { - local myconf="--enable-alias" + local myconf="--with-included-gettext" if use postgres; then myconf="${myconf} --without-mysql --with-pgsql" @@ -43,10 +32,12 @@ fi econf \ + $(use_enable alias) \ $(use_enable nls) \ $(use_enable debug) \ $(use_enable static) \ $(use_enable static static-build) \ + $(use_enable status) \ $(use_with ssl openssl) \ $(use_with zlib) \ ${myconf} || die @@ -56,7 +47,7 @@ src_install() { emake DESTDIR="${D}" install || die - dodoc AUTHORS BUGS ChangeLog NEWS README TODO + dodoc AUTHORS BUGS COPYING ChangeLog NEWS README TODO contrib/admin.php contrib/stats.php contrib/create_domain.pl contrib/fix_rr_serial.pl contrib/MyDNS.pm contrib/README if use postgres; then sed -e 's/__db__/postgresql/g' "${FILESDIR}/mydns.rc6" > "${T}/mydns.rc6" || die @@ -66,14 +57,18 @@ dodoc QUICKSTART.mysql README.mysql fi newinitd "${T}/mydns.rc6" mydns || die + + ## Avoid file collision + rm -f "${D}/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() { - elog - elog "You should now run these commands:" - elog - elog "# /usr/sbin/mydns --dump-config > /etc/mydns.conf" - elog "# chmod 0600 /etc/mydns.conf" if use postgres; then elog "# createdb mydns" elog "# /usr/sbin/mydns --create-tables | psql mydns"