Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 267587
Collapse All | Expand All

(-)mydns-1.1.0-r2.ebuild (-27 / +22 lines)
Lines 1-40 Link Here
1
# Copyright 1999-2008 Gentoo Foundation
1
# Copyright 1999-2009 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $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 $
3
# $Header: 
4
5
WANT_AUTOCONF="latest"
6
WANT_AUTOMAKE="latest"
7
4
8
inherit autotools eutils
5
inherit autotools eutils
9
6
10
DESCRIPTION="A DNS-Server which gets its data from mysql-databases"
7
DESCRIPTION="A DNS-Server which gets its data from a MySQL-/PostgreSQL-database"
11
HOMEPAGE="http://mydns.bboy.net/"
8
HOMEPAGE="http://www.mydns.pl/"
12
SRC_URI="http://mydns.bboy.net/download/${P}.tar.bz2"
9
SRC_URI="http://switch.dl.sourceforge.net/sourceforge/mydns-ng/${P}.tar.gz"
10
S=${WORKDIR}/${P%\.*}
13
11
14
LICENSE="GPL-2"
12
LICENSE="GPL-2"
15
SLOT="0"
13
SLOT="0"
16
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~sparc ~x86"
14
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~sparc ~x86"
17
IUSE="debug nls postgres ssl static zlib"
15
IUSE="alias debug nls postgres ssl static status zlib"
18
16
19
RDEPEND="ssl? ( dev-libs/openssl )
17
RDEPEND="ssl? ( dev-libs/openssl )
20
	zlib? ( sys-libs/zlib )
18
	zlib? ( sys-libs/zlib )
21
	postgres? ( virtual/postgresql-server )
19
	postgres? ( virtual/postgresql-server )
22
	!postgres? ( virtual/mysql )"
20
	!postgres? ( virtual/mysql )
21
	virtual/libiconv"
23
DEPEND="${RDEPEND}
22
DEPEND="${RDEPEND}
24
	sys-devel/bison"
23
	sys-devel/bison"
25
24
26
src_unpack() {
27
	unpack ${A}
28
29
	cd "${S}"
30
	epatch "${FILESDIR}/${P}-m4.patch"
31
	epatch "${FILESDIR}/04-update-smash-fix.dpatch"
32
	epatch "${FILESDIR}/${P}-gentoo.patch"
33
	eautoreconf
34
}
35
36
src_compile() {
25
src_compile() {
37
	local myconf="--enable-alias"
26
	local myconf="--with-included-gettext"
38
27
39
	if use postgres; then
28
	if use postgres; then
40
		myconf="${myconf} --without-mysql --with-pgsql"
29
		myconf="${myconf} --without-mysql --with-pgsql"
Lines 43-52 Link Here
43
	fi
32
	fi
44
33
45
	econf \
34
	econf \
35
		$(use_enable alias) \
46
		$(use_enable nls) \
36
		$(use_enable nls) \
47
		$(use_enable debug) \
37
		$(use_enable debug) \
48
		$(use_enable static) \
38
		$(use_enable static) \
49
		$(use_enable static static-build) \
39
		$(use_enable static static-build) \
40
		$(use_enable status) \
50
		$(use_with ssl openssl) \
41
		$(use_with ssl openssl) \
51
		$(use_with zlib) \
42
		$(use_with zlib) \
52
		${myconf} || die
43
		${myconf} || die
Lines 56-62 Link Here
56
src_install() {
47
src_install() {
57
	emake DESTDIR="${D}" install || die
48
	emake DESTDIR="${D}" install || die
58
49
59
	dodoc AUTHORS BUGS ChangeLog NEWS README TODO
50
	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
60
51
61
	if use postgres; then
52
	if use postgres; then
62
		sed -e 's/__db__/postgresql/g' "${FILESDIR}/mydns.rc6" > "${T}/mydns.rc6" || die
53
		sed -e 's/__db__/postgresql/g' "${FILESDIR}/mydns.rc6" > "${T}/mydns.rc6" || die
Lines 66-79 Link Here
66
		dodoc QUICKSTART.mysql README.mysql
57
		dodoc QUICKSTART.mysql README.mysql
67
	fi
58
	fi
68
	newinitd "${T}/mydns.rc6" mydns || die
59
	newinitd "${T}/mydns.rc6" mydns || die
60
	
61
	## Avoid file collision
62
	rm -f "${D}/usr/share/locale/locale.alias"
63
64
	## Install config file
65
	insinto /etc
66
	newins  mydns.conf mydns.conf
67
	fowners root:root /etc/mydns.conf
68
	fperms  0600      /etc/mydns.conf
69
}
69
}
70
70
71
pkg_postinst() {
71
pkg_postinst() {
72
	elog
73
	elog "You should now run these commands:"
74
	elog
75
	elog "# /usr/sbin/mydns --dump-config > /etc/mydns.conf"
76
	elog "# chmod 0600 /etc/mydns.conf"
77
	if use postgres; then
72
	if use postgres; then
78
		elog "# createdb mydns"
73
		elog "# createdb mydns"
79
		elog "# /usr/sbin/mydns --create-tables | psql mydns"
74
		elog "# /usr/sbin/mydns --create-tables | psql mydns"

Return to bug 267587