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

(-)inspircd-1.1.13-r1.ebuild (-41 / +46 lines)
Lines 1-48 Link Here
1
# Copyright 1999-2007 Gentoo Foundation
1
# Copyright 1999-2007 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-irc/inspircd/inspircd-1.1.13-r1.ebuild,v 1.1 2007/10/05 20:29:07 hansmi Exp $
3
# $Header: $
4
4
5
inherit eutils toolchain-funcs multilib # subversion
5
inherit eutils multilib
6
7
IUSE="openssl gnutls ipv6 kernel_linux"
8
6
9
DESCRIPTION="InspIRCd - The Modular C++ IRC Daemon"
7
DESCRIPTION="InspIRCd - The Modular C++ IRC Daemon"
10
HOMEPAGE="http://www.inspircd.org"
8
HOMEPAGE="http://www.inspircd.org/"
9
SRC_URI="http://www.inspircd.org/downloads/InspIRCd-${PV}.tar.bz2"
10
11
LICENSE="GPL-2"
11
LICENSE="GPL-2"
12
SLOT="0"
12
SLOT="0"
13
KEYWORDS="~amd64 ~ppc ~x86"
13
KEYWORDS="~amd64 ~ppc ~x86"
14
RDEPEND="
14
IUSE="gnutls ipv6 openssl kernel_linux"
15
16
DEPEND="
15
	>=sys-devel/gcc-3.3.0
17
	>=sys-devel/gcc-3.3.0
16
	>=dev-lang/perl-5.8
18
	>=dev-lang/perl-5.8
17
	openssl? ( >=dev-libs/openssl-0.9.7d )
19
	openssl? ( >=dev-libs/openssl-0.9.7d )
18
	gnutls? ( >=net-libs/gnutls-1.3.0 )"
20
	gnutls? ( >=net-libs/gnutls-1.3.0 )"
19
DEPEND="${RDEPEND}"
20
SRC_URI="mirror://sourceforge/${PN}/InspIRCd-${PV}.tar.bz2"
21
#ESVN_REPO_URI="http://svn.inspircd.org/repository/trunk/inspircd"
22
#ESVN_PROJECT="inspircd"
23
21
24
S="${WORKDIR}/inspircd"
22
RDEPEND="${DEPEND}"
23
24
S="${WORKDIR}/${PN}"
25
25
26
pkg_setup() {
26
pkg_setup() {
27
	ebegin "Creating inspircd user and group"
27
	enewgroup inspircd
28
	enewgroup inspircd
28
	enewuser inspircd -1 -1 -1 inspircd
29
	enewuser inspircd -1 -1 -1 inspircd
30
	eend ${?}
29
}
31
}
30
32
31
src_compile() {
33
src_compile() {
32
	local myconf=""
34
	local myconf="
33
35
		--disable-interactive
34
	# Write a configuration file
36
		--enable-epoll"
35
	# we don't use econf.
37
36
	USE_SSL="$(use_enable openssl)"
38
	# ./configure doesn't know --disable-gnutls, -ipv6 and -openssl options,
37
	use gnutls && USE_SSL="$(use_enable gnutls)"
39
	# so should be used only --enable-like.
38
	USE_SOCKET_ENGINE="--enable-epoll"
40
	use gnutls  && myconf="${myconf} $(use_enable gnutls)"
39
	./configure $(use_enable ipv6) --enable-remote-ipv6 ${USE_SSL} \
41
	use ipv6    && myconf="${myconf} $(use_enable ipv6) --enable-remote-ipv6"
40
	${USE_SOCKET_ENGINE} \
42
	use openssl && myconf="${myconf} $(use_enable openssl)"
41
	--prefix="/usr/$(get_libdir)/inspircd" \
43
42
	--config-dir="/etc/inspircd" --binary-dir="/usr/bin" \
44
	./configure \
43
	--library-dir="/usr/$(get_libdir)/inspircd" \
45
		--prefix="/usr" \
44
	--module-dir="/usr/$(get_libdir)/inspircd/modules" \
46
		--binary-dir="/usr/bin" \
45
	|| die "configure failed"
47
		--config-dir="/etc/${PN}" \
48
		--library-dir="/usr/$(get_libdir)/${PN}" \
49
		--module-dir="/usr/$(get_libdir)/${PN}/modules" \
50
		${myconf} || die "configure failed"
46
51
47
	emake || die "emake failed"
52
	emake || die "emake failed"
48
}
53
}
Lines 50-67 Link Here
50
src_install() {
55
src_install() {
51
	# the inspircd buildsystem does not create these, it's configure script
56
	# the inspircd buildsystem does not create these, it's configure script
52
	# does. so, we have to at this point to make sure they are there.
57
	# does. so, we have to at this point to make sure they are there.
53
	dodir /usr/$(get_libdir)/inspircd
58
	dodir /etc/${PN}
54
	dodir /usr/$(get_libdir)/inspircd/modules
59
	dodir /usr/include/${PN}
55
	dodir /etc/inspircd
60
	dodir /usr/$(get_libdir)/${PN}
56
	dodir /var/log/inspircd
61
	dodir /usr/$(get_libdir)/${PN}/modules
57
	dodir /usr/include/inspircd
62
	dodir /var/log/${PN}
58
63
59
	emake install \
64
	emake install \
60
		LIBPATH="${D}/usr/$(get_libdir)/inspircd/" \
65
		BASE="${D}"/usr/$(get_libdir)/${PN}/inspircd.launcher \
61
		MODPATH="${D}/usr/$(get_libdir)/inspircd/modules/" \
66
		BINPATH="${D}"/usr/bin \
62
		CONPATH="${D}/etc/inspircd" \
67
		CONPATH="${D}"/etc/${PN} \
63
		BINPATH="${D}/usr/bin" \
68
		LIBPATH="${D}"/usr/$(get_libdir)/${PN}/ \
64
		BASE="${D}/usr/$(get_libdir)/inspircd/inspircd.launcher"
69
		MODPATH="${D}"/usr/$(get_libdir)/${PN}/modules/ \
65
70
66
	insinto /usr/include/inspircd/
71
	insinto /usr/include/inspircd/
67
	doins "${S}"/include/*
72
	doins "${S}"/include/*
Lines 70-83 Link Here
70
}
75
}
71
76
72
pkg_postinst() {
77
pkg_postinst() {
73
	chown -R inspircd:inspircd "${ROOT}"/etc/inspircd
78
	chown -R inspircd:inspircd "${ROOT}"/etc/${PN}
74
	chmod 700 "${ROOT}"/etc/inspircd
79
	chmod 700 "${ROOT}"/etc/${PN}
75
80
76
	chmod 750 "${ROOT}"/var/log/inspircd
81
	chown -R inspircd:inspircd "${ROOT}"/var/log/${PN}
77
	chown -R inspircd:inspircd "${ROOT}"/var/log/inspircd
82
	chmod 750 "${ROOT}"/var/log/${PN}
78
83
79
	chown -R inspircd:inspircd "${ROOT}"/usr/$(get_libdir)/inspircd
84
	chown -R inspircd:inspircd "${ROOT}"/usr/$(get_libdir)/${PN}
80
	chmod -R 755 "${ROOT}"/usr/$(get_libdir)/inspircd
85
	chmod -R 755 "${ROOT}"/usr/$(get_libdir)/${PN}
81
86
82
	chmod -R 755 "${ROOT}"/usr/bin/inspircd
87
	chmod -R 755 "${ROOT}"/usr/bin/inspircd
83
}
88
}

Return to bug 198317