abrt-2.0.12-r2.ebuild 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python2_7 )
  5. # Need gnome2-utils for gnome2_icon_cache_update
  6. inherit autotools eutils gnome2-utils python-single-r1 systemd user
  7. DESCRIPTION="Automatic bug detection and reporting tool"
  8. HOMEPAGE="https://github.com/abrt/abrt/wiki/ABRT-Project"
  9. SRC_URI="https://fedorahosted.org/released/${PN}/${P}.tar.gz"
  10. LICENSE="GPL-2"
  11. SLOT="0"
  12. KEYWORDS="amd64 x86"
  13. IUSE="debug"
  14. COMMON_DEPEND="${PYTHON_DEPS}
  15. >=dev-libs/btparser-0.18
  16. >=dev-libs/glib-2.21:2
  17. >=dev-libs/libreport-2.0.11[${PYTHON_USEDEP}]
  18. dev-libs/libxml2
  19. dev-libs/nss
  20. sys-apps/dbus
  21. sys-auth/polkit
  22. sys-fs/inotify-tools
  23. x11-libs/gtk+:3
  24. x11-libs/libnotify"
  25. RDEPEND="${COMMON_DEPEND}
  26. app-arch/cpio
  27. dev-libs/elfutils
  28. >=sys-devel/gdb-7"
  29. DEPEND="${COMMON_DEPEND}
  30. app-text/asciidoc
  31. app-text/xmlto
  32. >=dev-util/intltool-0.35.0
  33. virtual/pkgconfig
  34. >=sys-devel/gettext-0.17"
  35. REQUIRED_USE=${PYTHON_REQUIRED_USE}
  36. pkg_setup() {
  37. python-single-r1_pkg_setup
  38. enewgroup abrt
  39. enewuser abrt -1 -1 -1 abrt
  40. }
  41. src_prepare() {
  42. # Disable redhat-specific code not usable in gentoo, or that requires
  43. # bugs.gentoo.org infra support.
  44. epatch "${FILESDIR}/${PN}-2.0.12-gentoo.patch"
  45. # Using a server response as a format string is a bad idea
  46. epatch "${FILESDIR}/${PN}-2.0.6-format-security.patch"
  47. # pyhook test is sensitive to the format of python's error messages, and
  48. # fails with certain python versions
  49. sed -e '/pyhook.at/ d' \
  50. -i tests/Makefile.* tests/testsuite.at || die "sed 2 failed"
  51. # automake-1.12, #427926
  52. epatch "${FILESDIR}/${PN}-2.0.12-automake-1.12.patch"
  53. # Fix dbus timeout in gui; in next release
  54. epatch "${FILESDIR}/${P}-dbus-fallback.patch"
  55. eautoreconf
  56. python_fix_shebang .
  57. }
  58. src_configure() {
  59. myeconfargs=(
  60. "--localstatedir=${EPREFIX}/var"
  61. "$(systemd_with_unitdir)"
  62. )
  63. # --disable-debug enables debug!
  64. use debug && myeconfargs=( "${myeconfargs[@]}" --enable-debug )
  65. econf "${myeconfargs[@]}"
  66. }
  67. src_install() {
  68. default
  69. keepdir /var/run/abrt
  70. # /var/spool/abrt is created by dev-libs/libreport
  71. diropts -m 700 -o abrt -g abrt
  72. keepdir /var/spool/abrt-upload
  73. diropts -m 775 -o abrt -g abrt
  74. keepdir /var/cache/abrt-di
  75. find "${D}" -name '*.la' -exec rm -f {} + || die
  76. newinitd "${FILESDIR}/${PN}-2.0.12-r1-init" abrt
  77. newconfd "${FILESDIR}/${PN}-2.0.12-r1-conf" abrt
  78. }
  79. pkg_preinst() {
  80. gnome2_icon_savelist
  81. }
  82. pkg_postinst() {
  83. gnome2_icon_cache_update
  84. elog "To start the bug detection service on an openrc-based system, do"
  85. elog "# /etc/init.d/abrt start"
  86. }
  87. pkg_postrm() {
  88. gnome2_icon_cache_update
  89. }