Magellan Linux

Contents of /branches/magellan-next/core/consolekit/consolekit-0.4.5-r4.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9412 - (show annotations) (download)
Tue Nov 29 01:09:12 2011 UTC (12 years, 5 months ago) by niro
File size: 3234 byte(s)
-fixed
1 # $Id$
2
3 PNAME="consolekit"
4 PVER="0.4.5"
5 PBUILD="r4"
6
7 PCATEGORIE="sys-apps"
8
9 DESCRIPTION="ConsoleKit is a framework for defining and tracking users, login sessions, and seats."
10 HOMEPAGE="http://www.freedesktop.org/wiki/Software/ConsoleKit"
11
12 DEPEND=">= dev-libs/glib2-2.28
13 >= sys-apps/dbus-1.4
14 >= dev-libs/dbus-glib-0.92
15 >= sys-libs/pam-1.1
16 >= x11-libs/libX11-1.4
17 >= sys-libs/zlib-1.2.5
18 >= sys-apps/polkit-0.101"
19
20 SDEPEND=">= dev-util/pkgconfig-0.25
21 >= dev-libs/libxslt-1.1.26"
22
23 SRCFILE="ConsoleKit-${PVER}.tar.bz2"
24 SRCDIR="${BUILDDIR}/ConsoleKit-${PVER}"
25
26 sminclude mtools
27
28 SRC_URI=(
29 http://www.freedesktop.org/software/ConsoleKit/dist/${SRCFILE}
30 mirror://${PNAME}/${SRCFILE}
31 mirror://${PNAME}/pam-foreground-compat.ck
32 mirror://${PNAME}/${PNAME}-0.4.1-cleanup-console-tags.patch
33 mirror://${PNAME}/${PNAME}-0.4.1-multilib.patch
34 )
35
36 UP2TARBALL="${PNAME}-[0-9]"
37 UP2DATE="updatecmd_freedesktop ${PNAME}"
38
39 src_prepare()
40 {
41 munpack ${SRCFILE} || die
42 cd ${SRCDIR}
43
44 # clean up at_console compat files (until dbus gets fixed)
45 mpatch ${PNAME}-0.4.1-cleanup-console-tags.patch || die
46
47 # fix multilib support
48 mpatch ${PNAME}-0.4.1-multilib.patch || die
49
50 mautoreconf || die
51 }
52
53 src_compile()
54 {
55 cd ${SRCDIR}
56
57 mconfigure \
58 --localstatedir=/var \
59 --libexecdir=/usr/$(mlibdir)/ConsoleKit \
60 --with-dbus-services=/usr/share/dbus-1/services/ \
61 --disable-debug \
62 --disable-docbook-docs \
63 --enable-pam-module \
64 --with-pam-module-dir=/$(mlibdir)/security \
65 XMLTO_FLAGS="--skip-validation" \
66 || die
67
68 mmake || die
69 }
70
71 src_install()
72 {
73 cd ${SRCDIR}
74 mmake DESTDIR=${BINDIR} install || die
75
76 # remove included init scripts
77 if [[ -d ${BINDIR}/etc/rc.d ]]
78 then
79 rm -r ${BINDIR}/etc/rc.d || die
80 fi
81
82 # needed directories
83 mkeepdir /usr/$(mlibdir)/ConsoleKit/run-session.d || die
84 mkeepdir /etc/ConsoleKit/run-session.d || die
85 mkeepdir /var/run/ConsoleKit || die
86 mkeepdir /var/log/ConsoleKit || die
87
88 # pam compat
89 minstalldir /usr/$(mlibdir)/ConsoleKit/run-session.d || die
90 minstallexec -s pam-foreground-compat.ck /usr/$(mlibdir)/ConsoleKit/run-session.d || die
91
92 # create polkit local authority file to allow users in plugdev group to reboot the computer
93 minstalldir /var/lib/polkit-1/localauthority/10-vendor.d || die
94 cat > ${BINDIR}/var/lib/polkit-1/localauthority/10-vendor.d/01-org.freedesktop.consolekit.pkla << EOF
95 [Local restart]
96 Identity=unix-group:plugdev
97 Action=org.freedesktop.consolekit.system.restart
98 ResultAny=yes
99 ResultInactive=no
100 ResultActive=yes
101
102 [Local shutdown]
103 Identity=unix-group:plugdev
104 Action=org.freedesktop.consolekit.system.stop
105 ResultAny=yes
106 ResultInactive=no
107 ResultActive=yes
108
109 [Local restart - multiple]
110 Identity=unix-group:plugdev
111 Action=org.freedesktop.consolekit.system.restart-multiple-users
112 ResultAny=yes
113 ResultInactive=no
114 ResultActive=yes
115
116 [Local shutdown - multiple]
117 Identity=unix-group:plugdev
118 Action=org.freedesktop.consolekit.system.stop-multiple-users
119 ResultAny=yes
120 ResultInactive=no
121 ResultActive=yes
122 EOF
123
124 # docs
125 minstalldocs AUTHORS COPYING ChangeLog HACKING NEWS README || die
126 }
127
128 preinstall()
129 {
130 # adds plugdev group
131 ${MLIBDIR}/mgroupadd -o "-g 302" plugdev
132 }
133
134 postinstall()
135 {
136 mstartunit console-kit-daemon.service
137 }
138
139 postremove()
140 {
141 mstopunit console-kit-daemon.service
142 }