packagekit-base-1.1.4.ebuild 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="6"
  4. # PackageKit supports 3.2+, but entropy and portage backends are untested
  5. # Future note: use --enable-python3
  6. PYTHON_COMPAT=( python2_7 )
  7. VALA_USE_DEPEND="vapigen"
  8. inherit bash-completion-r1 multilib python-single-r1 systemd vala xdg
  9. MY_PN="PackageKit"
  10. MY_P=${MY_PN}-${PV}
  11. DESCRIPTION="Manage packages in a secure way using a cross-distro and cross-architecture API"
  12. HOMEPAGE="http://www.packagekit.org/"
  13. SRC_URI="https://www.freedesktop.org/software/${MY_PN}/releases/${MY_P}.tar.xz"
  14. LICENSE="GPL-2"
  15. SLOT="0/18"
  16. KEYWORDS="~alpha ~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
  17. IUSE="connman cron command-not-found +introspection networkmanager entropy systemd test vala"
  18. REQUIRED_USE="
  19. ${PYTHON_REQUIRED_USE}
  20. vala? ( introspection )
  21. "
  22. # While not strictly needed, consolekit is the alternative to systemd-login
  23. # to get current session's user.
  24. CDEPEND="
  25. >=app-shells/bash-completion-2
  26. dev-db/sqlite:3
  27. >=dev-libs/dbus-glib-0.74
  28. >=dev-libs/glib-2.46.0:2[${PYTHON_USEDEP}]
  29. >=sys-auth/polkit-0.98
  30. >=sys-apps/dbus-1.3.0
  31. ${PYTHON_DEPS}
  32. connman? ( net-misc/connman )
  33. introspection? ( >=dev-libs/gobject-introspection-0.9.9:= )
  34. networkmanager? ( >=net-misc/networkmanager-0.6.4:= )
  35. systemd? ( >=sys-apps/systemd-204 )
  36. "
  37. DEPEND="${CDEPEND}
  38. dev-libs/libxslt[${PYTHON_USEDEP}]
  39. >=dev-util/gtk-doc-am-1.11
  40. >=dev-util/intltool-0.35.0
  41. sys-devel/gettext
  42. virtual/pkgconfig
  43. vala? ( $(vala_depend) )
  44. "
  45. RDEPEND="${CDEPEND}
  46. >=app-portage/layman-2[${PYTHON_USEDEP}]
  47. >=sys-apps/portage-2.2[${PYTHON_USEDEP}]
  48. entropy? ( >=sys-apps/entropy-234[${PYTHON_USEDEP}] )
  49. !systemd? ( sys-auth/consolekit )
  50. "
  51. S="${WORKDIR}/${MY_P}"
  52. src_prepare() {
  53. # Fixes QA Notices:
  54. # - https://github.com/gentoo/gentoo/pull/1760
  55. # - https://github.com/hughsie/PackageKit/issues/143
  56. eapply "${FILESDIR}"/${PN}-1.1.1-cache-qafix.patch
  57. # Disable unittests not working with portage backend
  58. # console: requires terminal input
  59. sed -e 's:^\(.*/packagekit-glib2/control\)://\1:' \
  60. -e 's:^\(.*/packagekit-glib2/transaction-list\)://\1:' \
  61. -e 's:^\(.*/packagekit-glib2/client"\)://\1:' \
  62. -e 's:^\(.*/packagekit-glib2/package-sack\)://\1:' \
  63. -e 's:^\(.*/packagekit-glib2/task\)://\1:' \
  64. -e 's:^\(.*/packagekit-glib2/console\)://\1:' \
  65. -i lib/packagekit-glib2/pk-test-daemon.c || die
  66. sed -e 's:^\(.*/packagekit/spawn\)://\1:' \
  67. -e 's:^\(.*/packagekit/transaction-db\)://\1:' \
  68. -e 's:^\(.*/packagekit/backend\)://\1:' \
  69. -i src/pk-self-test.c || die
  70. eapply_user
  71. use vala && vala_src_prepare
  72. xdg_src_prepare
  73. }
  74. src_configure() {
  75. econf \
  76. --disable-gstreamer-plugin \
  77. --disable-gtk-doc \
  78. --disable-gtk-module \
  79. --disable-schemas-compile \
  80. --disable-static \
  81. --enable-bash-completion \
  82. --enable-man-pages \
  83. --enable-nls \
  84. --enable-portage \
  85. --localstatedir=/var \
  86. $(use_enable command-not-found) \
  87. $(use_enable connman) \
  88. $(use_enable cron) \
  89. $(use_enable entropy) \
  90. $(use_enable introspection) \
  91. $(use_enable networkmanager) \
  92. $(use_enable systemd) \
  93. $(use_enable test daemon-tests) \
  94. $(use_enable test local) \
  95. $(use_enable vala) \
  96. --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
  97. }
  98. src_install() {
  99. emake DESTDIR="${D}" install
  100. prune_libtool_files --all
  101. dodoc AUTHORS ChangeLog MAINTAINERS NEWS README
  102. }