%define glib2_version 2.7.0 %define dbus_version 0.90 %define dbus_glib_version 0.70 %define lib_major 0 %define lib_name %mklibname consolekit %lib_major %define lib_name_devel %mklibname -d consolekit %define pkgname ConsoleKit Summary: System daemon for tracking users, sessions and seats Name: consolekit Version: 0.3.0 Release: %mkrel 3 License: GPLv2+ Group: System/Libraries URL: http://www.freedesktop.org/wiki/Software/ConsoleKit Source0: http://people.freedesktop.org/~mccann/dist/%{pkgname}-%{version}.tar.bz2 # (fc) 0.3.0-3mdv allow SetIdleHint (GIT) Patch0: ConsoleKit-0.3.0-allowsetidle.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: dbus-devel >= %{dbus_version} BuildRequires: dbus-glib-devel >= %{dbus_glib_version} BuildRequires: polkit-devel BuildRequires: pam-devel BuildRequires: X11-devel BuildRequires: xmlto Requires(post): chkconfig Requires(preun): chkconfig Provides: should-restart = system Provides: %{pkgname} = %{version}-%{release} %description ConsoleKit is a system daemon for tracking what users are logged into the system and how they interact with the computer (e.g. which keyboard and mouse they use). It provides asynchronous notification via the system message bus. %package x11 Summary: X11-requiring add-ons for ConsoleKit Group: System/Libraries Requires: %{name} = %{version} License: GPLv2+ %description x11 ConsoleKit contains some tools that require Xlib to be installed, those are in this separate package so server systems need not install X. Applications (such as xorg-x11-xinit) and login managers (such as gdm) that need to register their X sessions with ConsoleKit needs to have a Requires: for this package. %package -n %{lib_name} Summary: ConsoleKit libraries Group: System/Libraries Requires: pam Requires: %{name} >= %{version} Provides: %{_lib}%{name} = %{version}-%{release} License: MIT %description -n %{lib_name} Libraries and a PAM module for interacting with ConsoleKit. %package -n %{lib_name_devel} Summary: Development libraries and headers for ConsoleKit Group: Development/C Requires: %{lib_name} = %{version} Provides: %{name}-devel = %{version}-%{release} Provides: %{pkgname}-devel = %{version}-%{release} License: MIT %description -n %{lib_name_devel} Headers, libraries and API docs for ConsoleKit %prep %setup -q -n %{pkgname}-%{version} %patch0 -p1 -b .allowsetidle %build %configure2_5x --localstatedir=%{_var} --with-pid-file=%{_var}/run/console-kit-daemon.pid --enable-pam-module --with-pam-module-dir=/%{_lib}/security --enable-docbook-docs %make %install rm -rf $RPM_BUILD_ROOT %makeinstall_std rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la} rm -f $RPM_BUILD_ROOT/%{_lib}/security/*.{a,la} rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc/ConsoleKit # make sure we don't package a history log rm -f $RPM_BUILD_ROOT/%{_var}/log/ConsoleKit/history %clean rm -rf $RPM_BUILD_ROOT %pre # remove obsolete ConsoleKit initscript if [ -f %{_sysconfdir}/rc.d/init.d/consolekit ]; then /sbin/service consolekit stop > /dev/null 2>/dev/null || : /sbin/chkconfig --del consolekit fi %post if [ -f /var/log/ConsoleKit/history ]; then chmod a+r /var/log/ConsoleKit/history fi %if %mdkversion < 200900 %post -n %{lib_name} -p /sbin/ldconfig %endif %if %mdkversion < 200900 %postun -n %{lib_name} -p /sbin/ldconfig %endif %files %defattr(-,root,root,-) %doc README AUTHORS NEWS COPYING %config(noreplace) %{_sysconfdir}/dbus-1/system.d/* %{_sbindir}/console-kit-daemon %{_sbindir}/ck-log-system-start %{_sbindir}/ck-log-system-restart %{_sbindir}/ck-log-system-stop %{_bindir}/ck-history %{_bindir}/ck-list-sessions %{_bindir}/ck-launch-session %config(noreplace) %{_sysconfdir}/ConsoleKit %{_prefix}/lib/ConsoleKit %{_datadir}/PolicyKit/policy/* %{_datadir}/dbus-1/system-services/* %attr(755,root,root) %{_var}/log/ConsoleKit %attr(750,root,root) %{_var}/run/ConsoleKit %files x11 %defattr(-,root,root,-) %{_libexecdir}/ck-* %files -n %{lib_name} %defattr(-,root,root,-) %{_libdir}/lib*.so.* /%{_lib}/security/*.so %{_mandir}/man8/pam_ck_connector.8.* %files -n %{lib_name_devel} %defattr(-,root,root,-) %doc doc/dbus/ConsoleKit.html %{_libdir}/lib*.so %{_libdir}/pkgconfig/* %{_includedir}/* %{_datadir}/dbus-1/interfaces/* %changelog * Tue Sep 30 2008 Frederic Crozat <fcrozat@mandriva.com> 0.3.0-3mdv2009.0 + Revision: 290127 - Patch0 (GIT): allow SetIdleHint * Wed Aug 13 2008 Frederic Crozat <fcrozat@mandriva.com> 0.3.0-2mdv2009.0 + Revision: 271412 - request system reboot on update * Tue Aug 12 2008 Frederic Crozat <fcrozat@mandriva.com> 0.3.0-1mdv2009.0 + Revision: 271191 - Fix build for x86-64 - Release 0.3.0 * Wed Jul 23 2008 Frederic Crozat <fcrozat@mandriva.com> 0.2.10-1mdv2009.0 + Revision: 242531 - Release 0.2.10 - Patch0 (Fedora): return policykit result when not privileged * Mon Jun 16 2008 Thierry Vignaud <tvignaud@mandriva.com> 0.2.9-2mdv2009.0 + Revision: 220510 - rebuild + Pixel <pixel@mandriva.com> - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers * Mon Feb 18 2008 Frederic Crozat <fcrozat@mandriva.com> 0.2.9-1mdv2008.1 + Revision: 170132 - Release 0.2.9 * Mon Feb 04 2008 Frederic Crozat <fcrozat@mandriva.com> 0.2.7-2mdv2008.1 + Revision: 162382 - Unregister obsolete initscript in pre script, not preun * Fri Feb 01 2008 Frederic Crozat <fcrozat@mandriva.com> 0.2.7-1mdv2008.1 + Revision: 161061 - Release 0.2.7 - Release 0.2.6 - Remove patches 0, 1, 2 (no longer needed) + Olivier Blin <oblin@mandriva.com> - restore BuildRoot + Thierry Vignaud <tvignaud@mandriva.com> - kill re-definition of %%buildroot on Pixel's request * Mon Nov 19 2007 Frederic Crozat <fcrozat@mandriva.com> 0.2.3-3mdv2008.1 + Revision: 110481 - Drop call to chkconfig resetpriorities, it was Fedora specific. Fixes Mdv bug #35650. * Thu Oct 18 2007 Ademar de Souza Reis Jr <ademar@mandriva.com.br> 0.2.3-2mdv2008.1 + Revision: 99981 - fix project URL - remove trailing whitespace (cosmetic) * Mon Oct 15 2007 Frederic Crozat <fcrozat@mandriva.com> 0.2.3-1mdv2008.1 + Revision: 98581 - Release 0.2.3 - Remove patch3, merged upstream * Tue Aug 21 2007 Frederic Crozat <fcrozat@mandriva.com> 0.2.1-4mdv2008.0 + Revision: 68533 - Patch3: remove gdm configuration, move it to gdm package (Mdv bug #32571) * Fri Aug 17 2007 Frederic Crozat <fcrozat@mandriva.com> 0.2.1-3mdv2008.0 + Revision: 65112 - Patch2: fix initscript order (partially fix Mdv bug #32555) * Wed Aug 01 2007 Frederic Crozat <fcrozat@mandriva.com> 0.2.1-2mdv2008.0 + Revision: 57703 - Add provides on lib package * Fri Jul 13 2007 Frederic Crozat <fcrozat@mandriva.com> 0.2.1-1mdv2008.0 + Revision: 51844 -Fix bad macro usage - Import consolekit