File deepin-application-manager.spec of Package deepin-application-manager

#
# spec file for package deepin-application-manager
#
# Copyright (c) 2026 SUSE LLC
# Copyright (c) 2026 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 https://bugs.opensuse.org/
#

%define  _name  dde-application-manager
%define  dtkver 6
%if 0%{?suse_version} < 1600
%define  _distconfdir %{_prefix}/etc
%endif

Name:           deepin-application-manager
Version:        1.2.48
Release:        0
Summary:        DDE Application Manager
License:        GPL-3.0-or-later
URL:            https://github.com/linuxdeepin/dde-application-manager
Source0:        https://github.com/linuxdeepin/dde-application-manager/archive/%{version}/%{_name}-%{version}.tar.gz
BuildRequires:  qt6-tools-linguist
BuildRequires:  pkgconfig
BuildRequires:  gtest
BuildRequires:  systemd-rpm-macros
BuildRequires:  cmake(Qt6WaylandClientPrivate)
BuildRequires:  pkgconfig(dtk%{dtkver}core)
BuildRequires:  pkgconfig(dtk%{dtkver}gui)
BuildRequires:  pkgconfig(dtk%{dtkver}widget)
BuildRequires:  pkgconfig(Qt6Concurrent)
BuildRequires:  pkgconfig(Qt6Core)
BuildRequires:  pkgconfig(Qt6DBus)
BuildRequires:  pkgconfig(Qt6Gui)
BuildRequires:  pkgconfig(Qt6WaylandClient)
BuildRequires:  pkgconfig(Qt6Xml)
BuildRequires:  pkgconfig(gio-2.0)
BuildRequires:  pkgconfig(gio-unix-2.0)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(libcap)
BuildRequires:  pkgconfig(libsystemd)
BuildRequires:  pkgconfig(treeland-protocols)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xcb)
BuildRequires:  pkgconfig(xcb-ewmh)
BuildRequires:  pkgconfig(xcb-icccm)
BuildRequires:  pkgconfig(xres)
%if 0%{?suse_version} < 1600
BuildRequires:  gcc13-c++
%endif
Recommends:     %{name}-lang = %{version}
%{?systemd_ordering}

%description
DDE Application Manager is the app manager of Deepin Desktop Environment.

%package devel
Summary:       Development file for DDE Application Manager
Requires:      %{name} = %{version}-%{release}

%description devel
Development file for DDE Application Manager.

#%lang_package

%prep
%autosetup -p1 -n %{_name}-%{version}

%build
%if 0%{?suse_version} < 1600
    export CXX=g++-13
%endif
%cmake
%cmake_build

%install
%cmake_install

# openSUSE dosen not use app-update-notifier to update system.
rm %{buildroot}%{_libexecdir}/deepin/application-manager/app-update-notifier
rm %{buildroot}%{_datadir}/dbus-1/system-services/org.desktopspec.ApplicationUpdateNotifier1.service
rm %{buildroot}%{_datadir}/dbus-1/system.d/org.desktopspec.ApplicationUpdateNotifier1.conf
rm %{buildroot}%{_unitdir}/org.desktopspec.ApplicationUpdateNotifier1.service

#%pre
#%service_add_pre org.desktopspec.ApplicationUpdateNotifier1.service

#%post
#%service_add_post org.desktopspec.ApplicationUpdateNotifier1.service

#%preun
#%service_del_preun org.desktopspec.ApplicationUpdateNotifier1.service

#%postun
#%service_del_postun org.desktopspec.ApplicationUpdateNotifier1.service

%files
%license LICENSE
%doc README.md README.zh_CN.md
%if 0%{?suse_version} < 1600
%dir %{_distconfdir}
%endif
%dir %{_distconfdir}/dpkg
%dir %{_distconfdir}/dpkg/dpkg.cfg.d
%{_distconfdir}/dpkg/dpkg.cfg.d/am-update-hook
%dir %{_libexecdir}/deepin
%{_libexecdir}/deepin/application-manager
%{_bindir}/dde-*
%{_bindir}/app-identifier
%{_datadir}/dbus-1/services/org.desktopspec.ApplicationManager1.service
%{_datadir}/%{_name}
%dir %{_datadir}/deepin
%{_datadir}/deepin/%{_name}
%{_userunitdir}/*
%dir %{_datadir}/dsg
%dir %{_datadir}/dsg/configs
%{_datadir}/dsg/configs/org.deepin.dde.application-manager
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/dde-am

%files devel
%dir %{_libdir}/cmake/DDEApplicationManager
%{_libdir}/cmake/DDEApplicationManager/DDEApplicationManagerConfig.cmake

%changelog
openSUSE Build Service is sponsored by