mcelog-100.ebuild 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit linux-info eutils 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. epatch "${FILESDIR}"/${PN}-0.8_pre1-timestamp-${PN}.patch \
  18. "${FILESDIR}"/${PN}-1.0_pre3_p20120918-build.patch \
  19. "${FILESDIR}"/${PN}-1.0_pre3_p20120918-bashism.patch
  20. tc-export CC
  21. }
  22. src_install() {
  23. dosbin ${PN}
  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 ${PN}
  29. systemd_dounit "${FILESDIR}"/${PN}.service
  30. insinto /etc/${PN}
  31. doins mcelog.conf
  32. exeinto /etc/${PN}
  33. doexe triggers/*
  34. dodoc CHANGES README TODO *.pdf
  35. doman ${PN}.8
  36. }
  37. pkg_postinst() {
  38. einfo "The default configuration set is now installed in /etc/${PN}"
  39. einfo "you might want to edit those files."
  40. einfo
  41. einfo "A sample cronjob is installed into /etc/cron.daily"
  42. einfo "without executable bit (system service is the preferred method now)"
  43. }