]>
Commit | Line | Data |
---|---|---|
1 | # TODO: package bash-completion in proper way | |
2 | Summary: A framework for defining policy for system-wide components | |
3 | Summary(pl.UTF-8): Szkielet do definiowania polityki dla komponentów systemowych | |
4 | Name: PolicyKit | |
5 | Version: 0.8 | |
6 | Release: 1 | |
7 | License: MIT | |
8 | Group: Libraries | |
9 | Source0: http://hal.freedesktop.org/releases/%{name}-%{version}.tar.gz | |
10 | # Source0-md5: 5c1a4445dbd5cb853132766c5d0ab336 | |
11 | URL: http://people.freedesktop.org/~david/polkit-spec.html | |
12 | BuildRequires: autoconf >= 2.60 | |
13 | BuildRequires: automake >= 1:1.7 | |
14 | BuildRequires: dbus-devel >= 1.0 | |
15 | BuildRequires: dbus-glib-devel >= 0.73 | |
16 | BuildRequires: expat-devel >= 1:1.95.8 | |
17 | BuildRequires: glib2-devel >= 1:2.6.0 | |
18 | BuildRequires: gtk-doc >= 1.3 | |
19 | BuildRequires: libselinux-devel >= 1.30 | |
20 | BuildRequires: libtool | |
21 | BuildRequires: pam-devel >= 0.80 | |
22 | BuildRequires: pkgconfig | |
23 | BuildRequires: rpmbuild(macros) >= 1.268 | |
24 | BuildRequires: xmlto | |
25 | Requires(postun): /usr/sbin/groupdel | |
26 | Requires(postun): /usr/sbin/userdel | |
27 | Requires(pre): /bin/id | |
28 | Requires(pre): /usr/bin/getgid | |
29 | Requires(pre): /usr/lib/rpm/user_group.sh | |
30 | Requires(pre): /usr/sbin/groupadd | |
31 | Requires(pre): /usr/sbin/useradd | |
32 | Requires(pre): /usr/sbin/usermod | |
33 | Requires(triggerpostun): /sbin/chkconfig | |
34 | Requires: %{name}-libs = %{version}-%{release} | |
35 | Requires: ConsoleKit >= 0.2.1 | |
36 | Requires: dbus >= 1.1.2-5 | |
37 | Provides: group(polkituser) | |
38 | Provides: user(polkituser) | |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
40 | ||
41 | %define _libexecdir %{_libdir}/%{name} | |
42 | ||
43 | %description | |
44 | PolicyKit is a framework for defining policy for system-wide | |
45 | components and for desktop pieces to configure it. It is used by HAL. | |
46 | ||
47 | %description -l pl.UTF-8 | |
48 | PolicyKit to szkielet do definiowania polityki dla komponentów | |
49 | systemowych oraz składników pulpitu do konfigurowania ich. Jest | |
50 | używany przez HAL-a. | |
51 | ||
52 | %package apidocs | |
53 | Summary: PolicyKit API documentation | |
54 | Summary(pl.UTF-8): Dokumentacja API PolicyKit | |
55 | Group: Documentation | |
56 | Requires: gtk-doc-common | |
57 | ||
58 | %description apidocs | |
59 | PolicyKit API documentation. | |
60 | ||
61 | %description apidocs -l pl.UTF-8 | |
62 | Dokumentacja API PolicyKit. | |
63 | ||
64 | %package libs | |
65 | Summary: PolicyKit libraries | |
66 | Summary(pl.UTF-8): Biblioteki PolicyKit | |
67 | Group: Libraries | |
68 | Requires: dbus-libs >= 1.0 | |
69 | Requires: glib2 >= 1:2.6.0 | |
70 | Conflicts: PolicyKit < 0.1-0.20061203.6 | |
71 | ||
72 | %description libs | |
73 | PolicyKit libraries. | |
74 | ||
75 | %description libs -l pl.UTF-8 | |
76 | Biblioteki PolicyKit. | |
77 | ||
78 | %package devel | |
79 | Summary: Header files for PolicyKit | |
80 | Summary(pl.UTF-8): Pliki nagłówkowe PolicyKit | |
81 | Group: Development/Libraries | |
82 | Requires: %{name}-libs = %{version}-%{release} | |
83 | Requires: expat-devel >= 1:1.95.8 | |
84 | # polkit-grant | |
85 | #Requires: glib2-devel >= 1:2.6.0 | |
86 | # polkit-dbus and polkit-grant | |
87 | #Requires: dbus-devel >= 1.0 | |
88 | # polkit-dbus | |
89 | #Requires: libselinux-devel >= 1.30 | |
90 | ||
91 | %description devel | |
92 | Header files for PolicyKit. | |
93 | ||
94 | %description devel -l pl.UTF-8 | |
95 | Pliki nagłówkowe PolicyKit. | |
96 | ||
97 | %package static | |
98 | Summary: Static PolicyKit libraries | |
99 | Summary(pl.UTF-8): Statyczne biblioteki PolicyKit | |
100 | Group: Development/Libraries | |
101 | Requires: %{name}-devel = %{version}-%{release} | |
102 | ||
103 | %description static | |
104 | Static PolicyKit libraries. | |
105 | ||
106 | %description static -l pl.UTF-8 | |
107 | Statyczne biblioteki PolicyKit. | |
108 | ||
109 | %prep | |
110 | %setup -q | |
111 | ||
112 | %build | |
113 | %{__libtoolize} | |
114 | %{__aclocal} | |
115 | %{__autoconf} | |
116 | %{__autoheader} | |
117 | %{__automake} | |
118 | %configure \ | |
119 | --with-html-dir=%{_gtkdocdir} \ | |
120 | --with-pam-include=system-auth \ | |
121 | --with-pam-module-dir=/%{_lib}/security | |
122 | %{__make} | |
123 | ||
124 | %install | |
125 | rm -rf $RPM_BUILD_ROOT | |
126 | ||
127 | %{__make} install \ | |
128 | DESTDIR=$RPM_BUILD_ROOT | |
129 | ||
130 | rm -f $RPM_BUILD_ROOT%{_libdir}/PolicyKit/modules/*.{la,a} | |
131 | ||
132 | %clean | |
133 | rm -rf $RPM_BUILD_ROOT | |
134 | ||
135 | %triggerun -- PolicyKit < 0.3 | |
136 | %service -q PolicyKit stop | |
137 | /sbin/chkconfig --del PolicyKit | |
138 | ||
139 | %pre | |
140 | %groupadd -g 220 polkituser | |
141 | %useradd -u 220 -d %{_datadir}/empty -c "PolicyKit User" -g polkituser polkituser | |
142 | ||
143 | %post | |
144 | umask 022 | |
145 | touch /var/lib/misc/PolicyKit.reload | |
146 | chown polkituser:polkituser /var/lib/misc/PolicyKit.reload | |
147 | chmod 775 /var/lib/misc/PolicyKit.reload | |
148 | ||
149 | %postun | |
150 | if [ "$1" = "0" ]; then | |
151 | %userremove polkituser | |
152 | %groupremove polkituser | |
153 | fi | |
154 | ||
155 | %post libs -p /sbin/ldconfig | |
156 | %postun libs -p /sbin/ldconfig | |
157 | ||
158 | %files | |
159 | %defattr(644,root,root,755) | |
160 | %doc AUTHORS README doc/TODO | |
161 | %attr(755,root,root) %{_bindir}/polkit-action | |
162 | %attr(755,root,root) %{_bindir}/polkit-auth | |
163 | %attr(755,root,root) %{_bindir}/polkit-config-file-validate | |
164 | %attr(755,root,root) %{_bindir}/polkit-policy-file-validate | |
165 | %dir %{_libexecdir} | |
166 | %attr(2755,root,polkituser) %{_libexecdir}/polkit-explicit-grant-helper | |
167 | %attr(2755,root,polkituser) %{_libexecdir}/polkit-grant-helper | |
168 | %attr(4754,root,polkituser) %{_libexecdir}/polkit-grant-helper-pam | |
169 | %attr(2755,root,polkituser) %{_libexecdir}/polkit-read-auth-helper | |
170 | %attr(4755,root,polkituser) %{_libexecdir}/polkit-resolve-exe-helper | |
171 | %attr(2755,root,polkituser) %{_libexecdir}/polkit-revoke-helper | |
172 | %attr(4755,polkituser,root) %{_libexecdir}/polkit-set-default-helper | |
173 | %attr(755,root,root) %{_libexecdir}/polkitd | |
174 | %dir %{_sysconfdir}/PolicyKit | |
175 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/PolicyKit/PolicyKit.conf | |
176 | /etc/dbus-1/system.d/org.freedesktop.PolicyKit.conf | |
177 | /etc/pam.d/polkit | |
178 | %{_datadir}/PolicyKit | |
179 | %{_datadir}/dbus-1/interfaces/org.freedesktop.PolicyKit.AuthenticationAgent.xml | |
180 | %{_datadir}/dbus-1/system-services/org.freedesktop.PolicyKit.service | |
181 | %attr(775,polkituser,polkituser) %ghost /var/lib/misc/PolicyKit.reload | |
182 | %attr(770,root,polkituser) /var/lib/PolicyKit | |
183 | %attr(755,polkituser,root) /var/lib/PolicyKit-public | |
184 | %attr(770,root,polkituser) /var/run/PolicyKit | |
185 | %{_mandir}/man1/polkit-action.1* | |
186 | %{_mandir}/man1/polkit-auth.1* | |
187 | %{_mandir}/man1/polkit-config-file-validate.1* | |
188 | %{_mandir}/man1/polkit-policy-file-validate.1* | |
189 | %{_mandir}/man5/PolicyKit.conf.5* | |
190 | %{_mandir}/man8/PolicyKit.8* | |
191 | ||
192 | %files apidocs | |
193 | %defattr(644,root,root,755) | |
194 | %{_gtkdocdir}/polkit | |
195 | ||
196 | %files libs | |
197 | %defattr(644,root,root,755) | |
198 | # notes which license applies to which package part, AFL text (and GPL text copy) | |
199 | %doc COPYING | |
200 | %attr(755,root,root) %{_libdir}/libpolkit.so.*.*.* | |
201 | %attr(755,root,root) %ghost %{_libdir}/libpolkit.so.2 | |
202 | %attr(755,root,root) %{_libdir}/libpolkit-dbus.so.*.*.* | |
203 | %attr(755,root,root) %ghost %{_libdir}/libpolkit-dbus.so.2 | |
204 | %attr(755,root,root) %{_libdir}/libpolkit-grant.so.*.*.* | |
205 | %attr(755,root,root) %ghost %{_libdir}/libpolkit-grant.so.2 | |
206 | ||
207 | %files devel | |
208 | %defattr(644,root,root,755) | |
209 | %attr(755,root,root) %{_libdir}/libpolkit.so | |
210 | %attr(755,root,root) %{_libdir}/libpolkit-dbus.so | |
211 | %attr(755,root,root) %{_libdir}/libpolkit-grant.so | |
212 | %{_libdir}/libpolkit.la | |
213 | %{_libdir}/libpolkit-dbus.la | |
214 | %{_libdir}/libpolkit-grant.la | |
215 | %{_includedir}/PolicyKit | |
216 | %{_pkgconfigdir}/polkit.pc | |
217 | %{_pkgconfigdir}/polkit-dbus.pc | |
218 | %{_pkgconfigdir}/polkit-grant.pc | |
219 | ||
220 | %files static | |
221 | %defattr(644,root,root,755) | |
222 | %{_libdir}/libpolkit.a | |
223 | %{_libdir}/libpolkit-dbus.a | |
224 | %{_libdir}/libpolkit-grant.a |