librashader/pkg/obs/PKGBUILD

34 lines
1.2 KiB
Bash
Raw Normal View History

2024-02-04 08:15:00 +11:00
pkgname=librashader
pkgver=0.2.0~beta.2
pkgrel=0
pkgdesc="RetroArch shader runtime"
arch=('x86_64' 'aarch64')
url="https://github.com/SnowflakePowered/librashader"
license=('MPL-2.0')
groups=('')
2024-02-15 12:17:22 +11:00
depends=('gcc' 'rust' 'patchelf' 'ninja')
2024-02-04 08:15:00 +11:00
provides=("$pkgname=$pkgver" 'librashader.so')
backup=('')
source=("$pkgname-$pkgver.tar.xz" 'vendor.tar.xz' 'cargo_config')
cksums=("SKIP" "SKIP" "SKIP")
profile="optimized"
build() {
cd $pkgname-$pkgver
mkdir .cargo
cp "$srcdir/cargo_config" .cargo/config
cp -r "$srcdir/vendor" "vendor"
cp "$srcdir/Cargo.lock" "Cargo.lock"
RUSTC_BOOTSTRAP=1 cargo run -p librashader-build-script -- --profile ${profile}
}
package() {
mkdir -p $pkgdir/usr/lib
mkdir -p $pkgdir/usr/include/librashader
2024-08-03 14:34:36 +10:00
patchelf --set-soname librashader.so.2 $srcdir/$pkgname-$pkgver/target/$profile/librashader.so
2024-02-04 08:15:00 +11:00
install -m 0755 $srcdir/$pkgname-$pkgver/target/${profile}/librashader.so $pkgdir/usr/lib/librashader.so
cp $srcdir/$pkgname-$pkgver/target/${profile}/librashader.h $pkgdir/usr/include/librashader/librashader.h
cp $srcdir/$pkgname-$pkgver/include/librashader_ld.h $pkgdir/usr/include/librashader/librashader_ld.h
}