File pcmanfm-qt.spec of Package pcmanfm-qt
#
# spec file for package pcmanfm-qt
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#
Name: pcmanfm-qt
Version: 0.14.1
Release: 0
Summary: File manager and desktop icon manager
License: GPL-2.0-or-later
Group: System/GUI/LXQt
URL: https://lxqt.org
Source: https://downloads.lxqt.org/downloads/%{name}/%{version}/%{name}-%{version}.tar.xz
Source1: https://downloads.lxqt.org/downloads/%{name}/%{version}/%{name}-%{version}.tar.xz.asc
Source2: %{name}.keyring
BuildRequires: cmake >= 3.1.0
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: lxqt-build-tools >= 0.6.0
BuildRequires: pkgconfig
BuildRequires: cmake(KF5WindowSystem) >= 5.36.0
BuildRequires: pkgconfig(Qt5Core) >= 5.7.1
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5UiTools)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5X11Extras)
BuildRequires: pkgconfig(libexif)
BuildRequires: pkgconfig(libfm-qt)
BuildRequires: pkgconfig(libmenu-cache) >= 1.1.0
BuildRequires: pkgconfig(lxqt) >= 0.14.1
Requires: %{name}-branding = %{version}
Requires(post): desktop-file-utils
Requires(pre): desktop-file-utils
Recommends: %{name}-lang = %{version}-%{release}
%description
PCManFM-Qt is the Qt port of the LXDE file manager PCManFM
%lang_package
%prep
%setup -q
%package branding-upstream
Summary: Upstream branding of %{name}
Group: System/GUI/LXQt
Requires: %{name} = %{version}
Supplements: (%{name} and branding-upstream)
Conflicts: %{name}-branding
Provides: %{name}-branding = %{version}
BuildArch: noarch
%description branding-upstream
This package provides the upstream look and feel for %{name}.
%build
%cmake
make %{?_smp_mflags}
%install
%cmake_install
%fdupes -s %{buildroot}%{_datadir}
install -Dm 0644 %{buildroot}%{_datadir}/%{name}/lxqt/settings.conf -t %{buildroot}%{_sysconfdir}/xdg/%{name}/lxqt/
sed -i 's/^\(Archiver=\).*/\1lxqt-archiver/' \
%{buildroot}%{_sysconfdir}/xdg/%{name}/lxqt/settings.conf
sed -i 's/^\(IconThemeName=\).*/\1breeze/' \
%{buildroot}%{_sysconfdir}/xdg/%{name}/lxqt/settings.conf
sed -i '/^IconThemeName=/s/$/\nFallbackIconThemeName=oxygen/' \
%{buildroot}%{_sysconfdir}/xdg/%{name}/lxqt/settings.conf
sed -i "s|^\(Wallpaper=\).*|\1%{_datadir}/wallpapers/openSUSEdefault/contents/images/1920x1080.jpg|" \
%{buildroot}%{_sysconfdir}/xdg/%{name}/lxqt/settings.conf
if ! grep "DesktopShortcuts=" %{buildroot}%{_sysconfdir}/xdg/%{name}/lxqt/settings.conf ; then
sed -i 's/\(\[Desktop\]\)/\1\nDesktopShortcuts=Home, Trash, Computer/' \
%{buildroot}%{_sysconfdir}/xdg/%{name}/lxqt/settings.conf
fi
%find_lang %{name} --with-qt
%if 0%{?suse_version} < 1500
%post
%desktop_database_post
%postun
%desktop_database_postun
%endif
%files
%license LICENSE
%doc AUTHORS CHANGELOG README.md
%dir %{_datadir}/%{name}/
%dir %{_datadir}/%{name}/lxqt/
%dir %{_sysconfdir}/xdg/autostart/
%{_bindir}/%{name}
%{_datadir}/applications/*.desktop
%{_mandir}/man?/%{name}.?%{ext_man}
%{_sysconfdir}/xdg/autostart/lxqt-desktop.desktop
%{_datadir}/%{name}/lxqt/settings.conf
%files branding-upstream
%dir %{_sysconfdir}/xdg/%{name}/
%dir %{_sysconfdir}/xdg/%{name}/lxqt/
%config %{_sysconfdir}/xdg/%{name}/lxqt/settings.conf
%files lang -f %{name}.lang
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/translations
%changelog