File ddm.spec of Package ddm
#
# spec file for package ddm
#
# Copyright (c) 2024 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%define libver 0
Name: ddm
Version: 0.2.3
Release: 0
Summary: Deepin Display Manager
License: GPL-2.0-or-later
URL: https://github.com/linuxdeepin/ddm
Group: System/GUI/Other
Source0: https://github.com/linuxdeepin/ddm/archive/%{version}/%{name}-%{version}.tar.gz
# PATCH-FOR-UPSTREAM fix-library-dir.patch hillwood@opensuse.org - Do not hardcode library path
#Patch0: fix-library-dir.patch
BuildRequires: chrpath
BuildRequires: fdupes
BuildRequires: extra-cmake-modules
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(pam)
BuildRequires: pkgconfig(treeland-protocols)
BuildRequires: pkgconfig(xau)
BuildRequires: pkgconfig(xcb)
BuildRequires: pkgconfig(Qt6Core)
BuildRequires: pkgconfig(Qt6DBus)
BuildRequires: pkgconfig(Qt6Gui)
BuildRequires: pkgconfig(Qt6Qml)
BuildRequires: pkgconfig(Qt6Quick)
BuildRequires: pkgconfig(Qt6QuickControls2)
BuildRequires: pkgconfig(Qt6Linguist)
BuildRequires: pkgconfig(Qt6Test)
BuildRequires: pkgconfig(Qt6QuickTest)
BuildRequires: pkgconfig(Qt6Xml)
BuildRequires: pkgconfig(Qt6WaylandClient)
BuildRequires: pkgconfig(Qt6Widgets)
%{?systemd_ordering}
%description
DDM is a fork of SDDM. And use single compositor and session management
functionality.
%package -n lib%{name}-auth%{libver}
Summary: DDM auth libraries
Group: System/Libraries
%description -n lib%{name}-auth%{libver}
DDM is a fork of SDDM. And use single compositor and session management
functionality.
This package provides libraries of DDM.
%package -n lib%{name}-common%{libver}
Summary: DDM common libraries
Group: System/Libraries
%description -n lib%{name}-common%{libver}
DDM is a fork of SDDM. And use single compositor and session management
functionality.
This package provides libraries of DDM.
%package devel
Summary: Development tools for ddm
Group: Development/Languages/C and C++
Requires: lib%{name}-auth%{libver} = %{version}-%{release}
Requires: lib%{name}-common%{libver} = %{version}-%{release}
%description devel
The dtkcore-devel package contains the header files and developer
docs for dtkcore.
You shoud firstly read the "Deepin Application Specification".
%prep
%autosetup -p1
%build
%cmake -DLOGIN_DEFS_PATH=%{_distconfdir}/login.defs \
-DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \
-DCMAKE_INSTALL_FULL_SYSCONFDIR=%{_distconfdir}
%cmake_build
%install
%cmake_install
install -d %{buildroot}%{_distconfdir}
mv %{buildroot}%{_sysconfdir}/pam.d %{buildroot}%{_distconfdir}/
chrpath --delete %{buildroot}%{_bindir}/ddm
%fdupes %{buildroot}
%pre
%service_add_pre %{name}.service
%post
%service_add_post %{name}.service
%tmpfiles_create %{_tmpfilesdir}/ddm.conf
%preun
%service_del_preun %{name}.service
%postun
%service_del_postun %{name}.service
%post -n lib%{name}-auth%{libver} -p /sbin/ldconfig
%postun -n lib%{name}-auth%{libver} -p /sbin/ldconfig
%post -n lib%{name}-common%{libver} -p /sbin/ldconfig
%postun -n lib%{name}-common%{libver} -p /sbin/ldconfig
%files
%doc README.md README.zh_CN.md ChangeLog CONTRIBUTORS
%license LICENSES/GPL-2.0-or-later.txt
%{_bindir}/ddm
%dir %{_distconfdir}/pam.d
%{_distconfdir}/pam.d/*
%config %{_sysconfdir}/dbus-1/system.d/org.freedesktop.DisplayManager.conf
%config %{_sysconfdir}/dbus-1/system.d/org.deepin.DisplayManager.conf
%{_prefix}/lib/sysusers.d/dde.conf
%{_prefix}/lib/tmpfiles.d/ddm.conf
%{_libexecdir}/ddm-*
%dir %{_datadir}/ddm
%{_datadir}/ddm/faces
%{_datadir}/ddm/flags
%{_datadir}/ddm/scripts
%{_unitdir}/%{name}.service
%files -n lib%{name}-auth%{libver}
%{_libdir}/lib%{name}-auth.so.*
%files -n lib%{name}-common%{libver}
%{_libdir}/lib%{name}-common.so.*
%files devel
%doc README.md README.zh_CN.md ChangeLog
%{_libdir}/lib%{name}*.so
%{_libdir}/cmake/DDM
%{_includedir}/%{name}
%changelog