File deepin-desktop-base.spec of Package deepin-desktop-base
# spec file for package deepin-desktop-base
#
# 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 _version 2018.10.29
%define system_version %(rpm -q --queryformat '%%{VERSION}' openSUSE-release)
%if 0%{?suse_version} > 1500
%define system_branch Tumbleweed
%else
%define system_branch Leap
%endif
Name: deepin-desktop-base
Version: 15.5
Release: 0
Summary: Base component for Deepin
License: GPL-3.0
URL: https://github.com/linuxdeepin/deepin-desktop-base
Source0: https://github.com/linuxdeepin/deepin-desktop-base/archive/%{_version}/%{name}-%{_version}.tar.gz
Group: System/GUI/Other
BuildArch: noarch
BuildRequires: openSUSE-release
Recommends: deepin-wallpapers
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This package provides some components for Deepin desktop environment.
- deepin logo
- deepin desktop version
- login screen background image
- language information
%prep
%setup -q -n %{name}-%{_version}
# Remove Deepin distro's lsb-release
# Don't override systemd timeouts
# Remove apt-specific templates
sed -i -E '/lsb-release|systemd|apt/d' Makefile
# Fix data path
sed -i 's|/usr/lib|%{_datadir}|' Makefile
# Use openSUSE information instead.
sed -i 's|@@VERSION@@|branch version|g; s|Desktop||g; s|桌面版||g' files/{desktop-version.in,lsb-release.in}
sed -i "s|branch|%{system_branch}|g; s|version|%{system_version}|g" files/{desktop-version.in,lsb-release.in}
sed -i 's|Deepin|openSUSE|g' files/lsb-release.in
%build
make %{?_smp_mflags}
%install
%make_install
# Make a symlink for deepin-version
ln -sfv %{_datadir}/deepin/desktop-version %{buildroot}/etc/deepin-version
%files
%defattr(-,root,root,-)
%doc LICENSE CHANGELOG.md
%config(noreplace) %{_sysconfdir}/appstore.json
%{_sysconfdir}/deepin-version
%dir %{_datadir}/backgrounds/
%dir %{_datadir}/backgrounds/deepin/
%dir %{_datadir}/deepin/
%{_datadir}/deepin/desktop-version
%dir %{_datadir}/distro-info
%{_datadir}/distro-info/deepin.csv
%dir %{_datadir}/i18n
%{_datadir}/i18n/i18n_dependent.json
%{_datadir}/i18n/language_info.json
%dir %{_datadir}/plymouth
%{_datadir}/plymouth/deepin-logo.png
%changelog