File slim.spec of Package slim
#
# spec file for package slim
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: slim
Summary: Simple Login Manager
Version: 1.3.2
Release: 37.1
License: GNU General Public License (GPL)
URL: http://slim.berlios.de/
Source0: %{name}-%{version}.tar.bz2
Source1: slim.conf
Source2: slim.pamd
%if %suse_version <= 1110
Source3: slim
%endif
Source4: slim-theme-openSUSE.tar.bz2
Source5: slim.logrotate
Source6: sysconfig.slim
Patch0: %{name}-1.3.2-makefile.patch
Patch1: %{name}-1.3.2-daemon.patch
Patch2: %{name}-1.3.2-pam.patch
# disable for now, see bnc#531540
# Patch3: %{name}-1.3.1-xinerama.patch
Patch4: %{name}-1.3.2-includes.patch
Patch5: %{name}-1.3.2-xsessions.patch
Patch6: %{name}-1.3.2-restart-xserver-if-kill-slim.patch
Group: System/X11/Displaymanagers
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++ libstdc++-devel xorg-x11-devel libjpeg-devel freetype2-devel pam-devel
%if %suse_version <= 1120
BuildRequires: libpng-devel
%else
BuildRequires: libpng12-devel
%endif
Requires: pam
# allow screenshots with F11
Recommends: ImageMagick
Recommends: logrotate
%description
SLiM is a Desktop-independent graphical login manager for X11,
derived from Login.app, with no KDE or GNOME dependencies.
Authors:
--------
Simone Rota and Johannes Winkelmann
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
#%patch3
%patch4 -p1
%patch5 -p1
%patch6 -p1
rm -f Makefile.*bsd
rm -f slim.conf
cp %{SOURCE1} .
%build
make USE_PAM=1 PREFIX=%{_prefix} CFGDIR=%{_sysconfdir} DATADIR=%{_datadir} MANDIR=%{_mandir} LIBDIR=%{_libdir} INCLUDEDIR=%{_includedir} OPTFLAGS="$RPM_OPT_FLAGS"
%install
make USE_PAM=1 PREFIX=%{_prefix} CFGDIR=%{_sysconfdir} DATADIR=%{_datadir} MANDIR=%{_mandir} DESTDIR=$RPM_BUILD_ROOT install
install -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/slim
# /etc/init.d/slim script is provided to allow
# slim start on boot, this is only a workaround
# it should be merged somehow into /etc/init.d/xdm
# done on suse 11.2
%if %suse_version <= 1110
install -D -m 0755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/slim
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
ln -sf %{_sysconfdir}/init.d/slim $RPM_BUILD_ROOT%{_sbindir}/rcslim
%endif
# openSUSE Theme, IMHO it should be splitted
# as slim-branding-openSUSE
cd $RPM_BUILD_ROOT%{_datadir}/slim/themes/
tar xfj %{SOURCE4}
# Install a logrotate script (or the log will keep growing until it errors out
# at 2 GB size...)
install -D -m 0644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/slim
%if %suse_version >= 1120
# set slim as Default DM
mkdir -p %{buildroot}/var/adm/fillup-templates
cp %{SOURCE6} %{buildroot}/var/adm/fillup-templates/
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if %suse_version <= 1110
%preun
%{?stop_on_removal:%{stop_on_removal slim}}
%postun
%{?insserv_cleanup:%{insserv_cleanup}}
%else
%post
%{fillup_only -ns displaymanager slim}
%endif
%files
%defattr(-,root,root)
%doc COPYING ChangeLog README THEMES TODO xinitrc.sample
%config(noreplace) %{_sysconfdir}/slim.conf
%config(noreplace) %{_sysconfdir}/pam.d/slim
%{_bindir}/slim
%doc %{_mandir}/man1/slim*
%dir %{_datadir}/slim
%dir %{_datadir}/slim/themes
%dir %{_datadir}/slim/themes/default
%dir %{_datadir}/slim/themes/openSUSE
%{_datadir}/slim/themes/*/*
%config %{_sysconfdir}/logrotate.d/slim
%if %suse_version <= 1110
%{_sysconfdir}/init.d/slim
%{_sbindir}/rcslim
%endif
%if %suse_version >= 1120
%config /var/adm/fillup-templates/sysconfig.slim
%endif
%changelog
* Wed Sep 16 2009 andrea@opensuse.org
- removed "slim" init script on suse >= 11.2 (bnc#531667)
* Wed Sep 9 2009 prusnak@suse.cz
- fixed typos in .spec file
* Wed Sep 9 2009 andrea@opensuse.org
- added logrotate script (or the log will keep growing until it errors out at 2 GB size...)
- added "restart xserver if kill slim"
* Mon Aug 17 2009 prusnak@suse.cz
- spec file cleanup
* Sun Aug 16 2009 andrea@opensuse.org
- disable NumLock default enabled, in some laptop
it may be very annoyining
- improved slim-1.3.1-includes.patch to allow gcc 4.4 build
* Sun Aug 16 2009 andrea@opensuse.org
- fixed "screenshot_cmd", screenshots now saved in /tmp
- added ImageMagick as Requires to allow screenshots feature
- added SUSE theme preview
* Sat Aug 15 2009 andrea@opensuse.org
- fixed init script, non more fail on "stop"
- temporary disable xinerema support because
patch introduces a regression [bnc#531540]
* Fri Aug 14 2009 andrea@opensuse.org
- added openSUSE theme (Author Andrea Florio <andrea@opensuse.org>)
* Fri May 29 2009 andrea@opensuse.org
- added init script to allow boot time start of slim (xdm MUST not start)
* Tue Mar 3 2009 prusnak@suse.cz
- fix unusable keyboard in tty (daemon.patch)
- fix pam issues with Kerberos and pam_unix2 (pam.patch)
- add Xinerama support (xinerama.patch)
- fix missing includes (includes.patch)
- parse desktop files in /usr/share/xsessions (xsessions.patch)
* Mon Dec 1 2008 prusnak@suse.cz
- updated to 1.3.1
* Added focus_password config option for focusing password
automatically when default_user is enabled
* Added auto_login option
* Fixed uninitialized daemonmode, see
http://www.freebsd.org/cgi/query-pr.cgi?pr=114366
* Fixed maximum length for password
* Introduced customization options for session text:
font, colors, position, shadows.
* Tue Nov 11 2008 prusnak@suse.cz
- pam_resmgr dropped
* Thu Jun 26 2008 prusnak@suse.cz
- allow users to shutdown without root password (shutdown.patch)
* Thu Aug 16 2007 prusnak@suse.cz
- update to 1.3.0
* Tue Jun 12 2007 prusnak@suse.cz
- updated to SVN branch slim-pam revision 140
* Tue May 22 2007 prusnak@suse.cz
- updated to SVN branch slim-pam revision 133
* Wed Feb 28 2007 prusnak@suse.cz
- updated to SVN version
- added modified slim.conf config file
- added pam.d/slim config file (unused ATM)
* Fri Feb 16 2007 prusnak@suse.cz
- created package with version 1.2.6