File libfm-qt.spec of Package libfm-qt
#
# spec file for package libfm-qt
#
# 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 _qtver 5.10.0
%define _ver 14
Name: libfm-qt
Version: @SERVICE@
Release: 0
Summary: Library providing components to build desktop file managers
License: LGPL-2.1+
Group: Development/Libraries/C and C++
Url: http://lxqt.org
Source: %{name}-%{version}.tar.xz
BuildRequires: cmake >= 3.0.2
# Needs private headers, see xdndworkaround.cpp
BuildRequires: libQt5Gui-private-headers-devel
BuildRequires: libqt5-qttools-devel
BuildRequires: lxqt-build-tools
BuildRequires: pkgconfig
BuildRequires: cmake(KF5WindowSystem)
BuildRequires: cmake(Qt5LinguistTools)
BuildRequires: pkgconfig(Qt5Widgets) >= %{_qtver}
BuildRequires: pkgconfig(Qt5X11Extras)
BuildRequires: pkgconfig(Qt5Xdg)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(gio-unix-2.0)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libexif)
BuildRequires: pkgconfig(libfm) >= 1.2.0
BuildRequires: pkgconfig(libmenu-cache) >= 0.4.0
BuildRequires: pkgconfig(lxqt)
BuildRequires: pkgconfig(x11)
BuildRequires: cmake(lxqt-menu-data)
Provides: %{name}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Libfm-Qt is a companion library providing components to build desktop file managers
%lang_package
%package -n %{name}%{_ver}
Summary: Libfm-qt libraries
Group: System/Libraries
Recommends: %{name}-lang = %{version}-%{release}
Conflicts: pcmanfm <= 0.10.0
%description -n %{name}%{_ver}
Libfm-Qt is a companion library providing components to build desktop file managers
%package devel
Summary: Development files for libfm-qt
Group: Development/Libraries/C and C++
Requires: %{name}%{_ver} >= %{version}
Requires: pkgconfig
%description devel
Libfm-Qt libraries for development
%prep
# RPM build errors: Empty file debugsourcefiles.list
%if 0%{?fedora_version}
%global debug_package %{nil}
%endif
%setup -q
%build
%if 0%{?fedora_version}
mkdir build
pushd ./build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make %{?_smp_mflags}
popd
%else
%cmake
make %{?_smp_mflags}
%endif
%install
%if 0%{?fedora_version}
make %{?_smp_mflags} VERBOSE=1 DESTDIR=%{buildroot} install/fast -C build
%else
%cmake_install
%endif
%find_lang %{name} --with-qt
%post -n %{name}%{_ver} -p /sbin/ldconfig
%postun -n %{name}%{_ver} -p /sbin/ldconfig
%files -n %{name}%{_ver}
%defattr(-,root,root)
%{_libdir}/%{name}.so.*
%files devel
%defattr(-,root,root)
%dir %{_datadir}/cmake/fm-qt
%dir %{_datadir}/%{name}/
%{_includedir}/%{name}/
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_datadir}/cmake/fm-qt/fm-qt-config-version.cmake
%{_datadir}/cmake/fm-qt/fm-qt-config.cmake
%{_datadir}/cmake/fm-qt/fm-qt-targets-*.cmake
%{_datadir}/cmake/fm-qt/fm-qt-targets.cmake
%{_datadir}/%{name}/archivers.list
%{_datadir}/%{name}/terminals.list
%{_datadir}/mime/packages/%{name}-mimetypes.xml
%files lang -f %{name}.lang
%defattr(-,root,root)
%dir %{_datadir}/%{name}/translations/
%{_datadir}/%{name}/translations/%{name}_arn.qm
%{_datadir}/%{name}/translations/%{name}_ast.qm
%changelog