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