diff options
author | Ben Kohler <bkohler@gentoo.org> | 2020-11-09 11:35:22 -0600 |
---|---|---|
committer | Ben Kohler <bkohler@gentoo.org> | 2020-11-09 11:35:41 -0600 |
commit | b53db14ace7a2ab6f128b490f823f03304de957c (patch) | |
tree | 453e004b0aaa8f76bef1af9eeffc21d8612ce938 /app-admin/mcelog | |
parent | www-apps/moodle: version bumps to 3.5.15, 3.7.9, 3.8.6, 3.9.3, 3.10 (diff) | |
download | gentoo-b53db14ace7a2ab6f128b490f823f03304de957c.tar.gz gentoo-b53db14ace7a2ab6f128b490f823f03304de957c.tar.bz2 gentoo-b53db14ace7a2ab6f128b490f823f03304de957c.zip |
app-admin/mcelog: use upstream's systemd unit
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Ben Kohler <bkohler@gentoo.org>
Diffstat (limited to 'app-admin/mcelog')
-rw-r--r-- | app-admin/mcelog/mcelog-173-r1.ebuild | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/app-admin/mcelog/mcelog-173-r1.ebuild b/app-admin/mcelog/mcelog-173-r1.ebuild new file mode 100644 index 000000000000..53cb223fe5d2 --- /dev/null +++ b/app-admin/mcelog/mcelog-173-r1.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit linux-info systemd toolchain-funcs + +DESCRIPTION="A tool to log and decode Machine Check Exceptions" +HOMEPAGE="http://mcelog.org/" +SRC_URI="https://github.com/andikleen/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="selinux" + +RDEPEND="selinux? ( sec-policy/selinux-mcelog )" + +# TODO: add mce-inject to the tree to support test phase +RESTRICT="test" + +pkg_pretend() { + if [[ ${MERGE_TYPE} != buildonly ]]; then + local CONFIG_CHECK="~X86_MCE" + kernel_is -ge 4 12 && CONFIG_CHECK+=" ~X86_MCELOG_LEGACY" + check_extra_config + fi +} + +src_prepare() { + eapply "${FILESDIR}"/${PN}-0.8_pre1-timestamp-${PN}.patch \ + "${FILESDIR}"/${PN}-129-debugflags.patch + eapply_user + tc-export CC +} + +src_install() { + default + + insinto /etc/cron.daily + newins ${PN}.cron ${PN} + + insinto /etc/logrotate.d/ + newins ${PN}.logrotate ${PN} + + newinitd "${FILESDIR}"/${PN}.init-r1 ${PN} + systemd_dounit ${PN}.service + + dodoc *.pdf +} + +pkg_postinst() { + einfo "The default configuration set is now installed in /etc/${PN}" + einfo "you might want to edit those files." + einfo + einfo "A sample cronjob is installed into /etc/cron.daily" + einfo "without executable bit (system service is the preferred method now)" +} |