1 |
commit: d85cb12dc210e348dbb3dbfad9237dc914a3146d |
2 |
Author: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 2 20:03:28 2017 +0000 |
4 |
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 2 20:10:42 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d85cb12d |
7 |
|
8 |
app-laptop/mbpfan: update the live ebuild |
9 |
|
10 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
11 |
|
12 |
app-laptop/mbpfan/mbpfan-9999.ebuild | 35 ++++++++++++++++++++++++----------- |
13 |
1 file changed, 24 insertions(+), 11 deletions(-) |
14 |
|
15 |
diff --git a/app-laptop/mbpfan/mbpfan-9999.ebuild b/app-laptop/mbpfan/mbpfan-9999.ebuild |
16 |
index c824800ff6f..7cb1c54849c 100644 |
17 |
--- a/app-laptop/mbpfan/mbpfan-9999.ebuild |
18 |
+++ b/app-laptop/mbpfan/mbpfan-9999.ebuild |
19 |
@@ -1,32 +1,45 @@ |
20 |
-# Copyright 1999-2016 Gentoo Foundation |
21 |
+# Copyright 1999-2017 Gentoo Foundation |
22 |
# Distributed under the terms of the GNU General Public License v2 |
23 |
|
24 |
EAPI=6 |
25 |
|
26 |
-inherit git-r3 linux-info systemd toolchain-funcs |
27 |
+inherit linux-info systemd toolchain-funcs |
28 |
|
29 |
DESCRIPTION="A simple daemon to control fan speed on all Macbook/Macbook Pros" |
30 |
HOMEPAGE="https://github.com/dgraziotin/mbpfan" |
31 |
-EGIT_REPO_URI="git://github.com/dgraziotin/${PN}.git" |
32 |
LICENSE="GPL-3+" |
33 |
SLOT="0" |
34 |
RESTRICT="test" # will fail if the hardware is unavailable, not useful |
35 |
|
36 |
+if [[ "${PV}" = 9999 ]]; then |
37 |
+ inherit git-r3 |
38 |
+ EGIT_REPO_URI="git://github.com/dgraziotin/${PN}.git" |
39 |
+ KEYWORDS="" |
40 |
+else |
41 |
+ SRC_URI="https://github.com/dgraziotin/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
42 |
+ KEYWORDS="~amd64" |
43 |
+fi |
44 |
+ |
45 |
CONFIG_CHECK="~SENSORS_APPLESMC ~SENSORS_CORETEMP" |
46 |
|
47 |
-src_prepare() { |
48 |
- sed -i -e "s:g++:$(tc-getCXX):g" Makefile || die |
49 |
- default |
50 |
+src_compile() { |
51 |
+ emake CC="$(tc-getCC)" |
52 |
} |
53 |
|
54 |
src_install() { |
55 |
- emake DESTDIR="${D%/}" install |
56 |
- |
57 |
- rm -r "${D}"usr/share/doc/${PN} || die |
58 |
- rm -r "${D}"lib/systemd/system || die |
59 |
+ # There's a double linking problem in install |
60 |
+ emake DESTDIR="${ED}" CC="$(tc-getCC)" install |
61 |
|
62 |
- newinitd ${PN}.init.gentoo ${PN} |
63 |
+ # Remove the empty systemd unit directory |
64 |
+ # It doesn't actually install the unit file |
65 |
+ rmdir --ignore-fail-on-non-empty -p "${ED%/}/lib/systemd/system" || die |
66 |
+ # Actually install the sytstemd unit file |
67 |
systemd_dounit ${PN}.service |
68 |
+ # Install openrc init file |
69 |
+ newinitd ${PN}.init.gentoo ${PN} |
70 |
+ |
71 |
+ # make install doesn't install the docs in the right place |
72 |
+ rm -rf "${ED%/}/usr/share/doc/${PN}" || die |
73 |
|
74 |
einstalldocs |
75 |
} |