Magellan Linux

Contents of /branches/magellan-next/core/upower/upower-0.9.14-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9258 - (show annotations) (download)
Thu Nov 24 00:43:21 2011 UTC (12 years, 5 months ago) by niro
File size: 1901 byte(s)
-fixed polit rule install
1 # $Id$
2
3 PNAME="upower"
4 PVER="0.9.14"
5 PBUILD="r2"
6
7 PCATEGORIE="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.4
14 >= dev-libs/dbus-glib-0.92
15 >= sys-fs/udev-171
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-static \
57 --disable-verbose-mode \
58 --enable-man-pages \
59 --enable-introspection \
60 --disable-gtk-doc \
61 --disable-tests \
62 || die
63
64 mmake || die
65 }
66
67 src_install()
68 {
69 cd ${SRCDIR}
70 mmake DESTDIR=${BINDIR} install || die
71
72 # create polkit local authority file to allow users in plugdev group to control power devices
73 minstalldir /var/lib/polkit-1/localauthority/10-vendor.d || die
74 cat > ${BINDIR}/var/lib/polkit-1/localauthority/10-vendor.d/01-org.freedesktop.upower.pkla << EOF
75 [Local users]
76 Identity=unix-group:plugdev
77 Action=org.freedesktop.upower.*
78 ResultAny=yes
79 ResultInactive=no
80 ResultActive=yes
81 EOF
82
83 minstalldocs COPYING ChangeLog NEWS README TODO || die
84 }
85
86 preinstall()
87 {
88 # adds plugdev group
89 ${MLIBDIR}/mgroupadd -o "-g 302" plugdev
90 }