%global _hardened_build 1 %global cmake_pkg cmake %if 0%{?rhel} %if 0%{?rhel} < 7 %global cmake_pkg cmake28 %endif %endif Name: wcm Version: 0.20.0 Release: 4%{?dist} Summary: WCM Commander License: MIT Url: https://github.com/corporateshark/WalCommander Source0: https://github.com/corporateshark/WalCommander/archive/release-%{version}.tar.gz # https://github.com/corporateshark/WCMCommander/issues/505 Source1: %{name}.appdata.xml # https://github.com/corporateshark/WCMCommander/issues/504 Source3: wcm.1.gz # https://github.com/corporateshark/WCMCommander/issues/508 Patch0: %{name}-0.19.0.1.patch # https://github.com/corporateshark/WCMCommander/issues/503 Source2: FindUtf8proc.cmake Patch1: wcm-utf8proc.patch BuildRequires: utf8proc-devel # https://github.com/corporateshark/WCMCommander/issues/507 Patch2: wcm-changelog.patch BuildRequires: %{cmake_pkg} >= 2.8 BuildRequires: desktop-file-utils # libsmbclient-devel BuildRequires: pkgconfig(smbclient) # libssh2-devel BuildRequires: pkgconfig(libssh2) # freetype-devel BuildRequires: pkgconfig(freetype2) # libX11-devel BuildRequires: pkgconfig(x11) BuildRequires: ImageMagick %if 0%{?fedora} BuildRequires: libappstream-glib %endif Requires: hicolor-icon-theme %description File manager mimicking the look-n-feel of Far Manager. %prep %setup0 -q -n WCMCommander-release-%{version} %patch0 -p 0 %if 0%{?fedora} %patch1 -p 0 cp %{SOURCE2} cmake/ rm -rf src/utf8proc %endif %patch2 -p 0 # https://github.com/corporateshark/WCMCommander/issues/490 rm -rf install-files/share/wcm/fonts rm -rf libssh2 # https://github.com/corporateshark/WCMCommander/issues/506 rm -f install-files/share/wcm/styles/solarize* rm -f tools/* %build mkdir build pushd build %{?cmake28}%{!?cmake28:%{?cmake}} \ -DCMAKE_BUILD_TYPE=RelWithDebInfo %cmakeflags .. make %{?_smp_mflags} popd %install pushd build %{make_install} popd desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop # appdata install -Dm 0644 %{SOURCE1} %{buildroot}/%{_datadir}/appdata/wcm.appdata.xml %if 0%{?fedora} appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/wcm.appdata.xml %endif # additional icons # https://github.com/corporateshark/WCMCommander/issues/371 for i in 16x16 22x22 24x24 32x32 48x48 64x64 72x72 96x96 128x128 do mkdir -p %{buildroot}/%{_datadir}/icons/hicolor/$i/apps convert install-files/share/pixmaps/wcm.png -resize $i %{buildroot}/%{_datadir}/icons/hicolor/$i/apps/wcm.png; done install -Dm 0644 %{SOURCE3} %{buildroot}/%{_mandir}/man1/%{name}.1.gz %post /usr/bin/update-desktop-database &> /dev/null || : %postun if [ $1 -eq 0 ] ; then /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi /usr/bin/update-desktop-database &> /dev/null || : %posttrans /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files %doc CHANGELOG.txt Contributors.txt README.md %license LICENSE %{_bindir}/%{name} %{_datadir}/%{name}/ %{_datadir}/applications/%{name}.desktop %{_datadir}/appdata/%{name}.appdata.xml %{_datadir}/pixmaps/%{name}.png %{_datadir}/icons/hicolor/*/apps/%{name}.png %{_mandir}/man1/%{name}.1.gz %changelog * Mon Aug 17 2015 TI_Eugene 0.20.0-4 - hicolor-icon-theme added as Requires - fixed source tarball name - post, postun and posttrans fixes - some unwanted files removed - generic man added * Thu Aug 13 2015 TI_Eugene 0.20.0-3 - system utf8proc * Wed Aug 12 2015 TI_Eugene 0.20.0-2 - wcm.appdata.xml added - additional icons added * Tue May 05 2015 TI_Eugene 0.20.0-1 - Version bump * Mon Dec 15 2014 TI_Eugene 0.18.0-1 - Version bump - Minor spec fixes. * Wed Oct 08 2014 TI_Eugene 0.17.0-1 - initial packaging