Blame stl-thumb.spec

e0601d
#
e0601d
# spec file for package stl-thumb
e0601d
#
966f4e
# Copyright (c) 2023 SUSE LLC
e0601d
#
e0601d
# All modifications and additions to the file contributed by third parties
e0601d
# remain the property of their copyright owners, unless otherwise agreed
e0601d
# upon. The license for this file, and modifications and additions to the
e0601d
# file, is the same license as for the pristine package itself (unless the
e0601d
# license for the pristine package is not an Open Source License, in which
e0601d
# case the license is the MIT License). An "Open Source License" is a
e0601d
# license that conforms to the Open Source Definition (Version 1.9)
e0601d
# published by the Open Source Initiative.
e0601d
e0601d
# Please submit bugfixes or comments via https://bugs.opensuse.org/
e0601d
#
e0601d
e0601d
e0601d
%global rustflags '-Clink-arg=-Wl,-z,relro,-z,now'
e0601d
Name:           stl-thumb
e0601d
Version:        0.5.0~0
e0601d
Release:        0
e0601d
Summary:        Stl-thumb is a fast lightweight thumbnail generator for STL files.
e0601d
License:        MIT
e0601d
URL:            https://github.com/unlimitedbacon/stl-thumb
e0601d
Source0:        %{name}-%{version}.tar.xz
e0601d
Source1:        vendor.tar.xz
e0601d
Source2:        cargo_config
966f4e
BuildRequires:  cargo-packaging
e0601d
e0601d
%description
e0601d
Stl-thumb is a fast lightweight thumbnail generator for STL files.
e0601d
It can show previews for STL files in your file manager on Linux and Windows.
e0601d
It is written in Rust and uses OpenGL.
e0601d
e0601d
%package devel
e0601d
Summary:        Files needed for stl-thumb development
e0601d
Group:          Development/Languages/C and C++
e0601d
Requires:       libstl-thumb = %{version}
e0601d
e0601d
%description devel
e0601d
Files needed to develop applications for the stl-thumb.
e0601d
e0601d
%package -n libstl-thumb
e0601d
Summary:        stl-thumb Libraries
e0601d
Group:          System/Libraries
e0601d
e0601d
%description -n libstl-thumb
e0601d
stl-thumb Libraries
e0601d
e0601d
%prep
e0601d
%autosetup -a1 -p1
e0601d
cp %{SOURCE2} .cargo/config
e0601d
e0601d
%build
e0601d
#RUSTFLAGS=%{rustflags} cargo build --release
e0601d
%{cargo_build}
e0601d
e0601d
%install
e0601d
# RUSTFLAGS=%{rustflags} cargo install --root=%{buildroot}%{_prefix} --path .
e0601d
install --mode 0755 -D target/release/stl-thumb       %{buildroot}%{_bindir}/stl-thumb
e0601d
install --mode 0755 -D target/release/libstl_thumb.so %{buildroot}%{_libdir}/libstl_thumb.so
e0601d
install --mode 0644 -D target/release/libstl_thumb.a  %{buildroot}%{_libdir}/libstl_thumb.a
e0601d
install --mode 0644 -D stl-thumb.thumbnailer          %{buildroot}%{_datadir}/thumbnailers/stl-thumb.thumbnailer
e0601d
install --mode 0644 -D libstl_thumb.h                 %{buildroot}%{_includedir}/libstl_thumb.h
e0601d
e0601d
%files
e0601d
%{_bindir}/stl-thumb
e0601d
%dir %{_datadir}/thumbnailers
e0601d
%{_datadir}/thumbnailers/stl-thumb.thumbnailer
e0601d
e0601d
%files -n libstl-thumb
e0601d
%{_libdir}/libstl_thumb.so
e0601d
e0601d
%files devel
e0601d
%{_libdir}/libstl_thumb.a
e0601d
%{_includedir}/libstl_thumb.h
e0601d
e0601d
%changelog