build: update soname

This commit is contained in:
chyyran 2024-08-03 00:34:36 -04:00 committed by Ronny Chan
parent 7e354a56a1
commit 0cbf8024a7
3 changed files with 8 additions and 9 deletions

View file

@ -35,7 +35,7 @@ RUSTC_BOOTSTRAP=1 cargo run -p librashader-build-script -- --profile %{profile}
%install %install
mkdir -p %{buildroot}/%{_libdir} mkdir -p %{buildroot}/%{_libdir}
mkdir -p %{buildroot}/%{_includedir}/librashader mkdir -p %{buildroot}/%{_includedir}/librashader
patchelf --set-soname librashader.so.1 target/%{profile}/librashader.so patchelf --set-soname librashader.so.2 target/%{profile}/librashader.so
install -m 0755 target/%{profile}/librashader.so %{buildroot}%{_libdir}/librashader.so install -m 0755 target/%{profile}/librashader.so %{buildroot}%{_libdir}/librashader.so
cp target/%{profile}/librashader.h %{buildroot}%{_includedir}/librashader/librashader.h cp target/%{profile}/librashader.h %{buildroot}%{_includedir}/librashader/librashader.h
cp include/librashader_ld.h %{buildroot}%{_includedir}/librashader/librashader_ld.h cp include/librashader_ld.h %{buildroot}%{_includedir}/librashader/librashader_ld.h
@ -43,5 +43,5 @@ cp include/librashader_ld.h %{buildroot}%{_includedir}/librashader/librashader_l
%files %files
%{_libdir}/librashader.so %{_libdir}/librashader.so
%{_libdir}/librashader.so.1 %{_libdir}/librashader.so.2
%{_includedir}/librashader/ %{_includedir}/librashader/

View file

@ -26,7 +26,7 @@ build() {
package() { package() {
mkdir -p $pkgdir/usr/lib mkdir -p $pkgdir/usr/lib
mkdir -p $pkgdir/usr/include/librashader mkdir -p $pkgdir/usr/include/librashader
patchelf --set-soname librashader.so.1 $srcdir/$pkgname-$pkgver/target/$profile/librashader.so patchelf --set-soname librashader.so.2 $srcdir/$pkgname-$pkgver/target/$profile/librashader.so
install -m 0755 $srcdir/$pkgname-$pkgver/target/${profile}/librashader.so $pkgdir/usr/lib/librashader.so 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/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 cp $srcdir/$pkgname-$pkgver/include/librashader_ld.h $pkgdir/usr/include/librashader/librashader_ld.h

View file

@ -3,13 +3,12 @@ Name: librashader
%define profile optimized %define profile optimized
Summary: RetroArch shaders for all Summary: RetroArch shaders for all
License: MPL-2.0 License: MPL-2.0
Version: 0.2.0~beta.2 Version: 0.4.0
Release: 0 Release: 0
URL: https://github.com/SnowflakePowered/%{name} URL: https://github.com/SnowflakePowered/%{name}
Source0: librashader-%{version}.tar.xz Source0: librashader-%{version}.tar.xz
Source1: vendor.tar.xz Source1: vendor.tar.xz
Source2: cargo_config Source2: cargo_config
BuildRequires: ninja-build
BuildRequires: patchelf BuildRequires: patchelf
BuildRequires: gcc BuildRequires: gcc
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -28,12 +27,12 @@ mkdir .cargo # cargo automatically uses this dir
cp %{SOURCE2} .cargo/config # and automatically uses this config cp %{SOURCE2} .cargo/config # and automatically uses this config
%build %build
RUSTC_BOOTSTRAP=1 cargo run -p librashader-build-script -- --profile %{profile} RUSTC_BOOTSTRAP=1 cargo run --ignore-rust-version -p librashader-build-script -- --profile %{profile}
%install %install
mkdir -p %{buildroot}/%{_libdir} mkdir -p %{buildroot}/%{_libdir}
mkdir -p %{buildroot}/%{_includedir}/librashader mkdir -p %{buildroot}/%{_includedir}/librashader
patchelf --set-soname librashader.so.1 target/%{profile}/librashader.so patchelf --set-soname librashader.so.2 target/%{profile}/librashader.so
install -m 0755 target/%{profile}/librashader.so %{buildroot}%{_libdir}/librashader.so install -m 0755 target/%{profile}/librashader.so %{buildroot}%{_libdir}/librashader.so
cp target/%{profile}/librashader.h %{buildroot}%{_includedir}/librashader/librashader.h cp target/%{profile}/librashader.h %{buildroot}%{_includedir}/librashader/librashader.h
cp include/librashader_ld.h %{buildroot}%{_includedir}/librashader/librashader_ld.h cp include/librashader_ld.h %{buildroot}%{_includedir}/librashader/librashader_ld.h
@ -42,6 +41,6 @@ cp include/librashader_ld.h %{buildroot}%{_includedir}/librashader/librashader_l
%files %files
%{_libdir}/librashader.so %{_libdir}/librashader.so
%if !0%{?suse_version} %if !0%{?suse_version}
%{_libdir}/librashader.so.1 %{_libdir}/librashader.so.2
%endif %endif
%{_includedir}/librashader/ %{_includedir}/librashader/