File photofinish.spec of Package photofinish

Name:           photofinish
#               This will be set by osc services, that will run after this.
Version:        1.0.2~git0.2b25dfb
Release:        1
Summary:        An event replay tool for the Trento storage backend
#               If you know the license, put it's SPDX string here.
#               Alternately, you can use cargo lock2rpmprovides to help generate this.
License:        Unknown
#               Select a group from this link:
#               https://en.opensuse.org/openSUSE:Package_group_guidelines
Group:          Development/Tools/Other
Url:            https://github.com/trento-project/photofinish
Source0:        %{name}-%{version}.tar.xz
Source1:        vendor.tar.xz
Source2:        cargo_config
BuildRequires:  cargo-packaging openssl-devel
# Disable this line if you wish to support all platforms.
# In most situations, you will likely only target tier1 arches for user facing components.
ExclusiveArch:  %{rust_tier1_arches}

%description
An event replay tool for the Trento storage backend.

%prep
%autosetup -a1
mkdir .cargo
cp %{SOURCE2} .cargo/config
# Remove exec bits to prevent an issue in fedora shebang checking. Uncomment only if required.
# find vendor -type f -name \*.rs -exec chmod -x '{}' \;

%build
%{cargo_build}

%install
# using cargo_install (only supports bindir)
# %{cargo_install}
# manual process
install -D -d -m 0755 %{buildroot}%{_bindir}
install -m 0755 %{_builddir}/%{name}-%{version}/target/release/photofinish %{buildroot}%{_bindir}/photofinish
 
%check
%{cargo_test}

%files
%{_bindir}/photofinish

%changelog

openSUSE Build Service is sponsored by