Simplify compatibility package layout.
This commit is contained in:
parent
4e7e66c01d
commit
03438937e8
|
@ -8,8 +8,8 @@ Version: 3.1
|
|||
# logical transition we label the compat package libffi3.1-3.1-28
|
||||
# (next NEVRA bump) rather than the more confusing libffi3.1-3.1-1 since
|
||||
# there was already a 3.1-1 on May 19, 2014.
|
||||
Release: 29%{?dist}
|
||||
Summary: A portable foreign function interface library
|
||||
Release: 30%{?dist}
|
||||
Summary: Compatibility package for libffi transition from 3.1 to 3.4.2.
|
||||
License: MIT
|
||||
URL: http://sourceware.org/libffi
|
||||
|
||||
|
@ -30,51 +30,9 @@ BuildRequires: dejagnu
|
|||
%endif
|
||||
|
||||
%description
|
||||
The %{name} package provides the "libffi" library at version 3.1
|
||||
which provides the shared object (SONAME) "libffi.so.6" for all
|
||||
objects that require that library version. This is a compatibility
|
||||
library and packages should be compiling against the latest version
|
||||
of the "libffi" library using the libffi-devel (not %{name})
|
||||
package.
|
||||
|
||||
Compilers for high level languages generate code that follow certain
|
||||
conventions. These conventions are necessary, in part, for separate
|
||||
compilation to work. One such convention is the "calling convention".
|
||||
The calling convention is a set of assumptions made by the compiler
|
||||
about where function arguments will be found on entry to a function. A
|
||||
calling convention also specifies where the return value for a function
|
||||
is found.
|
||||
|
||||
Some programs may not know at the time of compilation what arguments
|
||||
are to be passed to a function. For instance, an interpreter may be
|
||||
told at run-time about the number and types of arguments used to call a
|
||||
given function. `Libffi' can be used in such programs to provide a
|
||||
bridge from the interpreter program to compiled code.
|
||||
|
||||
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.
|
||||
|
||||
FFI stands for Foreign Function Interface. A foreign function
|
||||
interface is the popular name for the interface that allows code
|
||||
written in one language to call code written in another language. The
|
||||
`libffi' library really only provides the lowest, machine dependent
|
||||
layer of a fully featured foreign function interface. A layer must
|
||||
exist above `libffi' that handles type conversions for values passed
|
||||
between the two languages.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: pkgconfig
|
||||
|
||||
%description devel
|
||||
This is a compatibility library and packages should be compiling
|
||||
against the latest version of the "libffi" library using the
|
||||
libffi-devel (not %{name}-devel) package.
|
||||
|
||||
The %{name}-devel package contains libraries and header files for
|
||||
developing applications that use %{name}.
|
||||
The libffi3.1 package contains the libffi 3.1 runtime library to
|
||||
support the library SONAME transition from 3.1 to 3.4.2. This pacakge
|
||||
will eventually be removed once the transition is complete.
|
||||
|
||||
%prep
|
||||
%setup -q -n libffi-3.1
|
||||
|
@ -83,13 +41,9 @@ developing applications that use %{name}.
|
|||
%patch2 -p1 -b .aarch64
|
||||
%patch3 -p1 -b .aarch64execstack
|
||||
%patch4 -p1 -b .libffitmpdir
|
||||
%patch5 -p1 -b .pkgconfig
|
||||
|
||||
%build
|
||||
|
||||
# Prevent rebuild within the mass rebuild.
|
||||
exit 1
|
||||
|
||||
%configure --disable-static --includedir=%{_includedir}/libffi3.1
|
||||
%make_build
|
||||
|
||||
|
@ -100,48 +54,33 @@ exit 1
|
|||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
# We only need the shared libraries, license, and README.
|
||||
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
|
||||
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
||||
|
||||
# Determine generic arch target name for multilib wrapper
|
||||
basearch=%{_arch}
|
||||
%ifarch %{ix86}
|
||||
basearch=i386
|
||||
%endif
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_includedir}/libffi3.1
|
||||
%ifarch %{multilib_arches}
|
||||
# Do header file switcheroo to avoid file conflicts on systems where you
|
||||
# can have both a 32- and 64-bit version of the library, and they each need
|
||||
# their own correct-but-different versions of the headers to be usable.
|
||||
for i in ffi ffitarget; do
|
||||
mv $RPM_BUILD_ROOT%{_libdir}/libffi-%{version}/include/$i.h $RPM_BUILD_ROOT%{_includedir}/libffi3.1/$i-${basearch}.h
|
||||
done
|
||||
install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_includedir}/libffi3.1/ffi.h
|
||||
install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/libffi3.1/ffitarget.h
|
||||
%else
|
||||
mv $RPM_BUILD_ROOT%{_libdir}/libffi-%{version}/include/{ffi,ffitarget}.h $RPM_BUILD_ROOT%{_includedir}/libffi3.1
|
||||
%endif
|
||||
rm -rf $RPM_BUILD_ROOT%{_libdir}/libffi-%{version}
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_libdir}/libffi-%{version}/include/{ffi,ffitarget}.h
|
||||
rm -rf $RPM_BUILD_ROOT%{_libdir}/libffi.so
|
||||
find $RPM_BUILD_ROOT%{_mandir} -name 'ffi*' -exec rm -f {} ';'
|
||||
find $RPM_BUILD_ROOT%{_infodir} -name 'libffi.info*' -exec rm -f {} ';'
|
||||
mv $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libffi.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libffi3.1.pc
|
||||
rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libffi.pc
|
||||
# We want the LICENSE and README to be in slightly adjusted path.
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_docdir}/libffi-3.1
|
||||
cp %{_builddir}/libffi-3.1/README $RPM_BUILD_ROOT/%{_docdir}/libffi-3.1/README
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/licenses/libffi-3.1
|
||||
cp %{_builddir}/libffi-3.1/LICENSE $RPM_BUILD_ROOT/%{_datadir}/licenses/libffi-3.1/LICENSE
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc README
|
||||
%license %{_datadir}/licenses/libffi-3.1/LICENSE
|
||||
%doc %{_docdir}/libffi-3.1/README
|
||||
%{_libdir}/libffi.so.6.0.2
|
||||
%{_libdir}/libffi.so.6
|
||||
|
||||
%files devel
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
%{_includedir}/libffi3.1/ffi*.h
|
||||
|
||||
%changelog
|
||||
* Wed Aug 11 2021 Carlos O'Donell <carlos@redhat.com> 3.1-30
|
||||
- Simplify compatibility package layout.
|
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-29
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
|
|
Loading…
Reference in New Issue