irqbalance-1.1.0.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Copyright 1999-2016 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. caps? ( sys-libs/libcap-ng )
  16. numa? ( sys-process/numactl )
  17. "
  18. DEPEND="${CDEPEND}
  19. virtual/pkgconfig
  20. "
  21. RDEPEND="${CDEPEND}
  22. selinux? ( sec-policy/selinux-irqbalance )
  23. "
  24. pkg_setup() {
  25. CONFIG_CHECK="~PCI_MSI"
  26. linux-info_pkg_setup
  27. }
  28. src_prepare() {
  29. # Follow systemd policies
  30. # https://wiki.gentoo.org/wiki/Project:Systemd/Ebuild_policy
  31. sed -i -e 's/ $IRQBALANCE_ARGS//' misc/irqbalance.service || die
  32. sed -i -e '/EnvironmentFile/d' misc/irqbalance.service || die
  33. autotools-utils_src_prepare
  34. }
  35. src_configure() {
  36. local myeconfargs=(
  37. $(use_with caps libcap-ng)
  38. $(use_enable numa)
  39. )
  40. autotools-utils_src_configure
  41. }
  42. src_install() {
  43. autotools-utils_src_install
  44. newinitd "${FILESDIR}"/irqbalance.init.3 irqbalance
  45. newconfd "${FILESDIR}"/irqbalance.confd-1 irqbalance
  46. systemd_dounit misc/irqbalance.service
  47. }