/[gentoo-x86]/sys-apps/apmd/apmd-3.2.2_p14.ebuild
Gentoo

Contents of /sys-apps/apmd/apmd-3.2.2_p14.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Tue Aug 30 20:42:15 2011 UTC (2 years, 11 months ago) by mattst88
Branch: MAIN
Changes since 1.5: +2 -1 lines
Added missing libtool dependency. Noticed due to x86-autobuild failure.

(Portage version: 2.1.10.3/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-apps/apmd/apmd-3.2.2_p14.ebuild,v 1.5 2011/01/19 05:55:04 xarthisius Exp $
4
5 EAPI=2
6 inherit eutils multilib toolchain-funcs
7
8 MY_PV=${PV%_p*}
9 MY_P=${PN}_${MY_PV}
10 PATCHV=${PV#*_p}
11
12 DESCRIPTION="Advanced Power Management Daemon"
13 HOMEPAGE="http://packages.qa.debian.org/a/apmd.html"
14 SRC_URI="mirror://debian/pool/main/a/apmd/${MY_P}.orig.tar.gz
15 mirror://debian/pool/main/a/apmd/${MY_P}-${PATCHV}.diff.gz"
16
17 LICENSE="GPL-2"
18 SLOT="0"
19 KEYWORDS="amd64 arm ppc ppc64 x86"
20 IUSE="nls X"
21
22 RDEPEND=">=sys-apps/debianutils-1.16
23 >=sys-power/powermgmt-base-1.31
24 X? ( x11-libs/libX11
25 x11-libs/libXaw
26 x11-libs/libXmu
27 x11-libs/libSM
28 x11-libs/libICE
29 x11-libs/libXt
30 x11-libs/libXext )"
31 DEPEND="${RDEPEND}
32 sys-devel/libtool
33 virtual/os-headers"
34
35 S=${WORKDIR}/${PN}-${MY_PV}.orig
36
37 src_prepare() {
38 epatch "${WORKDIR}"/${MY_P}-${PATCHV}.diff
39
40 if ! use X; then
41 sed -i \
42 -e 's:\(EXES=.*\)xapm:\1:' \
43 -e 's:\(.*\)\$(LT_INSTALL).*xapm.*$:\1echo:' \
44 Makefile || die
45 fi
46
47 # use system headers and skip on_ac_power
48 rm -f on_ac_power*
49
50 sed -i \
51 -e '/on_ac_power/d' \
52 -e 's:-I/usr/src/linux/include -I/usr/X11R6/include::' \
53 -e 's:-L/usr/X11R6/lib::' \
54 Makefile || die
55 }
56
57 src_compile() {
58 emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" || die
59 }
60
61 src_install() {
62 dodir /usr/sbin
63 emake DESTDIR="${D}" PREFIX=/usr LIBDIR=/usr/$(get_libdir) install || die
64
65 keepdir /etc/apm/{event.d,suspend.d,resume.d,other.d,scripts.d}
66 exeinto /etc/apm
67 doexe debian/apmd_proxy || die
68 dodoc AUTHORS {,apmsleep.}README debian/{changelog,README.Debian}
69
70 doman *.{1,8} || die
71
72 # note: apmd_proxy.conf is currently disabled and not used, thus
73 # not installed - liquidx (01 Mar 2004)
74
75 newconfd "${FILESDIR}"/apmd.confd apmd || die
76 newinitd "${FILESDIR}"/apmd.rc6 apmd || die
77
78 use nls || rm -rf "${D}"/usr/share/man/fr
79 }

  ViewVC Help
Powered by ViewVC 1.1.20