mcelog-148.ebuild 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit linux-info systemd toolchain-funcs
  5. DESCRIPTION="A tool to log and decode Machine Check Exceptions"
  6. HOMEPAGE="http://mcelog.org/"
  7. SRC_URI="https://github.com/andikleen/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="selinux"
  12. RDEPEND="selinux? ( sec-policy/selinux-mcelog )"
  13. CONFIG_CHECK="~X86_MCE"
  14. # TODO: add mce-inject to the tree to support test phase
  15. RESTRICT="test"
  16. src_prepare() {
  17. eapply "${FILESDIR}"/${PN}-0.8_pre1-timestamp-${PN}.patch \
  18. "${FILESDIR}"/${PN}-129-debugflags.patch \
  19. "${FILESDIR}"/${PN}-1.0_pre3_p20120918-bashism.patch
  20. eapply_user
  21. tc-export CC
  22. }
  23. src_install() {
  24. default
  25. insinto /etc/cron.daily
  26. newins ${PN}.cron ${PN}
  27. insinto /etc/logrotate.d/
  28. newins ${PN}.logrotate ${PN}
  29. newinitd "${FILESDIR}"/${PN}.init-r1 ${PN}
  30. systemd_dounit "${FILESDIR}"/${PN}.service
  31. dodoc *.pdf
  32. }
  33. pkg_postinst() {
  34. einfo "The default configuration set is now installed in /etc/${PN}"
  35. einfo "you might want to edit those files."
  36. einfo
  37. einfo "A sample cronjob is installed into /etc/cron.daily"
  38. einfo "without executable bit (system service is the preferred method now)"
  39. }