Contents of /trunk/extras/upower/upower-0.9.18-r1.smage2
Parent Directory | Revision Log
Revision 13107 -
(show annotations)
(download)
Tue Aug 21 19:19:16 2012 UTC (11 years, 9 months ago) by niro
File size: 1982 byte(s)
Tue Aug 21 19:19:16 2012 UTC (11 years, 9 months ago) by niro
File size: 1982 byte(s)
auto added: ver bump to 0.9.18-r1
1 | # $Id$ |
2 | |
3 | PNAME="upower" |
4 | PVER="0.9.18" |
5 | PBUILD="r1" |
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.32 |
13 | >= sys-apps/dbus-1.5 |
14 | >= dev-libs/dbus-glib-0.98 |
15 | >= sys-fs/udev-181 |
16 | >= sys-apps/polkit-0.104 |
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.50 |
23 | >= dev-libs/libxslt-1.1.26 |
24 | >= dev-libs/gobject-introspection-1.32 |
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 | # fix udev dir location |
46 | sed -i "s:^\(udevrulesdir =\).*:\1 /usr/lib/udev:" rules/Makefile.{am,in} || die |
47 | } |
48 | |
49 | src_compile() |
50 | { |
51 | cd ${SRCDIR} |
52 | |
53 | mconfigure \ |
54 | --libexecdir=/usr/$(mlibdir)/${PNAME} \ |
55 | --localstatedir=/var \ |
56 | --with-html-dir=/usr/share/doc/${PNAME}-${PVER}/html \ |
57 | --with-backend=linux \ |
58 | --disable-verbose-mode \ |
59 | --enable-man-pages \ |
60 | --enable-introspection \ |
61 | --disable-gtk-doc \ |
62 | --disable-tests \ |
63 | || die |
64 | |
65 | mmake || die |
66 | } |
67 | |
68 | src_install() |
69 | { |
70 | cd ${SRCDIR} |
71 | mmake DESTDIR=${BINDIR} install || die |
72 | |
73 | # create polkit local authority file to allow users in plugdev group to control power devices |
74 | minstalldir /var/lib/polkit-1/localauthority/10-vendor.d || die |
75 | cat > ${BINDIR}/var/lib/polkit-1/localauthority/10-vendor.d/01-org.freedesktop.upower.pkla << EOF |
76 | [Local users] |
77 | Identity=unix-group:plugdev |
78 | Action=org.freedesktop.upower.* |
79 | ResultAny=yes |
80 | ResultInactive=no |
81 | ResultActive=yes |
82 | EOF |
83 | |
84 | minstalldocs COPYING ChangeLog NEWS README TODO || die |
85 | } |
86 | |
87 | preinstall() |
88 | { |
89 | # adds plugdev group |
90 | ${MLIBDIR}/mgroupadd -o "-g 302" plugdev |
91 | } |