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