profiles/arch/x86: Unmask py3.8+
[gentoo.git] / app-admin / monit / monit-5.26.0.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 inherit bash-completion-r1 pam systemd
6
7 DESCRIPTION="Monitoring and managing daemons or similar programs running on a Unix system"
8 HOMEPAGE="http://mmonit.com/monit/"
9 SRC_URI="http://mmonit.com/monit/dist/${P}.tar.gz"
10
11 LICENSE="AGPL-3"
12 SLOT="0"
13 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux"
14 IUSE="ipv6 libressl pam ssl"
15
16 RDEPEND="
17         ssl? (
18                 !libressl? ( dev-libs/openssl:0= )
19                 libressl? ( dev-libs/libressl:0= )
20         )"
21 DEPEND="${RDEPEND}
22         pam? ( sys-libs/pam )"
23 BDEPEND="
24         sys-devel/flex
25         sys-devel/bison
26 "
27
28 src_prepare() {
29         default
30         sed -i -e '/^INSTALL_PROG/s/-s//' Makefile.in || die
31 }
32
33 src_configure() {
34         local myeconfargs=(
35                 $(use_with ipv6)
36                 $(use_with pam)
37                 $(use_with ssl)
38         )
39         econf "${myeconfargs[@]}"
40 }
41
42 src_install() {
43         default
44
45         dodoc README
46
47         insinto /etc; insopts -m600; doins monitrc
48         newinitd "${FILESDIR}"/monit.initd-5.0-r1 monit
49         systemd_dounit "${FILESDIR}"/${PN}.service
50
51         use pam && newpamd "${FILESDIR}"/${PN}.pamd ${PN}
52
53         dobashcomp system/bash/monit
54 }
55
56 pkg_postinst() {
57         elog "Sample configurations are available at:"
58         elog "http://mmonit.com/monit/documentation/"
59 }