1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit flag-o-matic perl-functions
11 DESCRIPTION="A portable and secure set of open-source and modular IRC services"
12 HOMEPAGE="https://github.com/atheme/atheme"
13 SRC_URI="https://github.com/atheme/atheme/releases/download/v${MY_PV}/${MY_PN}-v${MY_PV}.tar.xz -> ${P}.tar.xz"
18 IUSE="cracklib largenet ldap nls +pcre perl profile ssl"
19 S="${WORKDIR}/${MY_PN}-v${MY_PV}"
22 acct-group/atheme-services
23 acct-user/atheme-services
24 >=dev-libs/libmowgli-2.1.0:2
25 cracklib? ( sys-libs/cracklib )
26 ldap? ( net-nds/openldap )
27 perl? ( dev-lang/perl )
28 pcre? ( dev-libs/libpcre )
29 ssl? ( dev-libs/openssl:0= )"
31 # 'dev-vcs/git' required as per bug #665802
37 "${FILESDIR}"/${P}-configure-logdir.patch
38 "${FILESDIR}"/${P}-fix-backtrace-compat-detection.patch)
41 # perl scriping module support is also broken in 7.0.0. Yay for QA failures.
43 --sysconfdir="${EPREFIX}"/etc/${PN} \
44 --localstatedir="${EPREFIX}"/var \
48 $(use_enable largenet large-net) \
49 $(use_with cracklib) \
52 $(use_enable profile) \
66 for conf in dist/*.example; do
67 # The .cron file isn't meant to live in /etc/${PN}, so only
68 # install a .example version.
69 [[ ${conf} == *cron* ]] && continue
71 local confdest=${conf##*/}
72 newins ${conf} ${confdest%.example}
75 fowners -R 0:${PN} /etc/${PN}
76 keepdir /var/{lib,log}/atheme
77 fowners ${PN}:${PN} /var/{lib,log}/atheme
78 fperms -R go-w,o-rx /etc/${PN}
79 fperms 750 /etc/${PN} /var/{lib,log}/atheme
81 newinitd "${FILESDIR}"/${PN}.initd ${PN}
82 mv "${ED}"/usr/bin/{,atheme-}dbverify || die
84 # contributed scripts and such:
86 dodoc contrib/*.{c,pl,php,py,rb}
88 use perl && perl_domodule -r contrib/Atheme{,.pm}
90 rm "${ED}/usr/share/doc/${PF}/WINDOWS" || die
93 rm -rf "${ED}/var/run" || die