irqbalance-1.2.0.ebuild 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. AUTOTOOLS_AUTORECONF=true
  5. inherit autotools-utils systemd linux-info
  6. DESCRIPTION="Distribute hardware interrupts across processors on a multiprocessor system"
  7. HOMEPAGE="https://github.com/Irqbalance/irqbalance"
  8. SRC_URI="https://github.com/Irqbalance/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~ppc ~x86"
  12. IUSE="caps +numa selinux"
  13. CDEPEND="
  14. dev-libs/glib:2
  15. sys-libs/ncurses:0=[unicode]
  16. caps? ( sys-libs/libcap-ng )
  17. numa? ( sys-process/numactl )
  18. "
  19. DEPEND="${CDEPEND}
  20. virtual/pkgconfig
  21. "
  22. RDEPEND="${CDEPEND}
  23. selinux? ( sec-policy/selinux-irqbalance )
  24. "
  25. PATCHES=(
  26. "${FILESDIR}/${P}-tinfo.patch"
  27. )
  28. pkg_setup() {
  29. CONFIG_CHECK="~PCI_MSI"
  30. linux-info_pkg_setup
  31. }
  32. src_prepare() {
  33. # Follow systemd policies
  34. # https://wiki.gentoo.org/wiki/Project:Systemd/Ebuild_policy
  35. sed \
  36. -e 's/ $IRQBALANCE_ARGS//' \
  37. -e '/EnvironmentFile/d' \
  38. -i misc/irqbalance.service || die
  39. autotools-utils_src_prepare
  40. }
  41. src_configure() {
  42. local myeconfargs=(
  43. $(use_with caps libcap-ng)
  44. $(use_enable numa)
  45. )
  46. autotools-utils_src_configure
  47. }
  48. src_install() {
  49. autotools-utils_src_install
  50. newinitd "${FILESDIR}"/irqbalance.init.4 irqbalance
  51. newconfd "${FILESDIR}"/irqbalance.confd-1 irqbalance
  52. systemd_dounit misc/irqbalance.service
  53. }