File deepin-branding-openSUSE.spec of Package deepin-branding-openSUSE

#
# spec file for package deepin-branding-openSUSE
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2024 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 deepin_desktop_schemas_version %(rpm -q --queryformat '%%{VERSION}' deepin-desktop-schemas)
%define deepin_launchpad_version %(rpm -q --queryformat '%%{VERSION}' deepin-launchpad)
%define deepin_desktop_theme_version %(rpm -q --queryformat '%%{VERSION}' deepin-desktop-theme)

Name:           deepin-branding-openSUSE
Version:        16.0
Release:        0
Summary:        openSUSE Branding of the Deepin Desktop Environment
License:        GPL-2.0-or-later
Group:          System/GUI/Other
URL:            https://github.com/linuxdeepin
Source0:        deepin-launcher.svg
Source1:        com.deepin.dde.appearance.gschema.xml
Source2:        com.deepin.dde.desktop.gschema.xml
Source3:        com.deepin.dde.dock.gschema.xml
Source4:        com.deepin.xsettings.gschema.xml
Source5:        index.theme
BuildRequires:  fdupes
BuildRequires:  deepin-desktop-schemas
BuildRequires:  deepin-desktop-theme
BuildRequires:  deepin-icon-theme
BuildRequires:  deepin-launchpad
BuildRequires:  deepin-wallpapers
BuildRequires:  wallpaper-branding-openSUSE
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This package provides the openSUSE look and feel for the deepin desktop environment.

%package -n deepin-desktop-schemas-branding-openSUSE
Summary:        openSUSE Branding of the Deepin Desktop Environment
Group:          System/GUI/Other
Requires:       deepin-desktop-schemas
Conflicts:      otherproviders(deepin-desktop-schemas-branding)
Provides:       deepin-desktop-schemas-branding = %{deepin_desktop_schemas_version}
Supplements:    packageand(deepin-desktop-schemas:branding-openSUSE)

%description -n deepin-desktop-schemas-branding-openSUSE
This package provides the openSUSE definition for Deepin Desktop GSchemas.

%package -n deepin-launchpad-branding-openSUSE
Summary:        openSUSE Branding of the Deepin launchpad
Group:          System/GUI/Other
Requires:       deepin-launchpad
Conflicts:      otherproviders(deepin-launchpad-branding)
Provides:       deepin-launchpad-branding = %{deepin_launchpad_version}
Supplements:    packageand(deepin-launchpad:branding-openSUSE)

%description -n deepin-launchpad-branding-openSUSE
This package provides the openSUSE Logo for the deepin-launchpad

%package -n deepin-desktop-theme-branding-openSUSE
Summary:        openSUSE Branding of the Deepin Desktop Theme
Group:          System/GUI/Other
Requires:       deepin-desktop-theme
Conflicts:      otherproviders(deepin-desktop-theme-branding)
Provides:       deepin-desktop-theme-branding = %{deepin_launchpad_version}
Supplements:    packageand(deepin-desktop-theme:branding-openSUSE)
Requires:       wallpaper-branding-openSUSE

%description -n deepin-desktop-theme-branding-openSUSE
This package provides the openSUSE default theme for the deepin-desktop-theme

%prep

%build

%install
install -d %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
install -d %{buildroot}%{_datadir}/glib-2.0/schemas/
install -d %{buildroot}%{_datadir}/deepin-themes/bloom
install -d %{buildroot}%{_datadir}/wallpapers/deepin
install -m 0644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/glib-2.0/schemas/
install -m 0644 %{SOURCE5} %{buildroot}%{_datadir}/deepin-themes/bloom/
ln -sf %{_datadir}/wallpapers/openSUSEdefault/contents/images/1920x1200.png \
%{buildroot}%{_datadir}/wallpapers/deepin/openSUSE.png

pushd %{_datadir}/icons/bloom/places
ICON=`ls`
popd
for i in $ICON
do
    install -d %{buildroot}%{_datadir}/icons/bloom/places/$i/
    install -m 0644 %{SOURCE0} %{buildroot}%{_datadir}/icons/bloom/places/$i/
    install -d %{buildroot}%{_datadir}/icons/bloom-dark/places/$i/
    install -m 0644 %{SOURCE0} %{buildroot}%{_datadir}/icons/bloom-dark/places/$i/
done

%fdupes %{buildroot}%{_datadir}

%files -n deepin-desktop-schemas-branding-openSUSE
%defattr(-,root,root,-)
%{_datadir}/glib-2.0/schemas/*.xml

%files -n deepin-launchpad-branding-openSUSE
%defattr(-,root,root,-)
%{_datadir}/icons/bloom
%{_datadir}/icons/bloom-dark

%files -n deepin-desktop-theme-branding-openSUSE
%defattr(-,root,root,-)
%{_datadir}/deepin-themes/bloom/index.theme
%{_datadir}/wallpapers/deepin/openSUSE.png

%changelog
openSUSE Build Service is sponsored by