%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0} %define name libffi %define version 3.0.13 %define release 1%{?_dist_release} Summary: Foreign function interface library Summary(ja): Foreign function interface ライブラリ Name: %{name} Version: %{version} Release: %{release} Source0: ftp://sourceware.org/pub/libffi/%{name}-%{version}.tar.gz License: Distributable Group: System Environment/Libraries URL: http://sourceware.org/libffi/ BuildRequires: gcc BuildRoot: %{_tmppath}/%{name}-%{version}-root Vendor: Project Vine Distribution: Vine Linux %description 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. %description -l ja Foreign function interface は一般に普及しているインターフェイスで、 ある言語で書かれたコードから、他の言語で書かれたコードを呼び出すこ とを可能にします。 #----------------------------------------------------------------------------- %package devel Summary: Libraries and headers for %{name} Summary(ja): %{name} 用の開発ライブラリおよびヘッダファイル Group: Development/Libraries Requires: %{name} = %{version} Requires: pkgconfig %description devel This package includes the files needed for developing and compiling applications which use the ffi library. You should install the libffi-devel package if you would like to develop applications using libffi. %description devel -l ja このパッケージは ffi ライブラリを使用するアプリケーションを開発 するのに必要なライブラリやヘッダファイルを含んでいます。 libffi を使用したアプリケーションを開発するなら、このパッケージ をインストールしてください。 #compat32 %package -n compat32-%{name} Summary: Foreign function interface library Summary(ja): Foreign function interface ライブラリ Group: System Environment/Libraries Requires: %{name} = %{version} %description -n compat32-%{name} 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. %description -n compat32-%{name} -l ja Foreign function interface は一般に普及しているインターフェイスで、 ある言語で書かれたコードから、他の言語で書かれたコードを呼び出すこ とを可能にします。 %package -n compat32-%{name}-devel Summary: Libraries and headers for %{name} Summary(ja): %{name} 用の開発ライブラリおよびヘッダファイル Group: Development/Libraries Requires: compat32-%{name} = %{version} Requires: %{name}-devel = %{version} %description -n compat32-%{name}-devel This package includes the files needed for developing and compiling applications which use the ffi library. You should install the libffi-devel package if you would like to develop applications using libffi. %description -n compat32-%{name}-devel -l ja このパッケージは ffi ライブラリを使用するアプリケーションを開発 するのに必要なライブラリやヘッダファイルを含んでいます。 libffi を使用したアプリケーションを開発するなら、このパッケージ をインストールしてください。 #----------------------------------------------------------------------------- %prep %setup -q %build %configure %{__make} %install %{__rm} -rf ${RPM_BUILD_ROOT} %{__make} install DESTDIR=${RPM_BUILD_ROOT} # move include files. %{__mv} ${RPM_BUILD_ROOT}/%{_libdir}/libffi-%{version}/include ${RPM_BUILD_ROOT}/%{_includedir} sed -i -e "s|^includedir=.*include$|includedir=%{_includedir}|" \ ${RPM_BUILD_ROOT}/%{_libdir}/pkgconfig/libffi.pc # remove unnecessary files. %{__rm} -rf ${RPM_BUILD_ROOT}/%{_libdir}/libffi.la %{__rm} -rf ${RPM_BUILD_ROOT}/%{_infodir}/dir %clean %{__rm} -rf ${RPM_BUILD_ROOT} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root) %doc ChangeLog* LICENSE README %{_libdir}/libffi.so.* %{_infodir}/libffi.info* %{_mandir}/man3/ffi.3* %{_mandir}/man3/ffi_call.3* %{_mandir}/man3/ffi_prep_cif.3* %{_mandir}/man3/ffi_prep_cif_var.3* %files devel %defattr(-,root,root) %{_libdir}/pkgconfig/* %{_libdir}/libffi.a %{_libdir}/libffi.so %{_includedir}/*.h # compat32 %if %{build_compat32} %files -n compat32-%{name} %defattr(-,root,root) %{_libdir}/libffi.so.* %files -n compat32-%{name}-devel %defattr(-,root,root) %{_libdir}/libffi.so %endif %changelog * Sun Jul 06 2014 Yoji TOYODA 3.0.13-1 - update to 3.0.13 * Wed Aug 17 2011 Yoji TOYODA 3.0.9-4 - create compat32 sub packages * Fri Nov 26 2010 Shu KONNO 3.0.9-3 - fixed includedir in libffi.pc * Tue Sep 21 2010 IWAI, Masaharu 3.0.9-2 - build with rpm-4.8.1-1 for pkg-config file * Tue Feb 23 2010 Ryoichi INAGAKI - 3.0.9-1 - new upstream release - built with new toolchain * Wed Jan 21 2009 MATSUBAYASHI Kohji - 3.0.8-1 - new upstream release - spec in UTF-8 * Thu Apr 17 2008 MATSUBAYASHI Kohji 3.0.5-1 - updated to new upstream release * Wed Apr 02 2008 Kazutaka HARADA 3.0.4-1 - apply new versioning policy * Sun Mar 02 2008 Kazutaka HARADA 3.0.4-0vl1 - initial build for Vine Linux