Skip to content

Commit

Permalink
app-laptop/mbpfan: sync live ebuild
Browse files Browse the repository at this point in the history
Signed-off-by: David Seifert <[email protected]>
  • Loading branch information
SoapGentoo committed Jul 31, 2022
1 parent d107e7d commit 42370be
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions app-laptop/mbpfan/mbpfan-9999.ebuild
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6
EAPI=8

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
if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/dgraziotin/${PN}.git"
else
SRC_URI="https://github.com/dgraziotin/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
fi

LICENSE="GPL-3+"
SLOT="0"
RESTRICT="test" # will fail if the hardware is unavailable, not useful

CONFIG_CHECK="~SENSORS_APPLESMC ~SENSORS_CORETEMP"

src_compile() {
Expand All @@ -33,14 +34,14 @@ src_install() {

# 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
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
rm -r "${ED}"/usr/share/doc/${PN} || die

einstalldocs
}

0 comments on commit 42370be

Please sign in to comment.