File lightdm.spec of Package lightdm
#
# spec file for package lightdm
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011 Guido Berhoerster.
#
# 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 gobject_libname lightdm-gobject-1
%define gobject_lib lib%{gobject_libname}-0
%define qt_libname lightdm-qt-1
%define qt_lib lib%{qt_libname}-0
Name: lightdm
Version: 1.0.6
Release: 1
Summary: Lightweight, Cross-desktop Display Manager
Group: System/X11/Displaymanagers
License: GPLv3+
Url: http://www.freedesktop.org/wiki/Software/LightDM
Source0: %{name}-%{version}.tar.gz
Source1: %{name}.pamd
Source2: %{name}-autologin.pamd
Source3: X11-displaymanagers-%{name}
Source100: %{name}-rpmlintrc
# PATCH-FEATURE-OPENSUSE lightdm-use-pkglibexecdir.patch gber@opensuse.org -- Use pkglibexecdir instead of libexecdir for helper binaries/scripts
Patch0: lightdm-use-pkglibexecdir.patch
# PATCH-FEATURE-OPENSUSE lightdm-sysconfig-support.patch gber@opensuse.org -- Adds support for reading configuration options from /etc/sysconfig/displaymanager and /etc/sysconfig/windowmanager
Patch1: lightdm-sysconfig-support.patch
# PATCH-FEATURE-OPENSUSE lightdm-xauthlocalhostname-support.patch gber@opensuse.org -- Set XAUTHLOCALHOSTNAME to localhost for local logins to avoid issues in the session in case the hostname changes
Patch2: lightdm-xauthlocalhostname-support.patch
# PATCH-FEATURE-OPENSUSE lightdm-desktop-session-env-pam.patch gber@opensuse.org -- Sets a PAM environment variable to let the pam gnome-keyring module know which session is started
Patch3: lightdm-desktop-session-env-pam.patch
# PATCH-FEATURE-OPENSUSE lightdm-set-gdmflexiserver-envvar.patch gber@opensuse.org -- Sets the GDMFLEXISERVER environment variable for the gdmflexiserver wrapper
Patch4: lightdm-set-gdmflexiserver-envvar.patch
# PATCH-FEATURE-OPENSUSE lightdm-default-configuration.patch gber@opensuse.org -- Modifies configuration with suitable defaults for openSUSE
Patch5: lightdm-default-configuration.patch
# PATCH-FIX-UPSTREAM lightdm-lock-screen-before-switch.patch gber@opensuse.org -- Try to lock the screen before switching users
Patch7: lightdm-lock-screen-before-switch.patch
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(xcb)
BuildRequires: pkgconfig(xdmcp)
BuildRequires: pkgconfig(libxklavier)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(QtGui)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: gcc-c++
BuildRequires: vala
BuildRequires: pam-devel
BuildRequires: intltool
BuildRequires: gtk-doc
BuildRequires: gnome-common
Requires(pre): pwdutils
# 3rd party greeters don't have to follow
# the same versioning of lightdm
Requires: lightdm-greeter
Requires: ConsoleKit-x11
Requires: gdmflexiserver
Recommends: %{name}-lang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
LightDM is a lightweight, cross-desktop display manager. Its main features are
a well-defined greeter API allowing multiple GUIs, support for all display
manager use cases, with plugins where appropriate, low code complexity, and
fast performance. Due to its cross-platform nature greeters can be written in
several toolkits such as Qt and GTK.
%lang_package
%package -n %{gobject_lib}
Summary: LightDM GObject-based Client Library
Group: System/Libraries
Recommends: accountsservice
%description -n %{gobject_lib}
A GObject-based library for LightDM clients to use to interface with LightDM.
%package gobject-devel
Summary: Development Files for %{gobject_lib}
Group: Development/Libraries/C and C++
Requires: %{gobject_lib} = %{version}
%description gobject-devel
This package contains development files needed for developing GObject-based
LightDM clients.
%package -n %{qt_lib}
Summary: LightDM Qt-based Client Library
Group: System/Libraries
%description -n %{qt_lib}
A Qt-based library for LightDM clients to use to interface with LightDM.
%package qt-devel
Summary: Development Files for %{qt_lib}
Group: Development/Libraries/C and C++
Requires: %{qt_lib} = %{version}
%description qt-devel
This package contains development files needed for developing Qt-based
LightDM clients.
%package gtk-greeter
Summary: GTK-based Greeter for LightDM
Group: System/X11/Displaymanagers
Requires(post): update-alternatives
Requires(postun):update-alternatives
Recommends: gnome-themes-accessibility
Requires: %{name} = %{version}
Requires: %{gobject_lib} = %{version}
Requires: %{name}-gtk-greeter-branding = %{version}
Provides: lightdm-greeter = %{version}
%description gtk-greeter
This is the reference implementation of a LightDM greeter based on the GTK
toolkit.
%package gtk-greeter-branding-upstream
Summary: Upstream branding of %{name}-gtk-greeter
Group: System/X11/Displaymanagers
Requires: %{name}-gtk-greeter = %{version}
Provides: %{name}-gtk-greeter-branding = %{version}
Conflicts: otherproviders(%{name}-gtk-greeter-branding)
Supplements: packageand(%{name}-gtk-greeter:branding-upstream)
BuildArch: noarch
#BRAND: /etc/lightdm/lightdm-gtk-greeter.conf: Determines a number of greeter
#BRAND: settings, in particular the background image.
%description gtk-greeter-branding-upstream
This package provides the upstream look and feel for the %{name}-gtk-greeter.
%package qt-greeter
Summary: Qt-based Greeter for LightDM
Group: System/X11/Displaymanagers
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires: %{name} = %{version}
Requires: %{qt_lib} = %{version}
Provides: lightdm-greeter = %{version}
%description qt-greeter
This is the reference implementation of a LightDM greeter based on the Qt
toolkit.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch7 -p1
%build
./autogen.sh
%configure \
--libexecdir=%{_libexecdir} \
--disable-static \
--enable-gtk-doc \
--with-user-session=twm \
--with-greeter-session=lightdm-default-greeter \
--with-greeter-user=lightdm
make %{?_smp_mflags} V=1
%install
%make_install
rm -f %{buildroot}%{_libdir}/*.la
rm -rf %{buildroot}%{_sysconfdir}/init/
install -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pam.d/lightdm
install -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/lightdm-autologin
install -D -m 644 %{SOURCE3} %{buildroot}%{_libexecdir}/X11/displaymanagers/lightdm
install -d %{buildroot}%{_localstatedir}/log/lightdm
install -d %{buildroot}%{_localstatedir}/run/lightdm
install -d %{buildroot}%{_localstatedir}/lib/lightdm
%find_lang %{name} %{?no_lang_C}
%clean
rm -rf %{buildroot}
%pre
/usr/sbin/groupadd -r lightdm 2> /dev/null || :
/usr/sbin/useradd -r -o -g lightdm -s /bin/false -c "LightDM daemon" \
-d /var/lib/lightdm lightdm 2> /dev/null || :
/usr/sbin/usermod -g lightdm -G lightdm -s /bin/false lightdm 2> /dev/null
%post -n %{gobject_lib} -p /sbin/ldconfig
%postun -n %{gobject_lib} -p /sbin/ldconfig
%post -n %{qt_lib} -p /sbin/ldconfig
%postun -n %{qt_lib} -p /sbin/ldconfig
%post qt-greeter
/usr/sbin/update-alternatives --install \
%{_datadir}/xgreeters/lightdm-default-greeter.desktop \
lightdm-default-greeter.desktop \
%{_datadir}/xgreeters/lightdm-qt-greeter.desktop \
20
%postun qt-greeter
if [ $1 -eq 0 ]; then
/usr/sbin/update-alternatives --remove lightdm-default-greeter.desktop \
%{_datadir}/xgreeters/lightdm-qt-greeter.desktop
fi
%post gtk-greeter
/usr/sbin/update-alternatives --install \
%{_datadir}/xgreeters/lightdm-default-greeter.desktop \
lightdm-default-greeter.desktop \
%{_datadir}/xgreeters/lightdm-gtk-greeter.desktop \
20
%postun gtk-greeter
if [ $1 -eq 0 ]; then
/usr/sbin/update-alternatives --remove lightdm-default-greeter.desktop \
%{_datadir}/xgreeters/lightdm-gtk-greeter.desktop
fi
%files
%defattr(-,root,root,-)
%doc COPYING ChangeLog NEWS README
%{_bindir}/dm-tool
%{_sbindir}/lightdm
%dir %{_libexecdir}/lightdm/
%{_libexecdir}/%{name}/lightdm-set-defaults
%{_libexecdir}/%{name}/gdmflexiserver
%{_libexecdir}/%{name}/lightdm-guest-session-wrapper
%dir %{_sysconfdir}/lightdm/
%config %{_sysconfdir}/lightdm/lightdm.conf
%config %{_sysconfdir}/lightdm/users.conf
%config %{_sysconfdir}/lightdm/keys.conf
%config %{_sysconfdir}/pam.d/lightdm*
%config %{_sysconfdir}/dbus-1/system.d/org.freedesktop.DisplayManager.conf
%dir %{_sysconfdir}/apparmor.d/
%{_sysconfdir}/apparmor.d/lightdm-guest-session
%dir %{_libexecdir}/X11/
%dir %{_libexecdir}/X11/displaymanagers/
%{_libexecdir}/X11/displaymanagers/lightdm
%dir %{_datadir}/xgreeters/
%ghost %attr(751,lightdm,lightdm) %dir %{_localstatedir}/run/lightdm
%attr(750,lightdm,lightdm) %dir %{_localstatedir}/log/lightdm
%attr(750,lightdm,lightdm) %dir %{_localstatedir}/lib/lightdm
%doc %{_mandir}/man1/lightdm.1*
%files lang -f %{name}.lang
%files -n %{gobject_lib}
%defattr(-,root,root,-)
%{_libdir}/lib%{gobject_libname}.so.*
%files gobject-devel
%defattr(-,root,root,-)
%{_libdir}/lib%{gobject_libname}.so
%{_libdir}/pkgconfig/lib%{gobject_libname}.pc
%{_includedir}/%{gobject_libname}/
%{_libdir}/girepository-1.0/LightDM-1.typelib
%{_datadir}/gir-1.0/LightDM-1.gir
%dir %{_datadir}/vala
%dir %{_datadir}/vala/vapi
%{_datadir}/vala/vapi/liblightdm-gobject-1.vapi
%doc %{_datadir}/gtk-doc/html/%{gobject_libname}/
%files -n %{qt_lib}
%defattr(-,root,root,-)
%{_libdir}/lib%{qt_libname}.so.*
%files qt-devel
%defattr(-,root,root,-)
%{_libdir}/lib%{qt_libname}.so
%{_libdir}/pkgconfig/lib%{qt_libname}.pc
%{_includedir}/%{qt_libname}/
%files gtk-greeter
%defattr(-,root,root,-)
%{_sbindir}/lightdm-gtk-greeter
%{_datadir}/lightdm-gtk-greeter
%{_datadir}/xgreeters/lightdm-gtk-greeter.desktop
%ghost %attr(644,root,root) %{_datadir}/xgreeters/lightdm-default-greeter.desktop
%ghost %attr(644,root,root) %{_sysconfdir}/alternatives/lightdm-default-greeter.desktop
%files gtk-greeter-branding-upstream
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/lightdm/lightdm-gtk-greeter.conf
%files qt-greeter
%defattr(-,root,root,-)
%{_sbindir}/lightdm-qt-greeter
%{_datadir}/xgreeters/lightdm-qt-greeter.desktop
%ghost %attr(644,root,root) %{_datadir}/xgreeters/lightdm-default-greeter.desktop
%ghost %attr(644,root,root) %{_sysconfdir}/alternatives/lightdm-default-greeter.desktop
%changelog