%define libapi 1 %define libqtapi 3 %define libmajor 0 %define url_ver %(echo %{version} | cut -d. -f1,2) Summary: The Light Display Manager Name: lightdm Version: 1.30.0 Release: %mkrel 0.1 License: GPLv3+ Group: Graphical desktop/Other Source0: https://github.com/CanonicalLtd/lightdm/releases/download/%{version}/lightdm-%{version}.tar.xz Source1: 29lightdm.conf # Mageia specific settings overrides Source3: lightdm-settings.conf # For autologin configuration via drakboot Source4: lightdm-autologin-config.conf # Systemd related: Source10: lightdm-tmpfiles.conf Source11: lightdm.service Source12: lightdm.rules # PAM configs stolen from gdm Source20: lightdm.pam Source21: lightdm-autologin.pam Source22: lightdm-greeter.pam # Upstream patches # # originally from Fedora: Patch500: lightdm-1.11.7-nodaemon_option.patch # Mageia patches # URL: http://www.freedesktop.org/wiki/Software/LightDM BuildRequires: intltool BuildRequires: itstool BuildRequires: gettext-devel BuildRequires: gnome-common BuildRequires: pam-devel BuildRequires: yelp-tools BuildRequires: vala-devel BuildRequires: pkgconfig(audit) BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(gio-unix-2.0) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(libxklavier) BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5DBus) BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(xdmcp) BuildRequires: pkgconfig(xcb) BuildRequires: pkgconfig(x11) BuildRequires: libgcrypt-devel Requires: xinitrc Requires: lightdm-greeter Requires: accountsservice Recommends: light-locker Provides: dm Conflicts: sddm < 0.13.0-4.mga6 # Obsolete some greeters: # LXQt and KDE prefers sddm Obsoletes: lightdm-lxqt-greeter < 0.7.0-4 Obsoletes: lightdm-kde-greeter < 0.3.2.2-4 # Dead or almost dead in upstream Obsoletes: lightdm-another-gtk-greeter < 1.0.6.3.4-4 %description An X display manager that: * Has a lightweight codebase * Is standards compliant (PAM, etc) * Has a well defined interface between the server and user interface * Fully themeable (easiest with the webkit interface) * Cross-desktop (greeters can be written in any toolkit) #------------------------------------------------------------------------- %define liblightdmgobject %mklibname lightdm-gobject %{libapi} %{libmajor} %package -n %{liblightdmgobject} Summary: LightDM GObject client library Group: Graphical desktop/Other License: LGPLv2+ %description -n %{liblightdmgobject} A GObject based library for LightDM clients to use to interface with LightDM. %files -n %{liblightdmgobject} %{_libdir}/liblightdm-gobject-%{libapi}.so.%{libmajor} %{_libdir}/liblightdm-gobject-%{libapi}.so.%{libmajor}.* #------------------------------------------------------------------------- %define liblightdmgir %mklibname lightdm-gir %{libapi} %package -n %{liblightdmgir} Summary: Typelib file for liblightdm-1 Group: Graphical desktop/Other License: LGPLv2+ Requires: %{liblightdmgobject} = %{version}-%{release} %description -n %{liblightdmgir} A GObject based library for LightDM clients to use to interface with LightDM. %files -n %{liblightdmgir} %{_libdir}/girepository-1.0/LightDM-%{libapi}.typelib #------------------------------------------------------------------------- %define liblightdmgobjectdevel %mklibname -d lightdm-gobject %package -n %{liblightdmgobjectdevel} Summary: LightDM client library (development files) Group: Graphical desktop/Other License: LGPLv2+ Requires: %{liblightdmgobject} = %{version}-%{release} Requires: %{liblightdmgir} = %{version}-%{release} Provides: lightdm-gobject-devel = %{version}-%{release} %description -n %{liblightdmgobjectdevel} A GObject based library for LightDM clients to use to interface with LightDM. This package contains header files and development information, which is useful for building LightDM greeters and user switchers. %files -n %{liblightdmgobjectdevel} %doc %{_datadir}/gtk-doc/html/lightdm-gobject-%{libapi} %{_includedir}/lightdm-gobject-%{libapi}/ %{_libdir}/liblightdm-gobject-%{libapi}.so %{_libdir}/pkgconfig/liblightdm-gobject-%{libapi}.pc %{_datadir}/gir-1.0/LightDM-%{libapi}.gir %{_datadir}/vala/vapi/liblightdm-gobject-%{libapi}.* #------------------------------------------------------------------------- %define liblightdmqt5 %mklibname lightdm-qt5_ %{libqtapi} %{libmajor} %package -n %{liblightdmqt5} Summary: LightDM Qt5 client library Group: Graphical desktop/Other License: LGPLv2+ %description -n %{liblightdmqt5} A Qt5 based library for LightDM clients to use to interface with LightDM. %files -n %{liblightdmqt5} %{_libdir}/liblightdm-qt5-%{libqtapi}.so.%{libmajor} %{_libdir}/liblightdm-qt5-%{libqtapi}.so.%{libmajor}.* #------------------------------------------------------------------------- %define liblightdmqt5devel %mklibname -d lightdm-qt5 %package -n %{liblightdmqt5devel} Summary: LightDM client library (development files) Group: Graphical desktop/Other License: LGPLv2+ Requires: %{liblightdmqt5} = %{version}-%{release} Provides: lightdm-qt5-devel = %{version}-%{release} %description -n %{liblightdmqt5devel} A Qt5 based library for LightDM clients to use to interface with LightDM. This package contains header files and development information, which is useful for building LightDM greeters and user switchers. %files -n %{liblightdmqt5devel} %{_includedir}/lightdm-qt5-%{libqtapi} %{_libdir}/liblightdm-qt5-%{libqtapi}.so %{_libdir}/pkgconfig/liblightdm-qt5-%{libqtapi}.pc #------------------------------------------------------------------------- %prep %setup -q %autopatch -p1 # for autoreconf (to make it happy) sed -i '1iACLOCAL_AMFLAGS=-I m4' Makefile.am %build autoreconf -vfi export MOC5=%{_qt5_bindir}/moc %if %{?mageia} < 7 export CXXFLAGS="%{optflags} -std=c++11" %endif %configure2_5x \ --disable-static \ --disable-tests \ --enable-gtk-doc-html=no \ --enable-introspection=yes \ --enable-liblightdm-qt5=yes \ --enable-liblightdm-qt=no \ --with-greeter-session=lightdm-greeter %make_build %install %make_install # dm config install -Dpm644 %{_sourcedir}/29lightdm.conf %{buildroot}/%{_datadir}/X11/dm.d/29lightdm.conf # will be created when lightdm starts install -d %{buildroot}%{_logdir}/%{name} touch %{buildroot}%{_logdir}/%{name}/%{name}.log touch %{buildroot}%{_logdir}/%{name}/%{name}.log.old # directory for remote sessions mkdir -p %{buildroot}%{_datadir}/%{name}/remote-sessions # mageia specific config overrides install -Dpm644 %{_sourcedir}/lightdm-settings.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf.d/49-%{_real_vendor}.conf # autologin config file for drakboot install -Dpm644 %{_sourcedir}/lightdm-autologin-config.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf.d/50-%{_real_vendor}-autologin.conf # for systemd install -Dpm 644 %{_sourcedir}/lightdm-tmpfiles.conf %{buildroot}%{_tmpfilesdir}/lightdm.conf install -Dpm 644 %{_sourcedir}/lightdm.service %{buildroot}%{_unitdir}/lightdm.service install -Dpm 644 %{_sourcedir}/lightdm.rules %{buildroot}%{_datadir}/polkit-1/rules.d/lightdm.rules # pam configs stolen from gdm rm -rf %{buildroot}%{_sysconfdir}/pam.d/ install -Dpm 644 %{_sourcedir}/lightdm.pam %{buildroot}%{_sysconfdir}/pam.d/%{name} install -Dpm 644 %{_sourcedir}/lightdm-autologin.pam %{buildroot}%{_sysconfdir}/pam.d/%{name}-autologin install -Dpm 644 %{_sourcedir}/lightdm-greeter.pam %{buildroot}%{_sysconfdir}/pam.d/%{name}-greeter #home dir for lightdm user mkdir -p %{buildroot}%{_localstatedir}/lib/%{name} #for user data dir mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}-data #we don't want these find %{buildroot} -name "*.la" -delete rm -rf %{buildroot}%{_sysconfdir}/{init,apparmor.d}/ %if %{?mageia} < 7 %find_lang %{name} --with-gnome --with-help %else %find_lang %{name} --with-gnome %endif %pre %_pre_useradd %{name} %{_localstatedir}/lib/%{name} /sbin/nologin %preun %systemd_preun %{name}.service %post %create_ghostfile %{_logdir}/%{name}/%{name}.log root root 0600 %create_ghostfile %{_logdir}/%{name}/%{name}.log.old root root 0600 %systemd_post %{name}.service %triggerun -- %{name} < 1.18.3-3 %{__perl} -p -i -e 's/\[SeatDefaults\]/\[Seat:*\]/' \ %{_sysconfdir}/%{name}/%{name}.conf \ %{_sysconfdir}/%{name}/%{name}.conf.d/*.conf homedir=$(getent passwd lightdm |cut -d: -f6) if [ x"${homedir}" != x"%{_localstatedir}/lib/%{name}" ]; then %{_sbindir}/usermod lightdm -d %{_localstatedir}/lib/%{name} fi %files -f %{name}.lang %dir %{_sysconfdir}/%{name}/ %dir %{_sysconfdir}/%{name}/%{name}.conf.d/ %config %{_sysconfdir}/%{name}/%{name}.conf.d/49-%{_real_vendor}.conf %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf.d/50-%{_real_vendor}-autologin.conf %config(noreplace) %{_sysconfdir}/%{name}/keys.conf %config(noreplace) %{_sysconfdir}/%{name}/lightdm.conf %config(noreplace) %{_sysconfdir}/%{name}/users.conf %config(noreplace) %{_sysconfdir}/pam.d/lightdm* %dir %{_logdir}/%{name}/ %ghost %{_logdir}/%{name}/%{name}.log %ghost %{_logdir}/%{name}/%{name}.log.old %attr(700,lightdm,lightdm) %dir %{_localstatedir}/lib/%{name}/ %attr(700,lightdm,lightdm) %dir %{_localstatedir}/lib/%{name}-data/ %{_sysconfdir}/dbus-1/system.d/org.freedesktop.DisplayManager.conf %{_datadir}/bash-completion/completions/* %{_datadir}/X11/dm.d/29lightdm.conf %{_datadir}/accountsservice/interfaces/org.freedesktop.DisplayManager.AccountsService.xml %{_datadir}/dbus-1/interfaces/org.freedesktop.DisplayManager.AccountsService.xml %{_datadir}/polkit-1/rules.d/lightdm.rules %{_datadir}/polkit-1/actions/org.freedesktop.DisplayManager.AccountsService.policy %{_datadir}/%{name}/ %{_sbindir}/%{name} %{_bindir}/dm-tool %{_libexecdir}/lightdm-guest-session %{_mandir}/man1/%{name}* %{_mandir}/man1/dm-tool.* %{_tmpfilesdir}/lightdm.conf %{_unitdir}/lightdm.service