File deepin-session-ui.spec of Package deepin-session-ui
#
# spec file for package deepin-session-ui
#
# Copyright (c) 2017 SUSE LINUX 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 _name dde-session-ui
Name: deepin-session-ui
Version: 4.3.2
Release: 0
Summary: Deepin desktop-environment - Session UI module
License: GPL-3.0
URL: https://github.com/linuxdeepin/dde-session-ui
Source0: https://github.com/linuxdeepin/dde-session-ui/archive/%{version}/%{_name}-%{version}.tar.gz
Source1: logo.svg
Group: System/GUI/Other
BuildRequires: update-desktop-files
BuildRequires: deepin-gettext-tools
BuildRequires: pkgconfig(dtkwidget)
BuildRequires: pkgconfig(dframeworkdbus)
BuildRequires: pkgconfig(gsettings-qt)
BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: pkgconfig(liblightdm-qt5-3)
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: pkgconfig(Qt5X11Extras)
BuildRequires: pkgconfig(Qt5Multimedia)
BuildRequires: pkgconfig(xcursor)
BuildRequires: pkgconfig(xtst)
BuildRequires: pam-devel
BuildRequires: libqt5-linguist
Recommends: %{name}-lang = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This project include those sub-project:
- deepin-shutdown: User interface of shutdown.
- deepin-lock: User interface of lock screen.
- deepin-lockservice: The back-end service of locking screen.
- lightdm-deepin-greeter: The user interface when you login in.
- deepin-switchtogreeter: The tools to switch the user to login in.
- deepin-lowpower: The user interface of reminding low power.
- deepin-osd: User interface of on-screen display.
- deepin-hotzone: User interface of setting hot zone.
%package -n deepin-shutdown
Summary: Deepin shutdown
Requires: %{name} = %{version}-%{release}
%description -n deepin-shutdown
User interface of shutdown.
%package -n deepin-lock
Summary: Deepin lock and service
Requires: %{name} = %{version}-%{release}
%description -n deepin-lock
The user interface and back-end service of lock screen.
%package -n lightdm-deepin-greeter
Summary: Simple display manager (Deepin Desktop)
Group: System/X11/Displaymanagers
Requires: lightdm
Requires: deepin-start
Requires: %{name} = %{version}-%{release}
%description -n lightdm-deepin-greeter
A LightDM greeter that uses the Deepin Desktop. This is the reference implementation
of a LightDM greeter based on the Deepin Desktop.
%package -n deepin-switchtogreeter
Summary: Deepin switchtogreeter
Requires: %{name} = %{version}-%{release}
%description -n deepin-switchtogreeter
The tools to switch the user to login in.
%package -n deepin-lowpower
Summary: Deepin lowpower
Requires: %{name} = %{version}-%{release}
%description -n deepin-lowpower
The user interface of reminding low power.
%package -n deepin-osd
Summary: Deepin OSD
Requires: %{name} = %{version}-%{release}
%description -n deepin-osd
User interface of on-screen display.
%package -n deepin-warning-dialog
Summary: Deepin Warning Dialog
Requires: %{name} = %{version}-%{release}
%description -n deepin-warning-dialog
User interface of warning dialog.
%package -n deepin-hotzone
Summary: Deepin hotzone
Requires: %{name} = %{version}-%{release}
Requires: deepin-daemon
BuildArch: noarch
%description -n deepin-hotzone
User interface of setting hot zone.
%lang_package
%prep
%setup -q -n %{_name}-%{version}
sed -i 's|lrelease|lrelease-qt5|g' translate_generation.sh
#Use Geeko logo instead deepin
cp %{SOURCE1} lightdm-deepin-greeter/img/
%build
%qmake5 PREFIX=%{_prefix}
make %{?_smp_mflags}
%install
%qmake5_install
# lightdm.conf
#https://wiki.archlinux.org/index.php/Deepin_Desktop_Environment#Via_a_Display_Manager
install -d %{buildroot}%{_sysconfdir}/lightdm/lightdm.conf.d
cat > %{buildroot}%{_sysconfdir}/lightdm/lightdm.conf.d/deepin.conf <<EOF
[Seat:*]
greeter-session=lightdm-deepin-greeter
EOF
sed -i 's/OnlyShowIn=/X-DEEPIN-OnlyShowIn=/g' \
%{buildroot}%{_datadir}/applications/deepin-toggle-desktop.desktop
%suse_update_desktop_file -r -u deepin-toggle-desktop Settings DesktopSettings X-SuSE-Core-System
%if 0%{?suse_version} < 1330
%post
%icon_theme_cache_post
%desktop_database_post
%postun
%icon_theme_cache_postun
%desktop_database_postun
%endif
%files
%defattr(-,root,root,-)
%doc README.md LICENSE CONTRIBUTING.md CHANGELOG.md
%dir %{_libexecdir}/deepin-daemon
%{_datadir}/icons/hicolor/*/apps/*
%dir %{_datadir}/xgreeters
%files -n lightdm-deepin-greeter
%defattr(-,root,root,-)
%dir %{_sysconfdir}/lightdm
%dir %{_sysconfdir}/lightdm/lightdm.conf.d
%config(noreplace) %{_sysconfdir}/lightdm/lightdm.conf.d/deepin.conf
%{_datadir}/xgreeters/lightdm-deepin-greeter.desktop
%{_bindir}/lightdm-deepin-greeter
%files -n deepin-shutdown
%defattr(-,root,root,-)
%{_bindir}/dde-shutdown
%{_libexecdir}/deepin-daemon/dde-suspend-dialog
%{_libexecdir}/deepin-daemon/dde-warning-dialog
%{_datadir}/dbus-1/services/com.deepin.dde.shutdownFront.service
%files -n deepin-lock
%defattr(-,root,root,-)
%{_bindir}/dde-lock
%{_datadir}/dbus-1/services/com.deepin.dde.lockFront.service
%files -n deepin-switchtogreeter
%defattr(-,root,root,-)
%{_bindir}/dde-switchtogreeter
%{_bindir}/dde-wm-chooser
%{_libexecdir}/deepin-daemon/dde-welcome
%{_datadir}/dbus-1/services/com.deepin.dde.welcome.service
%files -n deepin-lowpower
%defattr(-,root,root,-)
%{_libexecdir}/deepin-daemon/dde-lowpower
%files -n deepin-osd
%defattr(-,root,root,-)
%{_libexecdir}/deepin-daemon/dde-osd
%{_datadir}/dbus-1/services/com.deepin.dde.osd.service
%files -n deepin-hotzone
%defattr(-,root,root,-)
%{_datadir}/applications/deepin-toggle-desktop.desktop
%files -n deepin-warning-dialog
%defattr(-,root,root,-)
%{_bindir}/dmemory-warning-dialog
%{_datadir}/dbus-1/services/com.deepin.dde.MemoryWarningDialog.service
%{_datadir}/dbus-1/services/com.deepin.dde.WarningDialog.service
%files lang
%defattr(-,root,root,-)
%{_datadir}/%{_name}
%changelog