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