# # spec file for package polkit # # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define with_systemd 0 Name: polkit Summary: PolicyKit Authorization Framework License: LGPL-2.1+ Group: System/Libraries Version: 0.104 Release: 0 Url: http://www.freedesktop.org/wiki/Software/PolicyKit BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: http://hal.freedesktop.org/releases/%{name}-%{version}.tar.gz Source99: baselibs.conf # PATCH-FIX-OPENSUSE polkit-no-wheel-group.patch vuntz@opensuse.org -- In openSUSE, there's no special meaning for the wheel group, so we shouldn't allow it to be admin Patch0: polkit-no-wheel-group.patch Patch1: polkit-pie.patch BuildRequires: glib2-devel >= 2.25.12 BuildRequires: gobject-introspection-devel >= 0.6.2 BuildRequires: gtk-doc # gtk-doc drags indirectyly ruby in for one of the helpers. This in turn causes a build cycle. #!BuildIgnore: ruby BuildRequires: intltool BuildRequires: libexpat-devel BuildRequires: pam-devel %if 0%{?with_systemd} BuildRequires: systemd-devel %endif PreReq: permissions Requires: ConsoleKit Requires: dbus-1 Requires: libpolkit0 = %{version}-%{release} # Upstream First - Policy: # Never add any patches to this package without the upstream commit id # in the patch. Any patches added here without a very good reason to make # an exception will be silently removed with the next version update. %description PolicyKit is a toolkit for defining and handling authorizations. It is used for allowing unprivileged processes to speak to privileged processes. %package devel Summary: Development files for PolicyKit Group: Development/Libraries/C and C++ Requires: %name = %{version}-%{release} Requires: libpolkit0 = %{version} Requires: typelib-1_0-Polkit-1_0 = %{version} Requires: pkgconfig %description devel Development files for PolicyKit Authorization Framework. %package doc Summary: Development documentation for PolicyKit Group: Development/Libraries/C and C++ %if 0%{?suse_version} >= 1120 BuildArch: noarch %endif %description doc Development documentation for PolicyKit Authorization Framework. %package -n libpolkit0 Summary: PolicyKit Authorization Framework -- Libraries Group: System/Libraries Requires: %{name} = %{version} %description -n libpolkit0 PolicyKit is a toolkit for defining and handling authorizations. It is used for allowing unprivileged processes to speak to privileged processes. This package contains the libraries only. %package -n typelib-1_0-Polkit-1_0 Summary: PolicyKit Authorization Framework -- Introspection bindings Group: System/Libraries %description -n typelib-1_0-Polkit-1_0 PolicyKit is a toolkit for defining and handling authorizations. It is used for allowing unprivileged processes to speak to privileged processes. This package provides the GObject Introspection bindings for PolicyKit. %prep %setup -q %patch0 -p1 %patch1 -p1 %build export V=1 %configure \ --with-os-type=suse \ --enable-gtk-doc \ --disable-static \ --enable-introspection \ --enable-examples \ --libexecdir=%{_prefix}/lib/polkit-1 make CFLAGS="-fPIC" %{?_smp_mflags} %install make install DESTDIR=$RPM_BUILD_ROOT rm -f $RPM_BUILD_ROOT%{_libdir}/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/polkit-1/extensions/*.la # For some reason, "smart" parts of the build are _sometimes_ # not smart enough to handle a 0700 directory. We set that back to # the proper original value in the %file list chmod 0755 $RPM_BUILD_ROOT%{_localstatedir}/lib/polkit-1 %find_lang polkit-1 %clean rm -rf $RPM_BUILD_ROOT %post %set_permissions %{_bindir}/pkexec %set_permissions %{_prefix}/lib/polkit-1/polkit-agent-helper-1 %verifyscript %verify_permissions -e %{_bindir}/pkexec %verify_permissions -e %{_prefix}/lib/polkit-1/polkit-agent-helper-1 %post -n libpolkit0 -p /sbin/ldconfig %postun -n libpolkit0 -p /sbin/ldconfig %files -n libpolkit0 %defattr(-,root,root,-) %{_libdir}/lib*.so.* %files -n typelib-1_0-Polkit-1_0 %defattr(-,root,root,-) %{_libdir}/girepository-1.0/Polkit-1.0.typelib %{_libdir}/girepository-1.0/PolkitAgent-1.0.typelib %files -f polkit-1.lang %defattr(-,root,root,-) %doc COPYING %dir %{_libdir}/polkit-1 %dir %{_libdir}/polkit-1/extensions %{_libdir}/polkit-1/extensions/*.so %{_datadir}/man/man1/pkexec.1.gz %{_datadir}/man/man1/pkaction.1.gz %{_datadir}/man/man1/pkcheck.1.gz %{_datadir}/man/man8/polkitd.8.gz %{_datadir}/man/man8/polkit.8.gz %{_datadir}/man/man8/pklocalauthority.8.gz %dir %{_datadir}/dbus-1 %{_datadir}/dbus-1/system-services %dir %{_datadir}/polkit-1 %dir %{_datadir}/polkit-1/actions %{_datadir}/polkit-1/actions/org.freedesktop.policykit.policy %dir %{_sysconfdir}/dbus-1 %dir %{_sysconfdir}/dbus-1/system.d %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.PolicyKit1.conf %config(noreplace) %{_sysconfdir}/pam.d/polkit-1 %dir %{_sysconfdir}/polkit-1 %dir %{_sysconfdir}/polkit-1/nullbackend.conf.d %config(noreplace) %{_sysconfdir}/polkit-1/nullbackend.conf.d/50-nullbackend.conf %dir %{_sysconfdir}/polkit-1/localauthority.conf.d %config(noreplace) %{_sysconfdir}/polkit-1/localauthority.conf.d/50-localauthority.conf %{_bindir}/pkaction %{_bindir}/pkcheck %verify(not mode) %attr(4755,root,root) %{_bindir}/pkexec %dir %{_prefix}/lib/polkit-1 %{_prefix}/lib/polkit-1/polkitd %verify(not mode) %attr(4755,root,root) %{_prefix}/lib/polkit-1/polkit-agent-helper-1 %attr(0700,root,root) %dir %{_localstatedir}/lib/polkit-1 %files devel %defattr(-,root,root,-) %{_libdir}/lib*.so %{_libdir}/pkgconfig/*.pc %{_includedir}/* %{_bindir}/pk-example-frobnicate %{_datadir}/gir-1.0/*.gir %{_datadir}/polkit-1/actions/org.freedesktop.policykit.examples.pkexec.policy %files doc %defattr(-,root,root,-) %doc NEWS %{_datadir}/gtk-doc/html/* %changelog