kexec-tools-2.0.14.ebuild 1.7 KB

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