2024-02-04 11:00:28 +11:00
|
|
|
%global commit 1dca2a97d03fc6aa531a03ba7aaa9ca3dbcb5a61
|
|
|
|
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
|
|
|
|
|
|
|
Name: librashader
|
|
|
|
%define lname librashader0
|
|
|
|
%define profile optimized
|
|
|
|
Version: {{{ git_dir_version }}}
|
|
|
|
Release: %autorelease
|
|
|
|
Summary: RetroArch shaders for all
|
|
|
|
License: MPL-2.0
|
|
|
|
URL: https://github.com/SnowflakePowered/%{name}
|
|
|
|
%undefine _disable_source_fetch
|
|
|
|
Source: {{{ git_dir_pack }}}
|
|
|
|
BuildRequires: gcc
|
2024-02-04 11:22:03 +11:00
|
|
|
BuildRequires: git
|
2024-02-04 11:00:28 +11:00
|
|
|
BuildRequires: g++
|
|
|
|
BuildRequires: ninja-build
|
|
|
|
BuildRequires: patchelf
|
|
|
|
BuildRequires: rustc
|
|
|
|
BuildRequires: cargo
|
|
|
|
|
|
|
|
%description
|
|
|
|
RetroArch shader runtime
|
|
|
|
|
|
|
|
Summary: RetroArch shader runtime
|
|
|
|
Provides: librashader
|
|
|
|
|
|
|
|
%prep
|
|
|
|
{{{ git_dir_setup_macro }}}
|
|
|
|
|
|
|
|
%build
|
|
|
|
# need to use stable compiler, but enable nightly features
|
|
|
|
RUSTC_BOOTSTRAP=1 cargo run -p librashader-build-script -- --profile %{profile}
|
|
|
|
|
|
|
|
%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 11:00:28 +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
|
2024-08-03 14:34:36 +10:00
|
|
|
%{_libdir}/librashader.so.2
|
2024-02-04 11:00:28 +11:00
|
|
|
%{_includedir}/librashader/
|