Contents of /trunk/core/consolekit/consolekit-0.4.5-r5.smage2
Parent Directory | Revision Log
Revision 11047 -
(show annotations)
(download)
Tue Feb 14 23:13:41 2012 UTC (12 years, 3 months ago) by niro
File size: 3326 byte(s)
Tue Feb 14 23:13:41 2012 UTC (12 years, 3 months ago) by niro
File size: 3326 byte(s)
-fixed missing directories
1 | # $Id$ |
2 | |
3 | PNAME="consolekit" |
4 | PVER="0.4.5" |
5 | PBUILD="r5" |
6 | |
7 | PCAT="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.5 |
14 | >= dev-libs/dbus-glib-0.98 |
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 /usr/$(mlibdir)/ConsoleKit/run-seat.d || die |
86 | mkeepdir /etcConsoleKit/run-seat.d || die |
87 | mkeepdir /var/run/ConsoleKit || die |
88 | mkeepdir /var/log/ConsoleKit || die |
89 | |
90 | # pam compat |
91 | minstalldir /usr/$(mlibdir)/ConsoleKit/run-session.d || die |
92 | minstallexec -s pam-foreground-compat.ck /usr/$(mlibdir)/ConsoleKit/run-session.d || die |
93 | |
94 | # create polkit local authority file to allow users in plugdev group to reboot the computer |
95 | minstalldir /var/lib/polkit-1/localauthority/10-vendor.d || die |
96 | cat > ${BINDIR}/var/lib/polkit-1/localauthority/10-vendor.d/01-org.freedesktop.consolekit.pkla << EOF |
97 | [Local restart] |
98 | Identity=unix-group:plugdev |
99 | Action=org.freedesktop.consolekit.system.restart |
100 | ResultAny=yes |
101 | ResultInactive=no |
102 | ResultActive=yes |
103 | |
104 | [Local shutdown] |
105 | Identity=unix-group:plugdev |
106 | Action=org.freedesktop.consolekit.system.stop |
107 | ResultAny=yes |
108 | ResultInactive=no |
109 | ResultActive=yes |
110 | |
111 | [Local restart - multiple] |
112 | Identity=unix-group:plugdev |
113 | Action=org.freedesktop.consolekit.system.restart-multiple-users |
114 | ResultAny=yes |
115 | ResultInactive=no |
116 | ResultActive=yes |
117 | |
118 | [Local shutdown - multiple] |
119 | Identity=unix-group:plugdev |
120 | Action=org.freedesktop.consolekit.system.stop-multiple-users |
121 | ResultAny=yes |
122 | ResultInactive=no |
123 | ResultActive=yes |
124 | EOF |
125 | |
126 | # docs |
127 | minstalldocs AUTHORS COPYING ChangeLog HACKING NEWS README || die |
128 | } |
129 | |
130 | preinstall() |
131 | { |
132 | # adds plugdev group |
133 | ${MLIBDIR}/mgroupadd -o "-g 302" plugdev |
134 | } |
135 | |
136 | postinstall() |
137 | { |
138 | mstartunit console-kit-daemon.service |
139 | } |
140 | |
141 | postremove() |
142 | { |
143 | mstopunit console-kit-daemon.service |
144 | } |