diff options
author | Göktürk Yüksek <gokturk@gentoo.org> | 2019-11-25 14:37:29 -0500 |
---|---|---|
committer | Göktürk Yüksek <gokturk@gentoo.org> | 2019-11-25 15:17:53 -0500 |
commit | f97a51509a145d8eb61946d10e404cf00e4fb222 (patch) | |
tree | 37a2ba7890fdcd0b9c15fd68380cb05c82d3cbeb /app-laptop/mbpfan/mbpfan-2.2.1.ebuild | |
parent | x11-terms/alacritty: update live ebuild (diff) | |
download | gentoo-f97a51509a145d8eb61946d10e404cf00e4fb222.tar.gz gentoo-f97a51509a145d8eb61946d10e404cf00e4fb222.tar.bz2 gentoo-f97a51509a145d8eb61946d10e404cf00e4fb222.zip |
app-laptop/mbpfan: bump to 2.2.1
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
Diffstat (limited to 'app-laptop/mbpfan/mbpfan-2.2.1.ebuild')
-rw-r--r-- | app-laptop/mbpfan/mbpfan-2.2.1.ebuild | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/app-laptop/mbpfan/mbpfan-2.2.1.ebuild b/app-laptop/mbpfan/mbpfan-2.2.1.ebuild new file mode 100644 index 000000000000..b530d9569fa7 --- /dev/null +++ b/app-laptop/mbpfan/mbpfan-2.2.1.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit linux-info systemd toolchain-funcs + +DESCRIPTION="A simple daemon to control fan speed on all Macbook/Macbook Pros" +HOMEPAGE="https://github.com/dgraziotin/mbpfan" +LICENSE="GPL-3+" +SLOT="0" +RESTRICT="test" # will fail if the hardware is unavailable, not useful + +if [[ "${PV}" = 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/dgraziotin/${PN}.git" + KEYWORDS="" +else + SRC_URI="https://github.com/dgraziotin/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +CONFIG_CHECK="~SENSORS_APPLESMC ~SENSORS_CORETEMP" + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install() { + emake DESTDIR="${ED}" install + + # Decompress the man page to enable PM auto compression + gzip -d "${ED}"/usr/share/man/man8/mbpfan.8.gz || die + + # Remove the empty systemd unit directory + # It doesn't actually install the unit file + rmdir --ignore-fail-on-non-empty -p "${ED%/}/lib/systemd/system" || die + # Actually install the sytstemd unit file + systemd_dounit ${PN}.service + # Install openrc init file + newinitd ${PN}.init.gentoo ${PN} + + # make install doesn't install the docs in the right place + rm -rf "${ED%/}/usr/share/doc/${PN}" || die + + einstalldocs +} |