packagekit-base-1.1.1.ebuild 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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
  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: https://github.com/gentoo/gentoo/pull/1760 and https://github.com/hughsie/PackageKit/issues/143
  54. eapply "${FILESDIR}/${P}-cache-qafix.patch"
  55. # Disable unittests not working with portage backend
  56. # console: requires terminal input
  57. sed -e 's:^\(.*/packagekit-glib2/control\)://\1:' \
  58. -e 's:^\(.*/packagekit-glib2/transaction-list\)://\1:' \
  59. -e 's:^\(.*/packagekit-glib2/client"\)://\1:' \
  60. -e 's:^\(.*/packagekit-glib2/package-sack\)://\1:' \
  61. -e 's:^\(.*/packagekit-glib2/task\)://\1:' \
  62. -e 's:^\(.*/packagekit-glib2/console\)://\1:' \
  63. -i lib/packagekit-glib2/pk-test-daemon.c || die
  64. sed -e 's:^\(.*/packagekit/spawn\)://\1:' \
  65. -e 's:^\(.*/packagekit/transaction-db\)://\1:' \
  66. -e 's:^\(.*/packagekit/backend\)://\1:' \
  67. -i src/pk-self-test.c || die
  68. eapply_user
  69. use vala && vala_src_prepare
  70. }
  71. src_configure() {
  72. econf \
  73. --disable-gstreamer-plugin \
  74. --disable-gtk-doc \
  75. --disable-gtk-module \
  76. --disable-schemas-compile \
  77. --disable-static \
  78. --enable-bash-completion \
  79. --enable-man-pages \
  80. --enable-nls \
  81. --enable-portage \
  82. --localstatedir=/var \
  83. $(use_enable command-not-found) \
  84. $(use_enable connman) \
  85. $(use_enable cron) \
  86. $(use_enable entropy) \
  87. $(use_enable introspection) \
  88. $(use_enable networkmanager) \
  89. $(use_enable systemd) \
  90. $(use_enable test daemon-tests) \
  91. $(use_enable test local) \
  92. $(use_enable vala) \
  93. --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
  94. }
  95. src_install() {
  96. emake DESTDIR="${D}" install
  97. prune_libtool_files --all
  98. dodoc AUTHORS ChangeLog MAINTAINERS NEWS README
  99. }