1 |
commit: a4a8253524409bbba018e55bbf66254349415f87 |
2 |
Author: Andrey Utkin <andrey_utkin <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 17 22:50:28 2020 +0000 |
4 |
Commit: Andrey Utkin <andrey_utkin <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 17 22:50:28 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4a82535 |
7 |
|
8 |
sys-power/acpid: add new ebuild 2.0.32-r2 |
9 |
|
10 |
Cloned from 2.0.32-r1 for further changes. |
11 |
|
12 |
Bug: https://bugs.gentoo.org/692598 |
13 |
Package-Manager: Portage-2.3.66, Repoman-2.3.16 |
14 |
Signed-off-by: Andrey Utkin <andrey_utkin <AT> gentoo.org> |
15 |
|
16 |
sys-power/acpid/acpid-2.0.32-r2.ebuild | 71 ++++++++++++++++++++++++++++++++++ |
17 |
1 file changed, 71 insertions(+) |
18 |
|
19 |
diff --git a/sys-power/acpid/acpid-2.0.32-r2.ebuild b/sys-power/acpid/acpid-2.0.32-r2.ebuild |
20 |
new file mode 100644 |
21 |
index 00000000000..1b2a4e9e820 |
22 |
--- /dev/null |
23 |
+++ b/sys-power/acpid/acpid-2.0.32-r2.ebuild |
24 |
@@ -0,0 +1,71 @@ |
25 |
+# Copyright 1999-2020 Gentoo Authors |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+ |
28 |
+EAPI=6 |
29 |
+inherit linux-info systemd |
30 |
+ |
31 |
+DESCRIPTION="Daemon for Advanced Configuration and Power Interface" |
32 |
+HOMEPAGE="https://sourceforge.net/projects/acpid2" |
33 |
+EXTRAS_VER="2.0.32-r1" |
34 |
+EXTRAS_NAME="${CATEGORY}_${PN}_${EXTRAS_VER}_extras" |
35 |
+SRC_URI="mirror://sourceforge/${PN}2/${P}.tar.xz |
36 |
+ https://dev.gentoo.org/~andrey_utkin/distfiles/${EXTRAS_NAME}.tar.xz |
37 |
+ " |
38 |
+ |
39 |
+LICENSE="GPL-2" |
40 |
+SLOT="0" |
41 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~x86" |
42 |
+IUSE="selinux" |
43 |
+ |
44 |
+RDEPEND="selinux? ( sec-policy/selinux-apm )" |
45 |
+DEPEND=">=sys-kernel/linux-headers-3" |
46 |
+ |
47 |
+pkg_pretend() { |
48 |
+ local CONFIG_CHECK="~INPUT_EVDEV" |
49 |
+ local WARNING_INPUT_EVDEV="CONFIG_INPUT_EVDEV is required for ACPI button event support." |
50 |
+ [[ ${MERGE_TYPE} != buildonly ]] && check_extra_config |
51 |
+} |
52 |
+ |
53 |
+pkg_setup() { :; } |
54 |
+ |
55 |
+PATCHES=( |
56 |
+ "${WORKDIR}/${EXTRAS_NAME}/${PN}-2.0.32-powerbtn-gsd-power.patch" #702700 |
57 |
+) |
58 |
+ |
59 |
+src_install() { |
60 |
+ emake DESTDIR="${D}" install |
61 |
+ |
62 |
+ newdoc kacpimon/README README.kacpimon |
63 |
+ dodoc -r samples |
64 |
+ rm -f "${D}"/usr/share/doc/${PF}/COPYING || die |
65 |
+ |
66 |
+ exeinto /etc/acpi |
67 |
+ newexe "${WORKDIR}/${EXTRAS_NAME}/${PN}-1.0.6-default.sh" default.sh |
68 |
+ exeinto /etc/acpi/actions |
69 |
+ newexe samples/powerbtn/powerbtn.sh powerbtn.sh |
70 |
+ insinto /etc/acpi/events |
71 |
+ newins "${WORKDIR}/${EXTRAS_NAME}/${PN}-1.0.4-default" default |
72 |
+ |
73 |
+ newinitd "${WORKDIR}/${EXTRAS_NAME}/${PN}-2.0.26-init.d" ${PN} |
74 |
+ newconfd "${WORKDIR}/${EXTRAS_NAME}/${PN}-2.0.16-conf.d" ${PN} |
75 |
+ |
76 |
+ systemd_dounit "${WORKDIR}"/${EXTRAS_NAME}/systemd/${PN}.{service,socket} |
77 |
+} |
78 |
+ |
79 |
+pkg_postinst() { |
80 |
+ if [[ -z ${REPLACING_VERSIONS} ]]; then |
81 |
+ elog |
82 |
+ elog "You may wish to read the Gentoo Linux Power Management Guide," |
83 |
+ elog "which can be found online at:" |
84 |
+ elog "https://wiki.gentoo.org/wiki/Power_management/Guide" |
85 |
+ elog |
86 |
+ fi |
87 |
+ |
88 |
+ # files/systemd/acpid.socket -> ListenStream=/run/acpid.socket |
89 |
+ mkdir -p "${ROOT%/}"/run |
90 |
+ |
91 |
+ if ! grep -qs "^tmpfs.*/run " "${ROOT%/}"/proc/mounts ; then |
92 |
+ echo |
93 |
+ ewarn "You should reboot the system now to get /run mounted with tmpfs!" |
94 |
+ fi |
95 |
+} |