]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without apidocs # build without apidocs | |
4 | %bcond_without consolekit # ConsoleKit fallback | |
5 | %bcond_without systemd # use systemd-login for session tracking (fallback to ConsoleKit on runtime) | |
6 | %bcond_with elogind # use elogind instead of systemd-login | |
7 | ||
8 | %if %{with elogind} | |
9 | %undefine with_systemd | |
10 | %endif | |
11 | Summary: A framework for defining policy for system-wide components | |
12 | Summary(pl.UTF-8): Szkielet do definiowania polityki dla komponentów systemowych | |
13 | Name: polkit | |
14 | Version: 0.119 | |
15 | Release: 2 | |
16 | License: LGPL v2+ | |
17 | Group: Libraries | |
18 | Source0: https://gitlab.freedesktop.org/polkit/polkit/-/archive/%{version}/%{name}-%{version}.tar.bz2 | |
19 | # Source0-md5: 16b0ec658efae724378c7f75233d4120 | |
20 | Patch0: systemd-fallback.patch | |
21 | URL: https://www.freedesktop.org/wiki/Software/polkit | |
22 | BuildRequires: autoconf >= 2.60 | |
23 | BuildRequires: automake >= 1:1.7 | |
24 | BuildRequires: docbook-dtd412-xml | |
25 | BuildRequires: docbook-style-xsl | |
26 | %{?with_elogind:BuildRequires: elogind-devel} | |
27 | BuildRequires: expat-devel >= 1:1.95.8 | |
28 | BuildRequires: gettext-tools | |
29 | BuildRequires: glib2-devel >= 1:2.32.0 | |
30 | %if %(locale -a | grep -q '^C\.utf8$'; echo $?) | |
31 | BuildRequires: glibc-localedb-all | |
32 | %endif | |
33 | BuildRequires: gobject-introspection-devel >= 0.6.2 | |
34 | BuildRequires: gtk-doc >= 1.3 | |
35 | BuildRequires: gtk-doc-automake >= 1.3 | |
36 | BuildRequires: intltool >= 0.40.0 | |
37 | BuildRequires: libstdc++-devel >= 6:7 | |
38 | BuildRequires: libtool >= 2:1.5 | |
39 | BuildRequires: libxslt-progs | |
40 | BuildRequires: mozjs78-devel | |
41 | BuildRequires: pam-devel >= 0.80 | |
42 | BuildRequires: pkgconfig | |
43 | BuildRequires: rpm-build >= 4.6 | |
44 | BuildRequires: rpmbuild(macros) >= 1.647 | |
45 | %{?with_systemd:BuildRequires: systemd-devel} | |
46 | Requires: %{name}-libs = %{version}-%{release} | |
47 | %if %{without systemd} && %{without elogind} | |
48 | Requires: ConsoleKit >= 0.4.1 | |
49 | %endif | |
50 | Requires: dbus >= 1.1.2-5 | |
51 | %if %{with systemd} | |
52 | Requires: systemd-units >= 38 | |
53 | %endif | |
54 | Obsoletes: PolicyKit | |
55 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
56 | ||
57 | %description | |
58 | PolicyKit is a framework for defining policy for system-wide | |
59 | components and for desktop pieces to configure it. | |
60 | ||
61 | %description -l pl.UTF-8 | |
62 | PolicyKit to szkielet do definiowania polityki dla komponentów | |
63 | systemowych oraz składników pulpitu do konfigurowania ich. | |
64 | ||
65 | %package apidocs | |
66 | Summary: PolicyKit API documentation | |
67 | Summary(pl.UTF-8): Dokumentacja API PolicyKit | |
68 | Group: Documentation | |
69 | Requires: gtk-doc-common | |
70 | Obsoletes: PolicyKit-apidocs | |
71 | BuildArch: noarch | |
72 | ||
73 | %description apidocs | |
74 | PolicyKit API documentation. | |
75 | ||
76 | %description apidocs -l pl.UTF-8 | |
77 | Dokumentacja API PolicyKit. | |
78 | ||
79 | %package libs | |
80 | Summary: PolicyKit libraries | |
81 | Summary(pl.UTF-8): Biblioteki PolicyKit | |
82 | Group: Libraries | |
83 | Requires: dbus-libs >= 1.1.2-5 | |
84 | Requires: glib2 >= 1:2.32.0 | |
85 | Requires: gobject-introspection | |
86 | Obsoletes: PolicyKit-libs | |
87 | ||
88 | %description libs | |
89 | PolicyKit libraries. | |
90 | ||
91 | %description libs -l pl.UTF-8 | |
92 | Biblioteki PolicyKit. | |
93 | ||
94 | %package devel | |
95 | Summary: Header files for PolicyKit | |
96 | Summary(pl.UTF-8): Pliki nagłówkowe PolicyKit | |
97 | Group: Development/Libraries | |
98 | Requires: %{name}-libs = %{version}-%{release} | |
99 | Requires: expat-devel >= 1:1.95.8 | |
100 | Requires: glib2-devel >= 1:2.32.0 | |
101 | Obsoletes: PolicyKit-devel | |
102 | ||
103 | %description devel | |
104 | Header files for PolicyKit. | |
105 | ||
106 | %description devel -l pl.UTF-8 | |
107 | Pliki nagłówkowe PolicyKit. | |
108 | ||
109 | %package static | |
110 | Summary: Static PolicyKit libraries | |
111 | Summary(pl.UTF-8): Statyczne biblioteki PolicyKit | |
112 | Group: Development/Libraries | |
113 | Requires: %{name}-devel = %{version}-%{release} | |
114 | Obsoletes: PolicyKit-static | |
115 | ||
116 | %description static | |
117 | Static PolicyKit libraries. | |
118 | ||
119 | %description static -l pl.UTF-8 | |
120 | Statyczne biblioteki PolicyKit. | |
121 | ||
122 | %prep | |
123 | %setup -q | |
124 | %if %{with consolekit} && (%{with systemd} || %{with elogind}) | |
125 | %patch0 -p1 | |
126 | %endif | |
127 | ||
128 | %build | |
129 | %{__gtkdocize} | |
130 | %{__intltoolize} | |
131 | %{__libtoolize} | |
132 | %{__aclocal} | |
133 | %{__autoconf} | |
134 | %{__autoheader} | |
135 | %{__automake} | |
136 | %configure \ | |
137 | %{__enable_disable apidocs gtk-doc} \ | |
138 | --disable-silent-rules \ | |
139 | --disable-test \ | |
140 | %{__enable_disable elogind libelogind} \ | |
141 | %{__enable_disable systemd libsystemd-login} \ | |
142 | --with-html-dir=%{_gtkdocdir} \ | |
143 | --with-pam-include=system-auth \ | |
144 | --with-pam-module-dir=/%{_lib}/security \ | |
145 | --with-polkitd-user=polkitd | |
146 | ||
147 | LC_ALL=C.UTF-8 \ | |
148 | %{__make} -j1 | |
149 | ||
150 | %install | |
151 | rm -rf $RPM_BUILD_ROOT | |
152 | ||
153 | %{__make} install \ | |
154 | DESTDIR=$RPM_BUILD_ROOT | |
155 | ||
156 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la | |
157 | ||
158 | %find_lang polkit-1 | |
159 | ||
160 | %clean | |
161 | rm -rf $RPM_BUILD_ROOT | |
162 | ||
163 | %pre | |
164 | %groupadd -g 283 polkitd | |
165 | %useradd -u 283 -s /bin/false -c "polkitd pseudo user" -g polkitd polkitd | |
166 | %addusertogroup polkitd proc | |
167 | ||
168 | %postun | |
169 | if [ "$1" = "0" ]; then | |
170 | %userremove polkitd | |
171 | %groupremove polkitd | |
172 | fi | |
173 | ||
174 | %{?with_systemd:%systemd_reload} | |
175 | ||
176 | %post libs -p /sbin/ldconfig | |
177 | %postun libs -p /sbin/ldconfig | |
178 | ||
179 | %files -f polkit-1.lang | |
180 | %defattr(644,root,root,755) | |
181 | %doc AUTHORS NEWS README | |
182 | %attr(755,root,root) %{_bindir}/pkaction | |
183 | %attr(755,root,root) %{_bindir}/pkcheck | |
184 | %attr(4755,root,root) %{_bindir}/pkexec | |
185 | %attr(755,root,root) %{_bindir}/pkttyagent | |
186 | %attr(755,root,root) %{_bindir}/pk-example-frobnicate | |
187 | %dir %{_prefix}/lib/polkit-1 | |
188 | %attr(4755,root,root) %{_prefix}/lib/polkit-1/polkit-agent-helper-1 | |
189 | %attr(755,root,root) %{_prefix}/lib/polkit-1/polkitd | |
190 | %dir %{_sysconfdir}/polkit-1 | |
191 | %attr(700,polkitd,root) %dir %{_sysconfdir}/polkit-1/rules.d | |
192 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/polkit-1/rules.d/50-default.rules | |
193 | /etc/pam.d/polkit-1 | |
194 | %dir %{_datadir}/polkit-1 | |
195 | %{_datadir}/polkit-1/actions | |
196 | %attr(700,polkitd,root) %dir %{_datadir}/polkit-1/rules.d | |
197 | %{_datadir}/dbus-1/system-services/org.freedesktop.PolicyKit1.service | |
198 | %{_datadir}/dbus-1/system.d/org.freedesktop.PolicyKit1.conf | |
199 | %{?with_systemd:%{systemdunitdir}/polkit.service} | |
200 | %{_mandir}/man1/pkaction.1* | |
201 | %{_mandir}/man1/pkcheck.1* | |
202 | %{_mandir}/man1/pkexec.1* | |
203 | %{_mandir}/man1/pkttyagent.1* | |
204 | %{_mandir}/man8/polkit.8* | |
205 | %{_mandir}/man8/polkitd.8* | |
206 | ||
207 | %if %{with apidocs} | |
208 | %files apidocs | |
209 | %defattr(644,root,root,755) | |
210 | %{_gtkdocdir}/polkit-1 | |
211 | %endif | |
212 | ||
213 | %files libs | |
214 | %defattr(644,root,root,755) | |
215 | # notes which license applies to which package part, AFL text (and GPL text copy) | |
216 | %doc COPYING | |
217 | %attr(755,root,root) %{_libdir}/libpolkit-agent-1.so.*.*.* | |
218 | %attr(755,root,root) %ghost %{_libdir}/libpolkit-agent-1.so.0 | |
219 | %attr(755,root,root) %{_libdir}/libpolkit-gobject-1.so.*.*.* | |
220 | %attr(755,root,root) %ghost %{_libdir}/libpolkit-gobject-1.so.0 | |
221 | %{_libdir}/girepository-1.0/Polkit-1.0.typelib | |
222 | %{_libdir}/girepository-1.0/PolkitAgent-1.0.typelib | |
223 | ||
224 | %files devel | |
225 | %defattr(644,root,root,755) | |
226 | %attr(755,root,root) %{_libdir}/libpolkit-agent-1.so | |
227 | %attr(755,root,root) %{_libdir}/libpolkit-gobject-1.so | |
228 | %{_includedir}/polkit-1 | |
229 | %{_pkgconfigdir}/polkit-agent-1.pc | |
230 | %{_pkgconfigdir}/polkit-gobject-1.pc | |
231 | %{_datadir}/gir-1.0/Polkit-1.0.gir | |
232 | %{_datadir}/gir-1.0/PolkitAgent-1.0.gir | |
233 | %{_datadir}/gettext/its/polkit.its | |
234 | %{_datadir}/gettext/its/polkit.loc | |
235 | ||
236 | %files static | |
237 | %defattr(644,root,root,755) | |
238 | %{_libdir}/libpolkit-agent-1.a | |
239 | %{_libdir}/libpolkit-gobject-1.a |