You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1023 B
49 lines
1023 B
4 years ago
|
# Copyright 1999-2020 Gentoo Authors
|
||
13 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
10 years ago
|
EAPI=5
|
||
13 years ago
|
inherit toolchain-funcs
|
||
|
|
||
|
DESCRIPTION="Script to test whether computer is running on AC power"
|
||
|
HOMEPAGE="http://packages.debian.org/testing/utils/powermgmt-base"
|
||
|
SRC_URI="mirror://debian/pool/main/p/${PN}/${PN}_${PV}.tar.gz"
|
||
|
|
||
|
LICENSE="GPL-2"
|
||
|
SLOT="0"
|
||
4 years ago
|
KEYWORDS="amd64 arm ~ia64 ppc ppc64 x86"
|
||
13 years ago
|
IUSE="+pm-utils"
|
||
|
|
||
12 years ago
|
RDEPEND="!pm-utils? ( virtual/awk )
|
||
13 years ago
|
sys-apps/grep
|
||
4 years ago
|
sys-apps/kmod[tools]
|
||
13 years ago
|
pm-utils? ( >=sys-power/pm-utils-1.4.1 )"
|
||
|
|
||
|
S=${WORKDIR}/${PN}
|
||
|
|
||
|
src_prepare() {
|
||
|
sed -i \
|
||
|
-e 's:$(CC) $(CFLAGS):$(CC) $(LDFLAGS) $(CFLAGS):' \
|
||
|
src/Makefile || die
|
||
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
tc-export CC
|
||
10 years ago
|
emake CFLAGS="${CFLAGS} -Wall -Wstrict-prototypes -DLINUX"
|
||
13 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
|
dodir /sbin
|
||
10 years ago
|
emake DESTDIR="${D}" install
|
||
13 years ago
|
|
||
10 years ago
|
doman man/{acpi,apm}_available.1
|
||
13 years ago
|
|
||
|
if ! use pm-utils; then
|
||
10 years ago
|
doman man/on_ac_power.1
|
||
13 years ago
|
else
|
||
10 years ago
|
rm -f "${D}"/sbin/on_ac_power
|
||
13 years ago
|
fi
|
||
|
|
||
|
newdoc debian/powermgmt-base.README.Debian README
|
||
|
dodoc debian/changelog
|
||
|
}
|