File binsider.spec of Package binsider

#
# spec file for package binsider
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           binsider
Version:        0.1.0
Release:        0
Summary:        Analyze ELF binaries
# unsure yet
License:        Apache-2.0 OR MIT
URL:            https://binsider.dev/
Source0:        %{name}-%{version}.tar.zst
Source1:        vendor.tar.zst
# Pull in the latest rust/cargo toolchain
BuildRequires:  cargo
# This contains rpm macros to assist with building
BuildRequires:  cargo-packaging
# 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
Binsider can perform static and dynamic analysis, inspect strings, examine
linked libraries, and perform hexdumps, within a terminal user interface.

%prep
%autosetup -p1 -a1

%build
%{cargo_build}

%install
# manual process, this can place binaries in other directories like sbindin
install -D -d -m 0755 %{buildroot}%{_bindir}
install -m 0755 %{_builddir}/%{name}-%{version}/target/release/%{name} %{buildroot}%{_bindir}/%{name}

%files
%license LICENSE-APACHE LICENSE-MIT
%doc CHANGELOG.md README.md
%{_bindir}/%{name}

%changelog
openSUSE Build Service is sponsored by