2024-02-04 08:15:00 +11:00
|
|
|
Name: librashader
|
|
|
|
%define lname librashader0
|
|
|
|
%define profile optimized
|
|
|
|
Summary: RetroArch shaders for all
|
|
|
|
License: MPL-2.0
|
2024-08-03 14:34:36 +10:00
|
|
|
Version: 0.4.0
|
2024-02-04 08:15:00 +11:00
|
|
|
Release: 0
|
|
|
|
URL: https://github.com/SnowflakePowered/%{name}
|
|
|
|
Source0: librashader-%{version}.tar.xz
|
|
|
|
Source1: vendor.tar.xz
|
|
|
|
Source2: cargo_config
|
|
|
|
BuildRequires: patchelf
|
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: cargo
|
|
|
|
BuildRequires: rust
|
|
|
|
|
|
|
|
%description
|
|
|
|
RetroArch shader runtime
|
|
|
|
|
|
|
|
Summary: RetroArch shader runtime
|
|
|
|
Provides: librashader
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -qa1
|
|
|
|
mkdir .cargo # cargo automatically uses this dir
|
|
|
|
cp %{SOURCE2} .cargo/config # and automatically uses this config
|
|
|
|
|
|
|
|
%build
|
2024-08-03 14:34:36 +10:00
|
|
|
RUSTC_BOOTSTRAP=1 cargo run --ignore-rust-version -p librashader-build-script -- --profile %{profile}
|
2024-02-04 08:15:00 +11:00
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}/%{_libdir}
|
|
|
|
mkdir -p %{buildroot}/%{_includedir}/librashader
|
2024-08-03 14:34:36 +10:00
|
|
|
patchelf --set-soname librashader.so.2 target/%{profile}/librashader.so
|
2024-02-04 08:15:00 +11:00
|
|
|
install -m 0755 target/%{profile}/librashader.so %{buildroot}%{_libdir}/librashader.so
|
|
|
|
cp target/%{profile}/librashader.h %{buildroot}%{_includedir}/librashader/librashader.h
|
|
|
|
cp include/librashader_ld.h %{buildroot}%{_includedir}/librashader/librashader_ld.h
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%{_libdir}/librashader.so
|
|
|
|
%if !0%{?suse_version}
|
2024-08-03 14:34:36 +10:00
|
|
|
%{_libdir}/librashader.so.2
|
2024-02-04 08:15:00 +11:00
|
|
|
%endif
|
2024-08-03 14:34:36 +10:00
|
|
|
%{_includedir}/librashader/
|