## START: Set by rpmautospec %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 7; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec # Generated by rust2rpm 17 %bcond_without check %global __cargo_skip_build 0 %global crate image-roll Name: rust-%{crate} Version: 1.2.0 Release: %autorelease Summary: Image Roll is a simple and fast GTK image viewer # Upstream license specification: MIT for image-roll and CC0 for metainfo License: MIT and CC0 URL: https://crates.io/crates/image-roll Source: %{crates_source} # Initial patched metadata # * Upgrade approx to 0.5 # https://github.com/weclaw1/image-roll/pull/24 Patch0: image-roll-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging BuildRequires: desktop-file-utils BuildRequires: libappstream-glib %global _description %{expand: Image Roll is a simple and fast GTK image viewer with basic image manipulation tools.} %description %{_description} %package -n %{crate} Summary: %{summary} # ASL 2.0 # ASL 2.0 or MIT # MIT # MIT or ASL 2.0 # Unlicense or MIT License: ASL 2.0 and MIT and Unlicense %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE %doc README.md %{_bindir}/image-roll %{_datadir}/applications/image-roll.desktop %{_datadir}/metainfo/image-roll.metainfo.xml %{_datadir}/icons/hicolor/scalable/apps/image-roll.svg %{_datadir}/icons/hicolor/symbolic/apps/image-roll.svg %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install install -dm 755 %{buildroot}%{_datadir}/applications install -pm 644 src/resources/com.github.weclaw1.ImageRoll.desktop %{buildroot}%{_datadir}/applications/image-roll.desktop install -dm 755 %{buildroot}%{_datadir}/metainfo install -pm 644 src/resources/com.github.weclaw1.ImageRoll.metainfo.xml %{buildroot}%{_datadir}/metainfo/image-roll.metainfo.xml install -dm 755 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps install -pm 644 src/resources/com.github.weclaw1.ImageRoll.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/image-roll.svg install -dm 755 %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps install -pm 644 src/resources/com.github.weclaw1.ImageRoll-symbolic.svg %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps/image-roll.svg desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml %if %{with check} %check %cargo_test %endif %changelog * Sat Jul 17 2021 Robert-André Mauchin 1.2.0-7 - Add checks for the .desktop and appdata files * Sat Jun 26 2021 Rémi Lauzier - 1.2.0-1 - Update to 1.2.0. - Fixes RHBZ#1976469 * Tue Jun 22 2021 Rémi Lauzier - 1.1.1-2 - Include .desktop, metainfo and icons - Fix license * Sun Jun 13 2021 Rémi Lauzier - 1.1.1-1 - Initial package