File libffi.spec of Package libffi

# spec file for package libffi
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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

Name:           libffi
%define libsoname %{name}6

Summary:        A portable foreign Function Interface Library
Version:        3.0.11
Release:        0
License:        BSD
Group:          System/Libraries
Source1:        baselibs.conf
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  pkg-config

%define debug_package_requires %{libsoname} = %{version}-%{release}

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

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 -n %{libsoname}
Summary:        Shared library for libffi
Group:          System/Libraries

%description -n %{libsoname}
A portable foreign Function Interface Library.
This package contains the shared libffi library.

%package -n %{name}-devel
Summary:        Development package for libffi
Group:          Development/Libraries/C and C++
Requires:       %{libsoname} = %{version}
Requires:       pkg-config

%description -n %{name}-devel
A portable foreign Function Interface Library.
This package contains the files needed to compile programs that use
the libffi library.

%setup -q

%configure --disable-static
make %{?_smp_mflags}

find %{buildroot} -name "*.la" -exec rm {} \;
mkdir -p %{buildroot}%{_includedir}
mv %{buildroot}%{_libdir}/%{name}-%{version}/include/* %{buildroot}%{_includedir}

%preun -n %{name}-devel
%install_info_delete --info-dir="%{_infodir}" "%{_infodir}/"

%post -n %{libsoname} -p /sbin/ldconfig
%postun -n %{libsoname} -p /sbin/ldconfig

%post -n %{name}-devel
%install_info --info-dir="%{_infodir}" "%{_infodir}/"

rm -rf %{buildroot}

%files -n %{libsoname}

%files -n %{name}-devel
%doc ChangeLog* LICENSE README