File deepin-session-shell.spec of Package deepin-session-shell
#
# spec file for package deepin-session-shell
#
# Copyright (c) 2022 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2022 Hillwood Yang <hillwood@opensuse.org>
#
# 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-shell
Name: deepin-session-shell
Version: 6.0.46
Release: 0
Summary: Deepin desktop-environment - Session UI Shell
License: GPL-3.0+
URL: https://github.com/linuxdeepin/dde-session-shell-snipe
Source0: https://github.com/linuxdeepin/dde-session-shell-snipe/archive/%{version}/%{_name}-snipe-%{version}.tar.gz
# Source1: https://github.com/linuxdeepin/startdde/raw/master/misc/lightdm.conf
# PATCH-FOR-UPSTREAM do-not-hardcode-module-dir.patch hillwood@opensuse.org - Use variable instead of hardcode for module dir
Patch0: do-not-hardcode-module-dir.patch
# PATCH-FOR-UPSTREAM fix-qdbusxml2cpp-path.patch hillwood@opensuse.org - Search qdbusxml2cpp in /usr/lib64
Patch1: fix-qdbusxml2cpp-path.patch
Group: System/GUI/Other
BuildRequires: deepin-dock-devel > 6.0.35
BuildRequires: gtest
BuildRequires: update-desktop-files
BuildRequires: deepin-gettext-tools
BuildRequires: dtk6core
BuildRequires: qt6-tools-linguist
BuildRequires: pam-devel
BuildRequires: lightdm
%if 0%{?suse_version} <= 1500
BuildRequires: lightdm-gtk-greeter
BuildRequires: plasma5-theme-openSUSE
%else
BuildRequires: plasma6-theme-openSUSE
%endif
BuildRequires: pkgconfig(dtk6widget)
BuildRequires: cmake(KWayland)
BuildRequires: pkgconfig(dde-dock)
BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: pkgconfig(liblightdm-qt6-3)
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(libdeepin_pw_check)
BuildRequires: pkgconfig(Qt6Core)
BuildRequires: pkgconfig(Qt6DBus)
BuildRequires: pkgconfig(Qt6Svg)
BuildRequires: pkgconfig(Qt6Xml)
BuildRequires: pkgconfig(Qt6Linguist)
BuildRequires: pkgconfig(Qt6Multimedia)
BuildRequires: pkgconfig(Qt6Sql)
BuildRequires: pkgconfig(Qt6PrintSupport)
BuildRequires: pkgconfig(Qt6Concurrent)
BuildRequires: pkgconfig(Qt6Test)
BuildRequires: pkgconfig(xcursor)
BuildRequires: pkgconfig(xtst)
BuildRequires: pkgconfig(xcb-ewmh)
BuildRequires: pkgconfig(xrandr)
BuildRequires: pkgconfig(openssl)
Requires: deepin-wallpapers
Recommends: %{name}-lang = %{version}-%{release}
Recommends: %{name}-plugin-network
%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 lightdm-deepin-greeter
Summary: Simple display manager (Deepin Desktop)
Group: System/X11/Displaymanagers
Requires: lightdm
Requires: deepin-start
Requires: libgnome-keyring0
Recommends: %{name}-lang = %{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 pam
Summary: The PAM Module of deepin session shell
Requires: %{name}
%description pam
The PAM Module of deepin session shell.
%package devel
Summary: Development tools for deepin-session-shell
Group: Development/Languages/C and C++
%description devel
The deepin-session-shell-devel package contains the header files and developer
docs for deepin-session-shell-devel.
%lang_package
%prep
%autosetup -p1 -n %{_name}-snipe-%{version}
#sed -i 's|lrelease|lrelease-qt5|g' translate_generation.sh
# sed -i 's|qdbusxml2cpp|qdbusxml2cpp-qt5|g' CMakeLists.txt
sed -i 's|backgrounds/default_background.jpg|wallpapers/deepin/openSUSE.png|g' \
src/widgets/fullscreenbackground.cpp
sed -i 's|backgrounds/deepin/desktop.jpg|wallpapers/deepin/openSUSE.png|g' \
src/session-widgets/lockcontent.cpp
cp %{_datadir}/icons/hicolor/scalable/apps/openSUSE-distributor-logo.svg src/widgets/img/logo.svg
sed -i "/PIXMAP_WIDTH/s|128|284|" src/widgets/logowidget.cpp
sed -i "/PIXMAP_HEIGHT/s|132|396|" src/widgets/logowidget.cpp
sed -i "s|KF5/KWayland/Client|KF5/KWayland/KWayland/Client|g" src/global_util/keyboardmonitor/keyboardplantform_wayland.cpp
%build
# mkdir build
# cd build
%cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \
-DCMAKE_INSTALL_LIBDIR=%{_libdir}
%cmake_build
%install
%cmake_install
# install -Dm644 %{SOURCE1} %{buildroot}%{_datadir}/lightdm/lightdm.conf.d/60-deepin.conf
chmod +x %{buildroot}%{_bindir}/*
%if 0%{?suse_version} > 1500
mkdir -p %{buildroot}%{_pam_vendordir}
mv %{buildroot}%{_sysconfdir}/pam.d/dde-lock %{buildroot}%{_pam_vendordir}/dde-lock
rm -rf %{buildroot}%{_sysconfdir}/pam.d/
%endif
%find_lang %{_name} --with-qt
rm %{buildroot}%{_datadir}/dde-session-shell/dde-session-shell.conf
%files
%doc README.md README.zh_CN.md
%license LICENSE
#%config %{_sysconfdir}/xdg/autostart/dde-lock.desktop
%if 0%{?suse_version} > 1500
%{_pam_vendordir}/dde-lock
%else
%config %{_sysconfdir}/pam.d/dde-lock
%endif
%{_bindir}/dde-*
%{_bindir}/deepin-greeter
#%dir %{_libdir}/dde-session-shell
#%dir %{_libdir}/dde-session-shell/modules
#%{_libdir}/dde-session-shell/modules/*.so
%dir %{_sysconfdir}/deepin
%dir %{_sysconfdir}/deepin/greeters.d
%config %{_sysconfdir}/deepin/greeters.d/00-xrandr
%{_datadir}/dbus-1/services/*.service
%{_datadir}/applications/*.desktop
#%{_datadir}/glib-2.0/schemas/com.deepin.dde.session-shell.gschema.xml
%dir %{_datadir}/deepin-authentication/
%dir %{_datadir}/deepin-authentication/privileges
%{_datadir}/deepin-authentication/privileges/lightdm-deepin-greeter.conf
%dir %{_datadir}/dsg
%dir %{_datadir}/dsg/configs
%dir %{_datadir}/dsg/configs/org.deepin.dde.lightdm-deepin-greeter
%dir %{_datadir}/dsg/configs/org.deepin.dde.lock
%dir %{_datadir}/dsg/configs/org.deepin.dde.session-shell
%{_datadir}/dsg/configs/org.deepin.dde.lightdm-deepin-greeter/org.deepin.dde.lightdm-deepin-greeter.json
%{_datadir}/dsg/configs/org.deepin.dde.lock/org.deepin.dde.lock.json
%{_datadir}/dsg/configs/org.deepin.dde.session-shell/org.deepin.dde.session-shell.json
%dir %{_datadir}/%{_name}
%{_datadir}/%{_name}/greeters.d
%{_datadir}/deepin-log-viewer
%{_datadir}/deepin-debug-config
%files pam
%{_libdir}/security/pam_inhibit_autologin.so
%files -n lightdm-deepin-greeter
%doc README.md README.zh_CN.md
%license LICENSE
%dir %{_sysconfdir}/lightdm/deepin
%config %{_sysconfdir}/lightdm/deepin/qt-theme.ini
%{_bindir}/lightdm-deepin-greeter
%config %{_sysconfdir}/deepin/greeters.d/lightdm-deepin-greeter
%config %{_sysconfdir}/deepin/greeters.d/10-cursor-theme
%{_datadir}/lightdm/lightdm.conf.d/50-deepin.conf
%dir %{_datadir}/xgreeters
%{_datadir}/xgreeters/lightdm-deepin-greeter.desktop
%files devel
%{_includedir}/%{_name}
%{_libdir}/cmake/DdeSessionShell
%files lang -f %{_name}.lang
%dir %{_datadir}/%{_name}/translations
%{_datadir}/%{_name}/translations/%{_name}.qm
%if 0%{?suse_version} < 1600
%lang(ady) %{_datadir}/%{_name}/translations/%{_name}_ady.qm
%lang(ast) %{_datadir}/%{_name}/translations/%{_name}_ast.qm
%lang(cgg) %{_datadir}/%{_name}/translations/%{_name}_cgg.qm
%lang(fil) %{_datadir}/%{_name}/translations/%{_name}_fil.qm
%lang(kab) %{_datadir}/%{_name}/translations/%{_name}_kab.qm
%lang(pam) %{_datadir}/%{_name}/translations/%{_name}_pam.qm
%lang(tzm) %{_datadir}/%{_name}/translations/%{_name}_tzm.qm
%endif
%changelog