dev-cpp/pangomm: stable 2.42.1 for hppa, bug #717144
[gentoo.git] / net-irc / atheme-services / atheme-services-7.2.10_p2-r2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit flag-o-matic perl-functions
7
8 MY_PN="atheme"
9 MY_PV="7.2.10-r2"
10
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"
14
15 LICENSE="BSD"
16 SLOT="0"
17 KEYWORDS="~amd64"
18 IUSE="cracklib largenet ldap nls +pcre perl profile ssl"
19 S="${WORKDIR}/${MY_PN}-v${MY_PV}"
20
21 RDEPEND="
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= )"
30 DEPEND="${RDEPEND}"
31 # 'dev-vcs/git' required as per bug #665802
32 BDEPEND="
33         dev-vcs/git
34         virtual/pkgconfig"
35
36 PATCHES=(
37         "${FILESDIR}"/${P}-configure-logdir.patch
38         "${FILESDIR}"/${P}-fix-backtrace-compat-detection.patch)
39
40 src_configure() {
41         # perl scriping module support is also broken in 7.0.0. Yay for QA failures.
42         econf \
43                 --sysconfdir="${EPREFIX}"/etc/${PN} \
44                 --localstatedir="${EPREFIX}"/var \
45                 --enable-fhs-paths \
46                 --disable-warnings \
47                 --enable-contrib \
48                 $(use_enable largenet large-net) \
49                 $(use_with cracklib) \
50                 $(use_with ldap) \
51                 $(use_enable nls) \
52                 $(use_enable profile) \
53                 $(use_with pcre) \
54                 $(use_with perl) \
55                 $(use_enable ssl)
56 }
57
58 src_compile() {
59         emake V=1
60 }
61
62 src_install() {
63         default
64
65         insinto /etc/${PN}
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
70
71                 local confdest=${conf##*/}
72                 newins ${conf} ${confdest%.example}
73         done
74
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
80
81         newinitd "${FILESDIR}"/${PN}.initd ${PN}
82         mv "${ED}"/usr/bin/{,atheme-}dbverify || die
83
84         # contributed scripts and such:
85         docinto contrib
86         dodoc contrib/*.{c,pl,php,py,rb}
87
88         use perl && perl_domodule -r contrib/Atheme{,.pm}
89
90         rm "${ED}/usr/share/doc/${PF}/WINDOWS" || die
91
92         # Bug #454840 #520490
93         rm -rf "${ED}/var/run" || die
94 }