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