mcelog-149.ebuild 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. eapply_user
  20. tc-export CC
  21. }
  22. src_install() {
  23. default
  24. insinto /etc/cron.daily
  25. newins ${PN}.cron ${PN}
  26. insinto /etc/logrotate.d/
  27. newins ${PN}.logrotate ${PN}
  28. newinitd "${FILESDIR}"/${PN}.init-r1 ${PN}
  29. systemd_dounit "${FILESDIR}"/${PN}.service
  30. dodoc *.pdf
  31. }
  32. pkg_postinst() {
  33. einfo "The default configuration set is now installed in /etc/${PN}"
  34. einfo "you might want to edit those files."
  35. einfo
  36. einfo "A sample cronjob is installed into /etc/cron.daily"
  37. einfo "without executable bit (system service is the preferred method now)"
  38. }