app-admin/abrt: Fix typo
[gentoo.git] / app-admin / abrt / abrt-2.12.0-r1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=( python3_{4,5,6} )
6
7 inherit autotools gnome2-utils python-single-r1 systemd user
8
9 DESCRIPTION="Automatic bug detection and reporting tool"
10 HOMEPAGE="https://github.com/abrt/abrt/wiki/ABRT-Project"
11 SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16
17 IUSE="debug selinux"
18 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
19
20 COMMON_DEPEND="${PYTHON_DEPS}
21         >=dev-libs/glib-2.43.4:2
22         >=dev-libs/libreport-2.10.0[python]
23         dev-libs/libxml2:2
24         >=gnome-base/gsettings-desktop-schemas-3.15.1
25         net-libs/libsoup:2.4
26         sys-apps/dbus
27         sys-apps/systemd:0=
28         sys-auth/polkit
29         sys-fs/inotify-tools
30         x11-libs/gtk+:3
31 "
32 RDEPEND="${COMMON_DEPEND}
33         app-arch/cpio
34         app-arch/rpm
35         dev-libs/elfutils
36         dev-libs/json-c:0=
37         dev-python/argcomplete[${PYTHON_USEDEP}]
38         dev-python/argh[${PYTHON_USEDEP}]
39         dev-python/humanize[${PYTHON_USEDEP}]
40         sys-apps/util-linux
41         >=sys-devel/gdb-7
42 "
43 DEPEND="${COMMON_DEPEND}
44         app-text/asciidoc
45         app-text/xmlto
46         dev-libs/satyr[${PYTHON_USEDEP}]
47         >=dev-util/intltool-0.35.0
48         virtual/pkgconfig
49         >=sys-devel/gettext-0.17
50 "
51
52 RESTRICT="test" # tests *may* be broken due to all the RHEL crap.  explore later.
53
54 pkg_setup() {
55         python-single-r1_pkg_setup
56
57         enewgroup abrt
58         enewuser abrt -1 -1 -1 abrt
59 }
60
61 src_prepare() {
62         default
63
64         # Install under proper directory
65         sed -i -e 's:dbusabrtdocdir = ${datadir}/doc/abrt-dbus-${VERSION}/html:dbusabrtdocdir = ${datadir}/doc/${PF}/html:' doc/problems-service/Makefile.am || die
66
67         # Ensure this works for systems with and without /usr merge
68         sed -i -e "s:/usr/bin/bash:$(which bash):" init-scripts/abrtd.service || die
69
70         # pyhook test is sensitive to the format of python's error messages, and
71         # fails with certain python versions
72         sed -e '/pyhook.at/ d' \
73                 -i tests/Makefile.* tests/testsuite.at || die "sed remove pyhook tests failed"
74         ./gen-version || die # Needed to be run before autoreconf
75         eautoreconf
76 }
77
78 src_configure() {
79         myeconfargs=(
80                 --libdir="${EPREFIX}/usr/$(get_libdir)"
81                 --localstatedir="${EPREFIX}/var"
82                 --without-bodhi
83                 # package breaks due to not finding libreport-web with bodhi plugin enabled
84                 --without-rpm
85                 $(usex selinux "" "--without-selinux")
86                 --without-python2
87                 # Fixes "syntax error in VERSION script" and we aren't supporting Python2 anyway
88                 --with-python3
89                 --without-pythondoc
90                 # package breaks due to no sphinx-build-3
91                 --without-pythontests
92                 # kill tests for now until they can be explored.
93         )
94
95         econf "${myeconfargs[@]}"
96 }
97
98 src_install() {
99         default
100         python_optimize #661706
101
102         keepdir /var/run/abrt
103         # /var/spool/abrt is created by dev-libs/libreport
104
105         diropts -m 700 -o abrt -g abrt
106         keepdir /var/spool/abrt-upload
107
108         diropts -m 775 -o abrt -g abrt
109         keepdir /var/cache/abrt-di
110
111         find "${D}" -name '*.la' -delete || die
112
113         newinitd "${FILESDIR}/${PN}-2.0.12-r1-init" abrt
114         newconfd "${FILESDIR}/${PN}-2.0.12-r1-conf" abrt
115 }
116
117 pkg_postinst() {
118         gnome2_icon_cache_update
119 }
120
121 pkg_postrm() {
122         gnome2_icon_cache_update
123 }