diff options
author | Göktürk Yüksek <gokturk@gentoo.org> | 2017-04-02 16:03:28 -0400 |
---|---|---|
committer | Göktürk Yüksek <gokturk@gentoo.org> | 2017-04-02 16:10:42 -0400 |
commit | d85cb12dc210e348dbb3dbfad9237dc914a3146d (patch) | |
tree | ca18d3a5685b990ec5d5447567ebe093d3810f11 /app-laptop | |
parent | app-laptop/mbpfan: bump to 2.0.0 (diff) | |
download | gentoo-d85cb12dc210e348dbb3dbfad9237dc914a3146d.tar.gz gentoo-d85cb12dc210e348dbb3dbfad9237dc914a3146d.tar.bz2 gentoo-d85cb12dc210e348dbb3dbfad9237dc914a3146d.zip |
app-laptop/mbpfan: update the live ebuild
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'app-laptop')
-rw-r--r-- | app-laptop/mbpfan/mbpfan-9999.ebuild | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/app-laptop/mbpfan/mbpfan-9999.ebuild b/app-laptop/mbpfan/mbpfan-9999.ebuild index c824800ff6f8..7cb1c54849c4 100644 --- a/app-laptop/mbpfan/mbpfan-9999.ebuild +++ b/app-laptop/mbpfan/mbpfan-9999.ebuild @@ -1,32 +1,45 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 -inherit git-r3 linux-info systemd toolchain-funcs +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" -EGIT_REPO_URI="git://github.com/dgraziotin/${PN}.git" 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="git://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_prepare() { - sed -i -e "s:g++:$(tc-getCXX):g" Makefile || die - default +src_compile() { + emake CC="$(tc-getCC)" } src_install() { - emake DESTDIR="${D%/}" install - - rm -r "${D}"usr/share/doc/${PN} || die - rm -r "${D}"lib/systemd/system || die + # There's a double linking problem in install + emake DESTDIR="${ED}" CC="$(tc-getCC)" install - newinitd ${PN}.init.gentoo ${PN} + # 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 } |