Lines 2-30
Link Here
|
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.19.ebuild,v 1.4 2008/05/21 18:56:03 dev-zero Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/net-irc/inspircd/inspircd-1.1.19.ebuild,v 1.4 2008/05/21 18:56:03 dev-zero Exp $ |
4 |
|
4 |
|
5 |
inherit eutils toolchain-funcs multilib # subversion |
5 |
inherit eutils multilib # subversion |
6 |
|
6 |
|
7 |
DESCRIPTION="InspIRCd - The Modular C++ IRC Daemon" |
7 |
DESCRIPTION="InspIRCd - The Modular C++ IRC Daemon" |
8 |
HOMEPAGE="http://www.inspircd.org/" |
8 |
HOMEPAGE="http://www.inspircd.org/" |
9 |
SRC_URI="http://www.inspircd.org/downloads/InspIRCd-${PV}.tar.bz2 |
9 |
SRC_URI="http://www.inspircd.org/downloads/InspIRCd-${PV}.tar.bz2 |
10 |
mirror://sourceforge/${PN}/InspIRCd-${PV}.tar.bz2" |
10 |
mirror://sourceforge/${PN}/InspIRCd-${PV}.tar.bz2" |
11 |
|
11 |
|
12 |
LICENSE="GPL-2" |
12 |
LICENSE="GPL-2" |
13 |
SLOT="0" |
13 |
SLOT="0" |
14 |
KEYWORDS="~amd64 ppc x86" |
14 |
KEYWORDS="amd64 ppc x86" |
15 |
IUSE="openssl gnutls ipv6 kernel_linux mysql postgres sqlite zlib ldap" |
15 |
IUSE="openssl gnutls ipv6 kernel_linux mysql postgres sqlite zlib ldap" |
16 |
|
16 |
|
17 |
RDEPEND=" |
17 |
RDEPEND=" |
18 |
dev-lang/perl |
18 |
openssl? ( >=dev-libs/openssl-0.9.7d ) |
19 |
openssl? ( dev-libs/openssl ) |
19 |
gnutls? ( >=net-libs/gnutls-1.3.0 ) |
20 |
gnutls? ( net-libs/gnutls ) |
|
|
21 |
mysql? ( virtual/mysql ) |
20 |
mysql? ( virtual/mysql ) |
22 |
postgres? ( virtual/postgresql-server ) |
21 |
postgres? ( virtual/postgresql-server ) |
23 |
sqlite? ( >=dev-db/sqlite-3.0 ) |
22 |
sqlite? ( >=dev-db/sqlite-3.0 ) |
24 |
ldap? ( net-nds/openldap )" |
23 |
ldap? ( net-nds/openldap )" |
25 |
DEPEND="${RDEPEND}" |
24 |
DEPEND="${RDEPEND} |
|
|
25 |
>=sys-devel/gcc-3.3.0 |
26 |
>=dev-lang/perl-5.8" |
26 |
|
27 |
|
27 |
S="${WORKDIR}/inspircd" |
28 |
S="${WORKDIR}/${PN}" |
28 |
|
29 |
|
29 |
src_unpack() { |
30 |
src_unpack() { |
30 |
unpack ${A} |
31 |
unpack ${A} |
Lines 63-84
Link Here
|
63 |
} |
64 |
} |
64 |
|
65 |
|
65 |
src_compile() { |
66 |
src_compile() { |
|
|
67 |
local myconf="" |
66 |
|
68 |
|
67 |
# ./configure doesn't know --disable-gnutls, -ipv6 and -openssl options, |
69 |
# ./configure doesn't know --disable-gnutls, -ipv6 and -openssl options, |
68 |
# so should be used only --enable-like. |
70 |
# so should be used only --enable-like. |
69 |
local myconf="" |
71 |
use openssl && myconf="${myconf} $(use_enable openssl)" |
70 |
use gnutls && myconf="--enable-gnutls" |
72 |
use gnutls && myconf="${myconf} $(use_enable gnutls)" |
71 |
use ipv6 && myconf="${myconf} --enable-ipv6 --enable-remote-ipv6" |
73 |
use ipv6 && myconf="${myconf} $(use_enable ipv6) --enable-remote-ipv6" |
72 |
use openssl && myconf="${myconf} --enable-openssl" |
|
|
73 |
|
74 |
|
74 |
./configure ${myconf} \ |
75 |
./configure ${myconf} \ |
75 |
--enable-epoll \ |
76 |
--enable-epoll \ |
76 |
--prefix="/usr/$(get_libdir)/inspircd" \ |
77 |
--prefix="/usr/$(get_libdir)/${PN}" \ |
77 |
--config-dir="/etc/inspircd" \ |
78 |
--config-dir="/etc/${PN}" \ |
78 |
--binary-dir="/usr/bin" \ |
79 |
--binary-dir="/usr/bin" \ |
79 |
--library-dir="/usr/$(get_libdir)/inspircd" \ |
80 |
--library-dir="/usr/$(get_libdir)/${PN}" \ |
80 |
--module-dir="/usr/$(get_libdir)/inspircd/modules" \ |
81 |
--module-dir="/usr/$(get_libdir)/${PN}/modules" \ |
81 |
|| die "configure failed" |
82 |
|| die "configure failed" |
|
|
83 |
|
82 |
./configure -modupdate || die "modupdate failed" |
84 |
./configure -modupdate || die "modupdate failed" |
83 |
|
85 |
|
84 |
emake || die "emake failed" |
86 |
emake || die "emake failed" |
Lines 87-124
Link Here
|
87 |
src_install() { |
89 |
src_install() { |
88 |
# the inspircd buildsystem does not create these, its configure script |
90 |
# the inspircd buildsystem does not create these, its configure script |
89 |
# does. so, we have to make sure they are there. |
91 |
# does. so, we have to make sure they are there. |
90 |
dodir /usr/$(get_libdir)/inspircd |
92 |
dodir /etc/${PN} |
91 |
dodir /usr/$(get_libdir)/inspircd/modules |
93 |
dodir /usr/include/${PN} |
92 |
dodir /etc/inspircd |
94 |
dodir /usr/$(get_libdir)/${PN} |
93 |
dodir /var/log/inspircd |
95 |
dodir /usr/$(get_libdir)/${PN}/modules |
94 |
dodir /usr/include/inspircd |
96 |
dodir /var/log/${PN} |
95 |
|
97 |
|
96 |
emake install \ |
98 |
emake install \ |
97 |
LIBPATH="${D}/usr/$(get_libdir)/inspircd/" \ |
99 |
LIBPATH="${D}/usr/$(get_libdir)/${PN}/" \ |
98 |
MODPATH="${D}/usr/$(get_libdir)/inspircd/modules/" \ |
100 |
MODPATH="${D}/usr/$(get_libdir)/${PN}/modules/" \ |
99 |
CONPATH="${D}/etc/inspircd" \ |
101 |
CONPATH="${D}/etc/${PN}" \ |
100 |
BINPATH="${D}/usr/bin" \ |
102 |
BINPATH="${D}/usr/bin" \ |
101 |
BASE="${D}/usr/$(get_libdir)/inspircd/inspircd.launcher" |
103 |
BASE="${D}/usr/$(get_libdir)/${PN}/inspircd.launcher" |
102 |
|
104 |
|
103 |
insinto /usr/include/inspircd/ |
105 |
insinto /usr/include/${PN}/ |
104 |
doins "${S}"/include/* |
106 |
doins "${S}"/include/* |
105 |
|
107 |
|
106 |
newinitd "${FILESDIR}"/init.d_inspircd inspircd |
108 |
newinitd "${FILESDIR}"/init.d_inspircd inspircd |
107 |
|
109 |
|
108 |
keepdir "/var/log/inspircd/" |
110 |
keepdir "/var/log/${PN}/" |
109 |
} |
111 |
} |
110 |
|
112 |
|
111 |
pkg_postinst() { |
113 |
pkg_postinst() { |
|
|
114 |
ebegin "Creating inspircd user and group" |
112 |
enewgroup inspircd |
115 |
enewgroup inspircd |
113 |
enewuser inspircd -1 -1 -1 inspircd |
116 |
enewuser inspircd -1 -1 -1 inspircd |
114 |
chown -R inspircd:inspircd "${ROOT}"/etc/inspircd |
117 |
eend ${?} |
115 |
chmod 700 "${ROOT}"/etc/inspircd |
118 |
|
|
|
119 |
chown -R inspircd:inspircd "${ROOT}"/etc/${PN} |
120 |
chmod 700 "${ROOT}"/etc/${PN} |
116 |
|
121 |
|
117 |
chmod 750 "${ROOT}"/var/log/inspircd |
122 |
chown -R inspircd:inspircd "${ROOT}"/var/log/${PN} |
118 |
chown -R inspircd:inspircd "${ROOT}"/var/log/inspircd |
123 |
chmod 750 "${ROOT}"/var/log/${PN} |
119 |
|
124 |
|
120 |
chown -R inspircd:inspircd "${ROOT}"/usr/$(get_libdir)/inspircd |
125 |
chown -R inspircd:inspircd "${ROOT}"/usr/$(get_libdir)/${PN} |
121 |
chmod -R 755 "${ROOT}"/usr/$(get_libdir)/inspircd |
126 |
chmod -R 755 "${ROOT}"/usr/$(get_libdir)/${PN} |
122 |
|
127 |
|
123 |
chmod -R 755 "${ROOT}"/usr/bin/inspircd |
128 |
chmod -R 755 "${ROOT}"/usr/bin/${PN} |
124 |
} |
129 |
} |