Sophie

Sophie

distrib > Mageia > 9 > x86_64 > by-pkgid > 18b3471331f9f19b5be3a474b4515eb3 > files > 4

czkawka-6.0.0-1.mga9.src.rpm

%bcond_with check
%define debug_package %{nil}

# To update this package you have to do it in a sequence
#
# 1. Update Version to the latest release in spec file
# 2. Go in to the SOURCES directory and run script in Source100: pack-cargo-vendor.sh
# 3. Build or send to the Build System
#
# cargo has to be installed

Summary:	Multi functional app to find duplicates, empty folders and other
Name:		czkawka
Version:	6.0.0
Release:	%mkrel 1
License:	MIT
Group:      File tools
URL:		https://github.com/qarmin/czkawka
Source0:	https://github.com/qarmin/czkawka/archive/%{version}/czkawka-%{version}.tar.gz
Source1:	czkawka-cargo-vendor-%{version}.tar.xz
Source2:    cargo.config
# Used for building czkawka-cargo-vendor-.tar.xz
Source100:  pack-cargo-vendor.sh

BuildRequires:	rust-packaging
BuildRequires:	rust
BuildRequires:	rust-src
BuildRequires:	cargo
BuildRequires:	cargo-c
BuildRequires:	pkgconfig(xkbcommon)
BuildRequires:	pkgconfig(glib-2.0)
BuildRequires:	pkgconfig(alsa)
BuildRequires:	pkgconfig(atk)
BuildRequires:	pkgconfig(cairo)
BuildRequires:	pkgconfig(pango)
BuildRequires:  pkgconfig(gtk4)
BuildRequires:	pkgconfig(gdk-pixbuf-2.0)
BuildRequires:	pkgconfig(gdk-3.0) >= 3.22
BuildRequires:	hicolor-icon-theme

%description
Czkawka is simple, fast and easy to use alternative to Fslint, written in Rust.
This is my first ever project in Rust so probably a lot of things are not being 
written in the most optimal way.

%package -n %{name}-cli
Summary:	CLI frontend of Czkawka

%description -n %{name}-cli
CLI frontent of Czkawka.

%files -n %{name}-cli
%license LICENSE
%doc README.md
%doc Changelog.md
%{_bindir}/%{name}_cli
%{_bindir}/%{name}

%package -n %{name}-gui
Summary:	GTK frontend of Czkawka
Provides:	czkawka = %{version}-%{release}

%description -n %{name}-gui
GTK frontent of Czkawka.

%files -n %{name}-gui
%license LICENSE
%doc README.md
%doc Changelog.md
%{_bindir}/%{name}_gui
%{_datadir}/applications/com.github.qarmin.czkawka.desktop
%{_iconsdir}/hicolor/scalable/apps/com.github.qarmin.czkawka.svg
%{_datadir}/metainfo/com.github.qarmin.czkawka.metainfo.xml

%prep
%autosetup -p1 -a1
%__mkdir .cargo
cp %{S:2} .cargo/config

%build

cargo build --release 

%install
mkdir -p %{buildroot}%{_bindir}/
install -Dm755 ./target/release/czkawka_cli %{buildroot}%{_bindir}
install -Dm755 ./target/release/czkawka_gui %{buildroot}%{_bindir}

ln -s %{_bindir}%{name}_cli %{buildroot}%{_bindir}/%{name}

install -Dm644 ./data/icons/com.github.qarmin.czkawka.svg -t %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
install -Dm644 ./data/com.github.qarmin.czkawka.desktop -t %{buildroot}%{_datadir}/applications/
install -Dm644 ./data/com.github.qarmin.czkawka.metainfo.xml -t %{buildroot}%{_datadir}/metainfo

%if %{with check}
%check
%cargo_test
%endif


%changelog
* Mon Jun 12 2023 papoteur <papoteur> 6.0.0-1.mga9
+ Revision: 1961856
- new 6.0.0

* Tue Mar 14 2023 papoteur <papoteur> 5.1.0-1.mga9
+ Revision: 1949032
- imported package czkawka