summaryrefslogtreecommitdiff
blob: 813cf252b5417ed395212e1b8878b077f2529791 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-irc/atheme/atheme-0.2.2.ebuild,v 1.2 2005/11/10 18:19:09 gustavoz Exp $

inherit eutils

DESCRIPTION="A portable, secure set of open source, and modular IRC services"
HOMEPAGE="http://atheme.org/"
SRC_URI="mirror://gentoo/${P}.tgz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~sparc ~x86"
IUSE="largenet postgres"

DEPEND=">=sys-devel/autoconf-2.59"
RDEPEND="postgres? ( dev-db/postgresql )"

src_unpack() {
	unpack ${A} || die "unpack failed"
	cd ${S} || die "cd '${S}' failed"

	epatch ${FILESDIR}/make-postgresql-support-optional.patch \
		|| die "epacth failed"
	epatch ${FILESDIR}/makefile-DESTDIR-support.patch \
		|| die "epatch failed"
}

src_compile() {
	autoreconf -i || die "autoreconf failed"
	./configure \
		--prefix=/var/lib/atheme \
		`use_with postgresql` \
		`use_with largenet large-net` \
		|| die "configure failed"

	make DESTDIR="${D}" || die "make failed"
}

src_install() {
	make DESTDIR="${D}" install || die "emake install failed"
	cp "${D}"/var/lib/atheme/etc/{example,atheme}.conf || die "cp failed"
	dodoc ChangeLog INSTALL README || die "dodoc failed"
	dodoc doc/{example_module.c,LICENSE,POSTGRESQL,RELEASE,ROADMAP} \
		|| die "dodoc failed"
	rm -rf "${D}"/var/lib/atheme/doc
}

pkg_postinst() {
	einfo
	einfo "Don't forget to edit /var/lib/atheme/etc/atheme.conf!"
	einfo
}