]>
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 | |
15c70c7c | 14 | Version: 0.119 |
c40d6575 | 15 | Release: 2 |
a5863912 PZ |
16 | License: LGPL v2+ |
17 | Group: Libraries | |
c40d6575 JP |
18 | Source0: https://gitlab.freedesktop.org/polkit/polkit/-/archive/%{version}/%{name}-%{version}.tar.bz2 |
19 | # Source0-md5: 16b0ec658efae724378c7f75233d4120 | |
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 |
23808af3 | 34 | BuildRequires: gtk-doc >= 1.3 |
9ff6e803 | 35 | BuildRequires: gtk-doc-automake >= 1.3 |
df23ce59 | 36 | BuildRequires: intltool >= 0.40.0 |
e8eebe78 | 37 | BuildRequires: libstdc++-devel >= 6:7 |
c5786473 | 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 | |
e8eebe78 | 43 | BuildRequires: rpm-build >= 4.6 |
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 | 71 | BuildArch: noarch |
a5863912 PZ |
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 | |
df23ce59 | 83 | Requires: dbus-libs >= 1.1.2-5 |
835d1e5a | 84 | Requires: glib2 >= 1:2.32.0 |
368d6c5e | 85 | Requires: gobject-introspection |
f3084979 | 86 | Obsoletes: PolicyKit-libs |
a5863912 PZ |
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 | |
835d1e5a | 100 | Requires: glib2-devel >= 1:2.32.0 |
f3084979 | 101 | Obsoletes: PolicyKit-devel |
a5863912 PZ |
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} | |
f3084979 | 114 | Obsoletes: PolicyKit-static |
a5863912 PZ |
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 | |
c5786473 JB |
124 | %if %{with consolekit} && (%{with systemd} || %{with elogind}) |
125 | %patch0 -p1 | |
126 | %endif | |
a5863912 PZ |
127 | |
128 | %build | |
23808af3 | 129 | %{__gtkdocize} |
df23ce59 | 130 | %{__intltoolize} |
a5863912 PZ |
131 | %{__libtoolize} |
132 | %{__aclocal} | |
133 | %{__autoconf} | |
134 | %{__autoheader} | |
135 | %{__automake} | |
136 | %configure \ | |
3310eb44 | 137 | %{__enable_disable apidocs gtk-doc} \ |
a91c2820 | 138 | --disable-silent-rules \ |
c40d6575 | 139 | --disable-test \ |
c5786473 | 140 | %{__enable_disable elogind libelogind} \ |
3bdd10dd | 141 | %{__enable_disable systemd libsystemd-login} \ |
a5863912 PZ |
142 | --with-html-dir=%{_gtkdocdir} \ |
143 | --with-pam-include=system-auth \ | |
a7e49982 MB |
144 | --with-pam-module-dir=/%{_lib}/security \ |
145 | --with-polkitd-user=polkitd | |
1b9b199a | 146 | |
c5786473 | 147 | LC_ALL=C.UTF-8 \ |
1b9b199a | 148 | %{__make} -j1 |
a5863912 PZ |
149 | |
150 | %install | |
151 | rm -rf $RPM_BUILD_ROOT | |
152 | ||
153 | %{__make} install \ | |
154 | DESTDIR=$RPM_BUILD_ROOT | |
155 | ||
5498e51a | 156 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la |
a5863912 PZ |
157 | |
158 | %find_lang polkit-1 | |
159 | ||
160 | %clean | |
161 | rm -rf $RPM_BUILD_ROOT | |
162 | ||
a7e49982 MB |
163 | %pre |
164 | %groupadd -g 283 polkitd | |
165 | %useradd -u 283 -s /bin/false -c "polkitd pseudo user" -g polkitd polkitd | |
c88a6447 | 166 | %addusertogroup polkitd proc |
a7e49982 | 167 | |
a7e49982 MB |
168 | %postun |
169 | if [ "$1" = "0" ]; then | |
170 | %userremove polkitd | |
171 | %groupremove polkitd | |
172 | fi | |
173 | ||
174 | %{?with_systemd:%systemd_reload} | |
175 | ||
a5863912 PZ |
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) | |
9ff6e803 | 181 | %doc AUTHORS NEWS README |
a5863912 PZ |
182 | %attr(755,root,root) %{_bindir}/pkaction |
183 | %attr(755,root,root) %{_bindir}/pkcheck | |
184 | %attr(4755,root,root) %{_bindir}/pkexec | |
a7e49982 | 185 | %attr(755,root,root) %{_bindir}/pkttyagent |
5498e51a | 186 | %attr(755,root,root) %{_bindir}/pk-example-frobnicate |
a7e49982 MB |
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 | |
a5863912 | 190 | %dir %{_sysconfdir}/polkit-1 |
a7e49982 MB |
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 | |
a5863912 | 193 | /etc/pam.d/polkit-1 |
a7e49982 MB |
194 | %dir %{_datadir}/polkit-1 |
195 | %{_datadir}/polkit-1/actions | |
196 | %attr(700,polkitd,root) %dir %{_datadir}/polkit-1/rules.d | |
a5863912 | 197 | %{_datadir}/dbus-1/system-services/org.freedesktop.PolicyKit1.service |
15c70c7c | 198 | %{_datadir}/dbus-1/system.d/org.freedesktop.PolicyKit1.conf |
a7e49982 | 199 | %{?with_systemd:%{systemdunitdir}/polkit.service} |
a5863912 PZ |
200 | %{_mandir}/man1/pkaction.1* |
201 | %{_mandir}/man1/pkcheck.1* | |
202 | %{_mandir}/man1/pkexec.1* | |
a7e49982 | 203 | %{_mandir}/man1/pkttyagent.1* |
0c630415 PZ |
204 | %{_mandir}/man8/polkit.8* |
205 | %{_mandir}/man8/polkitd.8* | |
a5863912 | 206 | |
14eed758 | 207 | %if %{with apidocs} |
a5863912 PZ |
208 | %files apidocs |
209 | %defattr(644,root,root,755) | |
210 | %{_gtkdocdir}/polkit-1 | |
14eed758 | 211 | %endif |
a5863912 PZ |
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 | |
a5863912 PZ |
219 | %attr(755,root,root) %{_libdir}/libpolkit-gobject-1.so.*.*.* |
220 | %attr(755,root,root) %ghost %{_libdir}/libpolkit-gobject-1.so.0 | |
a91c2820 | 221 | %{_libdir}/girepository-1.0/Polkit-1.0.typelib |
a36db55f | 222 | %{_libdir}/girepository-1.0/PolkitAgent-1.0.typelib |
a5863912 PZ |
223 | |
224 | %files devel | |
225 | %defattr(644,root,root,755) | |
a5863912 | 226 | %attr(755,root,root) %{_libdir}/libpolkit-agent-1.so |
a5863912 | 227 | %attr(755,root,root) %{_libdir}/libpolkit-gobject-1.so |
a5863912 PZ |
228 | %{_includedir}/polkit-1 |
229 | %{_pkgconfigdir}/polkit-agent-1.pc | |
a5863912 | 230 | %{_pkgconfigdir}/polkit-gobject-1.pc |
a91c2820 | 231 | %{_datadir}/gir-1.0/Polkit-1.0.gir |
a36db55f | 232 | %{_datadir}/gir-1.0/PolkitAgent-1.0.gir |
9dc7cbe6 MB |
233 | %{_datadir}/gettext/its/polkit.its |
234 | %{_datadir}/gettext/its/polkit.loc | |
a5863912 PZ |
235 | |
236 | %files static | |
237 | %defattr(644,root,root,755) | |
238 | %{_libdir}/libpolkit-agent-1.a | |
a5863912 | 239 | %{_libdir}/libpolkit-gobject-1.a |