/[gentoo-x86]/sys-power/pm-utils/pm-utils-1.4.1-r7.ebuild
Gentoo

Contents of /sys-power/pm-utils/pm-utils-1.4.1-r7.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Jul 29 02:56:15 2015 UTC (4 years, 5 months ago) by tetromino
Branch: MAIN
CVS Tags: HEAD
Fix suspend/hibernate failure when using strange shells like dash-0.5.8.2 (bug #555032, thanks to David Korth et al.)

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0x18E5B6F2D8D5EC8D)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-power/pm-utils/pm-utils-1.4.1-r6.ebuild,v 1.6 2014/11/08 18:56:02 ssuominen Exp $
4
5 EAPI=5
6 inherit eutils multilib
7
8 DESCRIPTION="Suspend and hibernation utilities"
9 HOMEPAGE="http://pm-utils.freedesktop.org/"
10 SRC_URI="http://pm-utils.freedesktop.org/releases/${P}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
15 IUSE="alsa debug ntp video_cards_intel video_cards_radeon"
16
17 vbetool="!video_cards_intel? ( sys-apps/vbetool )"
18 RDEPEND="!<app-laptop/laptop-mode-tools-1.55-r1
19 !sys-power/powermgmt-base[-pm-utils(+)]
20 sys-apps/dbus
21 >=sys-apps/util-linux-2.13
22 sys-power/pm-quirks
23 alsa? ( media-sound/alsa-utils )
24 ntp? ( || ( net-misc/ntp net-misc/openntpd ) )
25 amd64? ( ${vbetool} )
26 x86? ( ${vbetool} )
27 video_cards_radeon? ( app-laptop/radeontool )"
28 DEPEND="${RDEPEND}"
29
30 DOCS="AUTHORS ChangeLog NEWS pm/HOWTO* README* TODO"
31
32 src_prepare() {
33 local ignore="01grub"
34 use ntp || ignore+=" 90clock"
35
36 use debug && echo 'PM_DEBUG="true"' > "${T}"/gentoo
37 echo "HOOK_BLACKLIST=\"${ignore}\"" >> "${T}"/gentoo
38
39 epatch \
40 "${FILESDIR}"/${PV}-bluetooth-sync.patch \
41 "${FILESDIR}"/${PV}-disable-sata-alpm.patch \
42 "${FILESDIR}"/${PV}-fix-intel-audio-powersave-hook.patch \
43 "${FILESDIR}"/${PV}-logging-append.patch \
44 "${FILESDIR}"/${PV}-fix-alpm-typo.patch \
45 "${FILESDIR}"/${PV}-inhibit-on-right-status.patch \
46 "${FILESDIR}"/${PV}-ignore-led-failure.patch \
47 "${FILESDIR}"/${PV}-run-hook-logging.patch \
48 "${FILESDIR}"/${PV}-suspend-hybrid.patch \
49 "${FILESDIR}"/${PV}-uswsusp-hibernate-mode.patch \
50 "${FILESDIR}"/${PV}-xfs_buffer_arguments.patch \
51 "${FILESDIR}"/${PV}-echo-n.patch
52 }
53
54 src_configure() {
55 econf --disable-doc
56 }
57
58 src_install() {
59 default
60 doman man/*.{1,8}
61
62 # Remove duplicate documentation install
63 rm -r "${ED}"/usr/share/doc/${PN}
64
65 insinto /etc/pm/config.d
66 doins "${T}"/gentoo
67
68 insinto /etc/logrotate.d
69 newins "${FILESDIR}"/${PN}.logrotate ${PN} #408091
70
71 exeinto /usr/$(get_libdir)/${PN}/sleep.d
72 doexe "${FILESDIR}"/sleep.d/50unload_alx
73
74 exeinto /usr/$(get_libdir)/${PN}/power.d
75 doexe "${FILESDIR}"/power.d/{pci_devices,usb_bluetooth}
76
77 # No longer required with current networkmanager (rm -f from debian/rules)
78 rm -f "${ED}"/usr/$(get_libdir)/${PN}/sleep.d/55NetworkManager
79
80 # No longer required with current kernels (rm -f from debian/rules)
81 rm -f "${ED}"/usr/$(get_libdir)/${PN}/sleep.d/49bluetooth
82
83 # Punt HAL related file wrt #401257 (rm -f from debian/rules)
84 rm -f "${ED}"/usr/$(get_libdir)/${PN}/power.d/hal-cd-polling
85
86 # Punt hooks which have shown to not reduce, or even increase power usage
87 # (rm -f from debian rules)
88 rm -f "${ED}"/usr/$(get_libdir)/${PN}/power.d/{journal-commit,readahead}
89
90 # Remove hooks which are not stable enough yet (rm -f from debian/rules)
91 rm -f "${ED}"/usr/$(get_libdir)/${PN}/power.d/harddrive
92
93 # Change to executable (chmod +x from debian/rules)
94 fperms +x /usr/$(get_libdir)/${PN}/defaults
95 }

  ViewVC Help
Powered by ViewVC 1.1.20