]>
Commit | Line | Data |
---|---|---|
a91c2820 | 1 | # |
14eed758 | 2 | # Conditional build: |
a313ddd3 | 3 | %bcond_without apidocs # build without apidocs |
186114f9 | 4 | %bcond_without systemd # use systemd for session tracking instead of ConsoleKit (fallback to ConsoleKit on runtime) |
835d1e5a | 5 | |
a5863912 PZ |
6 | Summary: A framework for defining policy for system-wide components |
7 | Summary(pl.UTF-8): Szkielet do definiowania polityki dla komponentów systemowych | |
8 | Name: polkit | |
357271f2 | 9 | Version: 0.110 |
e0b45bcb | 10 | Release: 2 |
a5863912 PZ |
11 | License: LGPL v2+ |
12 | Group: Libraries | |
a7e49982 | 13 | Source0: http://www.freedesktop.org/software/polkit/releases/%{name}-%{version}.tar.gz |
357271f2 | 14 | # Source0-md5: 06e0d3b72e566ac277fc35c8206d2a28 |
186114f9 | 15 | Patch0: systemd-fallback.patch |
357271f2 | 16 | Patch1: %{name}-am.patch |
a7e49982 | 17 | URL: http://www.freedesktop.org/wiki/Software/polkit |
a5863912 PZ |
18 | BuildRequires: autoconf >= 2.60 |
19 | BuildRequires: automake >= 1:1.7 | |
1528e92c | 20 | BuildRequires: docbook-dtd412-xml |
3310eb44 | 21 | BuildRequires: docbook-style-xsl |
a5863912 | 22 | BuildRequires: expat-devel >= 1:1.95.8 |
df23ce59 | 23 | BuildRequires: gettext-devel |
835d1e5a | 24 | BuildRequires: glib2-devel >= 1:2.32.0 |
1528e92c | 25 | BuildRequires: glibc-misc |
e3a98c17 | 26 | BuildRequires: gobject-introspection-devel >= 0.6.2 |
14eed758 | 27 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.3} |
9ff6e803 | 28 | BuildRequires: gtk-doc-automake >= 1.3 |
df23ce59 | 29 | BuildRequires: intltool >= 0.40.0 |
a7e49982 | 30 | BuildRequires: js185-devel |
a5863912 | 31 | BuildRequires: libtool |
3310eb44 | 32 | BuildRequires: libxslt-progs |
a5863912 PZ |
33 | BuildRequires: pam-devel >= 0.80 |
34 | BuildRequires: pkgconfig | |
1528e92c | 35 | BuildRequires: python-modules |
a7e49982 | 36 | BuildRequires: rpmbuild(macros) >= 1.647 |
a313ddd3 | 37 | %{?with_systemd:BuildRequires: systemd-devel} |
a5863912 | 38 | Requires: %{name}-libs = %{version}-%{release} |
a7e49982 | 39 | %if %{without systemd} |
186114f9 | 40 | Requires: ConsoleKit >= 0.4.1 |
a7e49982 MB |
41 | %else |
42 | Requires: systemd-units >= 38 | |
43 | Suggests: ConsoleKit >= 0.4.1 | |
44 | %endif | |
a5863912 | 45 | Requires: dbus >= 1.1.2-5 |
f3084979 | 46 | Obsoletes: PolicyKit |
a5863912 PZ |
47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
48 | ||
49 | %description | |
50 | PolicyKit is a framework for defining policy for system-wide | |
a313ddd3 | 51 | components and for desktop pieces to configure it. |
a5863912 PZ |
52 | |
53 | %description -l pl.UTF-8 | |
54 | PolicyKit to szkielet do definiowania polityki dla komponentów | |
a313ddd3 | 55 | systemowych oraz składników pulpitu do konfigurowania ich. |
a5863912 PZ |
56 | |
57 | %package apidocs | |
58 | Summary: PolicyKit API documentation | |
59 | Summary(pl.UTF-8): Dokumentacja API PolicyKit | |
60 | Group: Documentation | |
61 | Requires: gtk-doc-common | |
f3084979 | 62 | Obsoletes: PolicyKit-apidocs |
a5863912 PZ |
63 | |
64 | %description apidocs | |
65 | PolicyKit API documentation. | |
66 | ||
67 | %description apidocs -l pl.UTF-8 | |
68 | Dokumentacja API PolicyKit. | |
69 | ||
70 | %package libs | |
71 | Summary: PolicyKit libraries | |
72 | Summary(pl.UTF-8): Biblioteki PolicyKit | |
73 | Group: Libraries | |
df23ce59 | 74 | Requires: dbus-libs >= 1.1.2-5 |
835d1e5a | 75 | Requires: glib2 >= 1:2.32.0 |
f3084979 | 76 | Obsoletes: PolicyKit-libs |
a5863912 PZ |
77 | |
78 | %description libs | |
79 | PolicyKit libraries. | |
80 | ||
81 | %description libs -l pl.UTF-8 | |
82 | Biblioteki PolicyKit. | |
83 | ||
84 | %package devel | |
85 | Summary: Header files for PolicyKit | |
86 | Summary(pl.UTF-8): Pliki nagłówkowe PolicyKit | |
87 | Group: Development/Libraries | |
88 | Requires: %{name}-libs = %{version}-%{release} | |
89 | Requires: expat-devel >= 1:1.95.8 | |
835d1e5a | 90 | Requires: glib2-devel >= 1:2.32.0 |
f3084979 | 91 | Obsoletes: PolicyKit-devel |
a5863912 PZ |
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} | |
f3084979 | 104 | Obsoletes: PolicyKit-static |
a5863912 PZ |
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 | |
186114f9 | 114 | %{?with_systemd:%patch0 -p1} |
357271f2 | 115 | %patch1 -p1 |
a5863912 PZ |
116 | |
117 | %build | |
3310eb44 | 118 | %{?with_apidocs:%{__gtkdocize}} |
df23ce59 | 119 | %{__intltoolize} |
a5863912 PZ |
120 | %{__libtoolize} |
121 | %{__aclocal} | |
122 | %{__autoconf} | |
123 | %{__autoheader} | |
124 | %{__automake} | |
125 | %configure \ | |
3310eb44 | 126 | %{__enable_disable apidocs gtk-doc} \ |
a91c2820 | 127 | --disable-silent-rules \ |
186114f9 | 128 | %{__enable_disable systemd systemd} \ |
a5863912 PZ |
129 | --with-html-dir=%{_gtkdocdir} \ |
130 | --with-pam-include=system-auth \ | |
a7e49982 MB |
131 | --with-pam-module-dir=/%{_lib}/security \ |
132 | --with-polkitd-user=polkitd | |
1b9b199a JR |
133 | |
134 | %{__make} -j1 | |
a5863912 PZ |
135 | |
136 | %install | |
137 | rm -rf $RPM_BUILD_ROOT | |
138 | ||
139 | %{__make} install \ | |
140 | DESTDIR=$RPM_BUILD_ROOT | |
141 | ||
5498e51a | 142 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la |
a5863912 PZ |
143 | |
144 | %find_lang polkit-1 | |
145 | ||
146 | %clean | |
147 | rm -rf $RPM_BUILD_ROOT | |
148 | ||
a7e49982 MB |
149 | %pre |
150 | %groupadd -g 283 polkitd | |
151 | %useradd -u 283 -s /bin/false -c "polkitd pseudo user" -g polkitd polkitd | |
152 | ||
a7e49982 MB |
153 | %postun |
154 | if [ "$1" = "0" ]; then | |
155 | %userremove polkitd | |
156 | %groupremove polkitd | |
157 | fi | |
158 | ||
159 | %{?with_systemd:%systemd_reload} | |
160 | ||
a5863912 PZ |
161 | %post libs -p /sbin/ldconfig |
162 | %postun libs -p /sbin/ldconfig | |
163 | ||
164 | %files -f polkit-1.lang | |
165 | %defattr(644,root,root,755) | |
9ff6e803 | 166 | %doc AUTHORS NEWS README |
a5863912 PZ |
167 | %attr(755,root,root) %{_bindir}/pkaction |
168 | %attr(755,root,root) %{_bindir}/pkcheck | |
169 | %attr(4755,root,root) %{_bindir}/pkexec | |
a7e49982 | 170 | %attr(755,root,root) %{_bindir}/pkttyagent |
5498e51a | 171 | %attr(755,root,root) %{_bindir}/pk-example-frobnicate |
a7e49982 MB |
172 | %dir %{_prefix}/lib/polkit-1 |
173 | %attr(4755,root,root) %{_prefix}/lib/polkit-1/polkit-agent-helper-1 | |
174 | %attr(755,root,root) %{_prefix}/lib/polkit-1/polkitd | |
a5863912 | 175 | %dir %{_sysconfdir}/polkit-1 |
a7e49982 MB |
176 | %attr(700,polkitd,root) %dir %{_sysconfdir}/polkit-1/rules.d |
177 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/polkit-1/rules.d/50-default.rules | |
a5863912 PZ |
178 | /etc/dbus-1/system.d/org.freedesktop.PolicyKit1.conf |
179 | /etc/pam.d/polkit-1 | |
a7e49982 MB |
180 | %dir %{_datadir}/polkit-1 |
181 | %{_datadir}/polkit-1/actions | |
182 | %attr(700,polkitd,root) %dir %{_datadir}/polkit-1/rules.d | |
a5863912 | 183 | %{_datadir}/dbus-1/system-services/org.freedesktop.PolicyKit1.service |
a7e49982 | 184 | %{?with_systemd:%{systemdunitdir}/polkit.service} |
a5863912 PZ |
185 | %{_mandir}/man1/pkaction.1* |
186 | %{_mandir}/man1/pkcheck.1* | |
187 | %{_mandir}/man1/pkexec.1* | |
a7e49982 | 188 | %{_mandir}/man1/pkttyagent.1* |
0c630415 PZ |
189 | %{_mandir}/man8/polkit.8* |
190 | %{_mandir}/man8/polkitd.8* | |
a5863912 | 191 | |
14eed758 | 192 | %if %{with apidocs} |
a5863912 PZ |
193 | %files apidocs |
194 | %defattr(644,root,root,755) | |
195 | %{_gtkdocdir}/polkit-1 | |
14eed758 | 196 | %endif |
a5863912 PZ |
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-agent-1.so.*.*.* | |
203 | %attr(755,root,root) %ghost %{_libdir}/libpolkit-agent-1.so.0 | |
a5863912 PZ |
204 | %attr(755,root,root) %{_libdir}/libpolkit-gobject-1.so.*.*.* |
205 | %attr(755,root,root) %ghost %{_libdir}/libpolkit-gobject-1.so.0 | |
a91c2820 | 206 | %{_libdir}/girepository-1.0/Polkit-1.0.typelib |
a36db55f | 207 | %{_libdir}/girepository-1.0/PolkitAgent-1.0.typelib |
a5863912 PZ |
208 | |
209 | %files devel | |
210 | %defattr(644,root,root,755) | |
a5863912 | 211 | %attr(755,root,root) %{_libdir}/libpolkit-agent-1.so |
a5863912 | 212 | %attr(755,root,root) %{_libdir}/libpolkit-gobject-1.so |
a5863912 PZ |
213 | %{_includedir}/polkit-1 |
214 | %{_pkgconfigdir}/polkit-agent-1.pc | |
a5863912 | 215 | %{_pkgconfigdir}/polkit-gobject-1.pc |
a91c2820 | 216 | %{_datadir}/gir-1.0/Polkit-1.0.gir |
a36db55f | 217 | %{_datadir}/gir-1.0/PolkitAgent-1.0.gir |
a5863912 PZ |
218 | |
219 | %files static | |
220 | %defattr(644,root,root,755) | |
221 | %{_libdir}/libpolkit-agent-1.a | |
a5863912 | 222 | %{_libdir}/libpolkit-gobject-1.a |