kexec-tools-2.0.9-r2.ebuild 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit autotools-utils linux-info systemd
  5. DESCRIPTION="Load another kernel from the currently executing Linux kernel"
  6. HOMEPAGE="https://kernel.org/pub/linux/utils/kernel/kexec/"
  7. SRC_URI="mirror://kernel/linux/utils/kernel/kexec/${P}.tar.xz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="booke lzma xen zlib"
  12. REQUIRED_USE="lzma? ( zlib )"
  13. DEPEND="
  14. lzma? ( app-arch/xz-utils )
  15. zlib? ( sys-libs/zlib )"
  16. RDEPEND="${DEPEND}"
  17. CONFIG_CHECK="~KEXEC"
  18. PATCHES=(
  19. "${FILESDIR}"/${PN}-2.0.4-disable-kexec-test.patch
  20. "${FILESDIR}"/${PN}-2.0.4-out-of-source.patch
  21. "${FILESDIR}"/${PN}-2.0.9-hardened.patch
  22. )
  23. pkg_setup() {
  24. # GNU Make's $(COMPILE.S) passes ASFLAGS to $(CCAS), CCAS=$(CC)
  25. export ASFLAGS="${CCASFLAGS}"
  26. }
  27. src_configure() {
  28. local myeconfargs=(
  29. $(use_with booke)
  30. $(use_with lzma)
  31. $(use_with xen)
  32. $(use_with zlib)
  33. )
  34. autotools-utils_src_configure
  35. }
  36. src_install() {
  37. autotools-utils_src_install
  38. dodoc "${FILESDIR}"/README.Gentoo
  39. newinitd "${FILESDIR}"/kexec.init-2.0.4-r3 kexec
  40. newconfd "${FILESDIR}"/kexec.conf-2.0.4 kexec
  41. insinto /etc
  42. doins "${FILESDIR}"/kexec.conf
  43. insinto /etc/kernel/postinst.d
  44. doins "${FILESDIR}"/90_kexec
  45. systemd_dounit "${FILESDIR}"/kexec.service
  46. }
  47. pkg_postinst() {
  48. if systemd_is_booted || has_version sys-apps/systemd; then
  49. elog "For systemd support the new config file is"
  50. elog " /etc/kexec.conf"
  51. elog "Please adopt it to your needs as there is no autoconfig anymore"
  52. fi
  53. }