Files
@ d0d4d2b649c9
Branch filter:
Location: ohnobinki_overlay/net-irc/atheme/atheme-5.0.1.ebuild
d0d4d2b649c9
2.4 KiB
application/vnd.gentoo.ebuild
net-irc/atheme: Support installing some stuff form contrib, such as a perl module and a few database conversion C programs/modules. Added initscript. QA against bundled libmowgli. Fixed /var paths.
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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | # Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit autotools eutils flag-o-matic perl-module
MY_P=${PN}-services-${PV}
DESCRIPTION="A portable and secure set of open-source and modular IRC services"
HOMEPAGE="http://atheme.net/"
SRC_URI="http://atheme.net/downloads/${MY_P}.tar.bz2"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug largenet ldap pcre perl profile ssl"
RDEPEND="dev-libs/libmowgli
ldap? ( net-nds/openldap )
pcre? ( dev-libs/libpcre )
ssl? ( dev-libs/openssl )"
DEPEND="${DEPEND}
dev-util/pkgconfig"
S=${WORKDIR}/${MY_P}
pkg_setup() {
# the dependency calculation puts all of the .c files together and
# overwhelms cc1 with this flag :-(
filter-flags -combine
enewgroup ${PN}
enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
}
src_prepare() {
epatch "${FILESDIR}"/${P}-with-ldap.patch
epatch "${FILESDIR}"/${P}-ldap-as-needed.patch
epatch "${FILESDIR}"/${P}-depend-parallel.patch
# fix docdir
find -regex '.*/Makefile\..*in' \
| xargs sed -i -e 's/\(^DOCDIR.*=.\)@DOCDIR@/\1@docdir@/' \
|| die
# basic logging config directive fix
sed -i -e 's;var/\(.*\.log\);\1;g' dist/* || die
eaclocal -I m4
eautoheader
eautoconf
# QA against bundled libs
rm -rf libmowgli || die
}
src_configure() {
econf --enable-fhs-paths \
--sysconfdir="${EPREFIX}"/etc/${PN} \
--docdir="${EPREFIX}"/usr/share/doc/${PF} \
--localstatedir="${EPREFIX}"/var \
$(use debug || echo --enable-propolice) \
$(use_enable largenet large-net) \
$(use_with ldap) \
$(use_enable profile) \
$(use_with pcre) \
$(use_enable ssl)
}
src_compile() {
emake || die
emake -C contrib || die
}
src_install() {
emake DESTDIR="${D}" install || die
emake DESTDIR="${D}" -C contrib install || die
insinto /etc/${PN}
for conf in dist/*.example; do
newins ${conf} $(basename ${conf} .example) || die "installing ${conf/.example//}"
done
fowners -R root:atheme /etc/atheme || die
fowners atheme:atheme /var/{lib,run,log}/${PN} || die
fperms -R 640 /etc/atheme || die
fperms 750 /etc/atheme /var/{lib,run,log}/${PN} || die
newinitd "${FILESDIR}"/${PN}.initd atheme || die
# contributed scripts and such:
insinto /usr/share/doc/${PF}/contrib
doins contrib/*.{pl,php,py,rb} || die
# various conversion programs
doins contrib/{anope_convert.c,ircs_crypto_trans.c} || die
if use perl; then
perlinfo
insinto "${VENDOR_LIB}"
doins -r contrib/Atheme{,.pm} || die
fi
}
|