Magellan Linux

Contents of /trunk/core/upower/upower-0.9.15-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10381 - (show annotations) (download)
Sat Jan 21 13:19:58 2012 UTC (12 years, 4 months ago) by niro
File size: 1874 byte(s)
-import from magellan-next
1 # $Id$
2
3 PNAME="upower"
4 PVER="0.9.15"
5 PBUILD="r2"
6
7 PCAT="sys-apps"
8
9 DESCRIPTION="D-Bus abstraction for enumerating power devices and querying history and statistics."
10 HOMEPAGE="http://upower.freedesktop.org/"
11
12 DEPEND=">= dev-libs/glib2-2.28
13 >= sys-apps/dbus-1.5
14 >= dev-libs/dbus-glib-0.98
15 >= sys-fs/udev-175
16 >= sys-apps/polkit-0.101
17 >= dev-libs/libusb-1
18 >=sys-apps/pm-utils-1.4"
19
20 SDEPEND=">= app-arch/xz-utils-5
21 >= dev-util/pkgconfig-0.25
22 >= dev-util/intltool-0.41
23 >= dev-libs/libxslt-1.1.26
24 >= dev-libs/gobject-introspection-0.10
25 >= app-text/docbook-xsl-stylesheets-1.75"
26
27 SRCFILE="${PNAME}-${PVER}.tar.xz"
28 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
29
30 sminclude mtools mbuild
31
32 SRC_URI=(
33 http://upower.freedesktop.org/releases/${SRCFILE}
34 mirror://${PNAME}/${SRCFILE}
35 )
36
37 UP2DATE="updatecmd_freedesktop ${PNAME} xz"
38
39 src_prepare()
40 {
41 munpack ${SRCFILE} || die
42 cd ${SRCDIR}
43
44 sed -i -e '/DISABLE_DEPRECATED/d' configure || die
45 }
46
47 src_compile()
48 {
49 cd ${SRCDIR}
50
51 mconfigure \
52 --libexecdir=/usr/$(mlibdir)/${PNAME} \
53 --localstatedir=/var \
54 --with-html-dir=/usr/share/doc/${PNAME}-${PVER}/html \
55 --with-backend=linux \
56 --disable-verbose-mode \
57 --enable-man-pages \
58 --enable-introspection \
59 --disable-gtk-doc \
60 --disable-tests \
61 || die
62
63 mmake || die
64 }
65
66 src_install()
67 {
68 cd ${SRCDIR}
69 mmake DESTDIR=${BINDIR} install || die
70
71 # create polkit local authority file to allow users in plugdev group to control power devices
72 minstalldir /var/lib/polkit-1/localauthority/10-vendor.d || die
73 cat > ${BINDIR}/var/lib/polkit-1/localauthority/10-vendor.d/01-org.freedesktop.upower.pkla << EOF
74 [Local users]
75 Identity=unix-group:plugdev
76 Action=org.freedesktop.upower.*
77 ResultAny=yes
78 ResultInactive=no
79 ResultActive=yes
80 EOF
81
82 minstalldocs COPYING ChangeLog NEWS README TODO || die
83 }
84
85 preinstall()
86 {
87 # adds plugdev group
88 ${MLIBDIR}/mgroupadd -o "-g 302" plugdev
89 }