Blob Blame History Raw

Name:    kfind
Summary: KDE Find File Utility
Version: 16.12.1
Release: 1%{?dist}

# Documentation is GFDL, rest GPLv2+
License: GPLv2+ and GFDL
URL:     https://www.kde.org/applications/utilities/kfind/

%global revision %(echo %{version} | cut -d. -f3)
%if %{revision} >= 50
%global stable unstable
%else
%global stable stable
%endif
Source0: http://download.kde.org/%{stable}/applications/%{version}/src/%{name}-%{version}.tar.xz

BuildRequires: extra-cmake-modules
BuildRequires: kf5-rpm-macros
BuildRequires: cmake(KF5Archive)
BuildRequires: cmake(KF5DocTools)
BuildRequires: cmake(KF5KDELibs4Support)
BuildRequires: cmake(Qt5Core)
BuildRequires: cmake(Qt5Widgets)
BuildRequires: desktop-file-utils
BuildRequires: libappstream-glib

Requires:      hicolor-icon-theme
Requires:      kf5-filesystem

%description
KFind allows you to search for directories and files.


%prep
%autosetup -p1


%build
mkdir %{_target_platform}
pushd %{_target_platform}
%{cmake_kf5} ..
popd

make %{?_smp_mflags} -C %{_target_platform}


%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}


%check
appstream-util validate-relax --nonet %{buildroot}%{_kf5_datadir}/appdata/org.kde.%{name}.appdata.xml ||:
desktop-file-validate %{buildroot}%{_kf5_datadir}/applications/org.kde.%{name}.desktop

%post
touch --no-create %{_kf5_datadir}/icons/hicolor &> /dev/null || :

%posttrans
gtk-update-icon-cache %{_kf5_datadir}/icons/hicolor &> /dev/null || :
update-desktop-database -q &> /dev/null ||:

%postun
if [ $1 -eq 0 ] ; then
touch --no-create %{_kf5_datadir}/icons/hicolor &> /dev/null || :
gtk-update-icon-cache %{_kf5_datadir}/icons/hicolor &> /dev/null || :
update-desktop-database -q &> /dev/null ||:
fi


%files
%license COPYING COPYING.DOC
%{_kf5_bindir}/%{name}
%{_kf5_datadir}/appdata/org.kde.%{name}.appdata.xml
%{_kf5_datadir}/applications/org.kde.%{name}.desktop
%{_kf5_datadir}/icons/hicolor/*/apps/kfind.*
%{_mandir}/man1/kfind.1*
%lang(en) %{_kf5_datadir}/doc/HTML/en/%{name}


%changelog
* Sat Jan 28 2017 Rex Dieter <rdieter@fedoraproject.org> - 16.12.1-1
- import

* Fri Jan 20 2017 Christian Dersch <lupinix@mailbox.org> - 16.12.1-0.1
- initial packaging effort