*/*: Drop stable ia64 keywords
[gentoo.git] / sys-power / powermgmt-base / powermgmt-base-1.31.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 inherit toolchain-funcs
6
7 DESCRIPTION="Script to test whether computer is running on AC power"
8 HOMEPAGE="http://packages.debian.org/testing/utils/powermgmt-base"
9 SRC_URI="mirror://debian/pool/main/p/${PN}/${PN}_${PV}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="amd64 arm ~ia64 ppc ppc64 x86"
14 IUSE="+pm-utils"
15
16 RDEPEND="!pm-utils? ( virtual/awk )
17         sys-apps/grep
18         virtual/modutils
19         pm-utils? ( >=sys-power/pm-utils-1.4.1 )"
20
21 S=${WORKDIR}/${PN}
22
23 src_prepare() {
24         sed -i \
25                 -e 's:$(CC) $(CFLAGS):$(CC) $(LDFLAGS) $(CFLAGS):' \
26                 src/Makefile || die
27 }
28
29 src_compile() {
30         tc-export CC
31         emake CFLAGS="${CFLAGS} -Wall -Wstrict-prototypes -DLINUX"
32 }
33
34 src_install() {
35         dodir /sbin
36         emake DESTDIR="${D}" install
37
38         doman man/{acpi,apm}_available.1
39
40         if ! use pm-utils; then
41                 doman man/on_ac_power.1
42         else
43                 rm -f "${D}"/sbin/on_ac_power
44         fi
45
46         newdoc debian/powermgmt-base.README.Debian README
47         dodoc debian/changelog
48 }