File libffi6.spec of Package libffi6
#
# spec file for package libffi6
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{!?make_build:%global make_build make %{?_smp_mflags}}
%global base_name libffi
%global libffi_sover 6
Name: %{base_name}%{libffi_sover}
Version: 3.1
Release: 0
Summary: Foreign Function Interface Library
License: MIT
Group: Development/Languages/C and C++
URL: https://sourceware.org/libffi
Source0: ftp://sourceware.org/pub/libffi/libffi-%{version}.tar.gz
Patch0: riscv64.patch
Patch1: libffi-3.1-fix-exec-stack.patch
Patch2: libffi-aarch64-rhbz1174037.patch
Patch3: libffi-3.1-aarch64-fix-exec-stack.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc
BuildRequires: libtool
BuildRequires: m4
%description
The libffi library provides a portable, high level programming
interface to various calling conventions. This allows a programmer to
call any function specified by a call interface description at run
time.
This package contains compatibility library.
%prep
%setup -q -n libffi-%{version}
%patch -P 0 -p1 -b .riscv64
%patch -P 1 -p1 -b .execstack
%patch -P 2 -p1 -b .aarch64
%patch -P 3 -p1 -b .aarch64execstack
%build
autoupdate
autoconf
%configure --disable-static
%make_build
%install
%make_install
rm -rf %{buildroot}%{_includedir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_libdir}/pkgconfig
rm -rf %{buildroot}%{_libdir}/libffi-%{version}
rm -f %{buildroot}%{_libdir}/*.so
find %{buildroot} -type f -name "*.la" -delete -print
rm -rf %{buildroot}%{_mandir}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%license LICENSE
%doc README
%{_libdir}/*.so.*
%changelog