Fix libdir for riscv64

The libraries are installed in lib64/lp64d instead of just lib64
directory. That breaks packaging.

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
David Abdurachmanov 2024-01-09 11:21:56 +02:00
parent 017eb83856
commit 65322855b7
Signed by: davidlt
GPG Key ID: 7A5F42FAF91FACC3

View File

@ -4,7 +4,7 @@
Name: libffi
Version: 3.4.4
Release: 5%{?dist}
Release: 5.0.riscv64%{?dist}
Summary: A portable foreign function interface library
License: MIT
URL: http://sourceware.org/libffi
@ -69,7 +69,11 @@ developing applications that use %{name}.
# https://gitlab.haskell.org/ghc/ghc/-/issues/20051
# https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/283
# We need to get these fixes into Fedora before we can reeanble them.
%configure --disable-static
%configure \
%ifarch riscv64
--libdir=%{_libdir} \
%endif
--disable-static
%make_build
%check
@ -101,6 +105,14 @@ install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_includedir}/ffi.h
install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/ffitarget.h
%endif
%ifarch riscv64
# Print the content of buildroot
find $RPM_BUILD_ROOT
# Install libraries to a proper riscv64 libdir location
mv -v ${RPM_BUILD_ROOT}%{_libdir}/lp64d/* ${RPM_BUILD_ROOT}%{_libdir}/
rm -rf ${RPM_BUILD_ROOT}%{_libdir}/lp64d
%endif
%ldconfig_scriptlets
%files
@ -117,6 +129,9 @@ install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/ffitarget.h
%{_infodir}/libffi.info.*
%changelog
* Tue Jan 09 2024 David Abdurachmanov <davidlt@rivosinc.com> - 3.4.4-5.0.riscv64
- Fix libdir for riscv64
* Tue Jan 02 2024 Florian Weimer <fweimer@redhat.com> - 3.4.4-5
- Add missing declaration of open_temp_exec_file