/[gentoo-x86]/net-irc/inspircd/inspircd-2.0.5-r2.ebuild
Gentoo

Contents of /net-irc/inspircd/inspircd-2.0.5-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Tue Nov 27 20:32:31 2012 UTC (5 months, 3 weeks ago) by nimiux
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Cleanup of old versions

(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key D628E536)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-irc/inspircd/inspircd-2.0.5-r2.ebuild,v 1.3 2012/05/21 09:39:41 phajdan.jr Exp $
4
5 EAPI=4
6
7 inherit eutils flag-o-matic multilib
8
9 DESCRIPTION="Inspire IRCd - The Stable, High-Performance Modular IRCd"
10 HOMEPAGE="http://www.inspircd.org/"
11 SRC_URI="http://github.com/inspircd/inspircd/downloads/InspIRCd-${PV}.tar.bz2"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="amd64 x86"
16 IUSE="gnutls ipv6 ldap mysql postgres sqlite ssl"
17
18 RDEPEND="
19 dev-lang/perl
20 ssl? ( dev-libs/openssl )
21 gnutls? ( net-libs/gnutls dev-libs/libgcrypt )
22 ldap? ( net-nds/openldap )
23 mysql? ( virtual/mysql )
24 postgres? ( dev-db/postgresql-server )
25 sqlite? ( >=dev-db/sqlite-3.0 )"
26 DEPEND="${RDEPEND}"
27
28 S="${WORKDIR}/${PN}"
29
30 pkg_setup() {
31 enewgroup ${PN}
32 enewuser ${PN} -1 -1 -1 ${PN}
33 }
34
35 src_prepare() {
36 # Patch the inspircd launcher with the inspircd user
37 sed -i -e "s/@UID@/${PN}/" "${S}/make/template/${PN}" || die
38
39 epatch "${FILESDIR}/${PF}-fix-paths-build.patch"
40 }
41
42 src_configure() {
43 local extras=""
44 local dipv6="--disable-ipv6"
45
46 use ssl && extras="${extras}m_ssl_openssl.cpp,"
47 use gnutls && extras="${extras}m_ssl_gnutls.cpp,"
48 use ldap && extras="${extras}m_ldapauth.cpp,"
49 use mysql && extras="${extras}m_mysql.cpp,"
50 use postgres && extras="${extras}m_pgsql.cpp,"
51 use sqlite && extras="${extras}m_sqlite3.cpp,"
52
53 use ipv6 && dipv6=""
54
55 # allow inspircd to be built by root
56 touch .force-root-ok || die
57
58 if [ -n "${extras}" ]; then
59 ./configure --disable-interactive \
60 --enable-extras=${extras} || die
61 fi
62
63 ./configure \
64 --disable-interactive \
65 --uid=${INSPIRCDUSER} \
66 $(use_enable ssl openssl) \
67 $(use_enable gnutls) \
68 --prefix="/usr/$(get_libdir)/${PN}" \
69 --config-dir="/etc/${PN}" \
70 --binary-dir="/usr/bin" \
71 --module-dir="/usr/$(get_libdir)/${PN}/modules" \
72 ${dipv6} || die
73 }
74
75 src_compile() {
76 append-cxxflags -Iinclude -fPIC
77 emake LDFLAGS="${LDFLAGS}" CXXFLAGS="${CXXFLAGS}"
78 }
79
80 src_install() {
81 emake INSTUID=${PN} \
82 BINPATH="${D}/usr/bin" \
83 BASE="${D}/usr/$(get_libdir)/${PN}/inspircd.launcher" \
84 MODPATH="${D}/usr/$(get_libdir)/${PN}/modules/" \
85 CONPATH="${D}/etc/${PN}" install
86
87 insinto /etc/"${PN}"/modules
88 doins docs/modules/*
89
90 insinto /etc/"${PN}"/aliases
91 doins docs/aliases/*
92
93 insinto /usr/include/"${PN}"/
94 doins include/*
95
96 diropts -o"${PN}" -g"${PN}"
97 dodir /var/run/"${PN}" /var/lib/"${PN}"/data
98
99 newinitd "${FILESDIR}/${PN}-2.0.5-r1-init" "${PN}"
100 keepdir /var/log/"${PN}"/
101 }
102
103 pkg_postinst() {
104 elog "Before starting ${PN} the first time you should create"
105 elog "the /etc/${PN}/${PN}.conf file."
106 elog "You can find example configuration files under /etc/${PN}"
107 elog "Read the ${PN}.conf.example file carefully before starting "
108 elog "the service."
109 elog
110 }

  ViewVC Help
Powered by ViewVC 1.1.13