1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit linux-info systemd toolchain-funcs
8 DESCRIPTION="A tool to log and decode Machine Check Exceptions"
9 HOMEPAGE="http://mcelog.org/"
10 SRC_URI="https://github.com/andikleen/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
17 RDEPEND="selinux? ( sec-policy/selinux-mcelog )"
19 # TODO: add mce-inject to the tree to support test phase
23 if [[ ${MERGE_TYPE} != buildonly ]]; then
24 local CONFIG_CHECK="~X86_MCE"
25 kernel_is -ge 4 12 && CONFIG_CHECK+=" ~X86_MCELOG_LEGACY"
31 eapply "${FILESDIR}"/${PN}-0.8_pre1-timestamp-${PN}.patch \
32 "${FILESDIR}"/${PN}-129-debugflags.patch
40 insinto /etc/cron.daily
41 newins ${PN}.cron ${PN}
43 insinto /etc/logrotate.d/
44 newins ${PN}.logrotate ${PN}
46 newinitd "${FILESDIR}"/${PN}.init-r1 ${PN}
47 systemd_dounit "${FILESDIR}"/${PN}.service
53 einfo "The default configuration set is now installed in /etc/${PN}"
54 einfo "you might want to edit those files."
56 einfo "A sample cronjob is installed into /etc/cron.daily"
57 einfo "without executable bit (system service is the preferred method now)"