| 1 | %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0} |
|---|
| 2 | |
|---|
| 3 | %define name libffi |
|---|
| 4 | %define version 3.0.9 |
|---|
| 5 | %define release 4%{?_dist_release} |
|---|
| 6 | |
|---|
| 7 | Summary: Foreign function interface library |
|---|
| 8 | Summary(ja): Foreign function interface ライブラリ |
|---|
| 9 | Name: %{name} |
|---|
| 10 | Version: %{version} |
|---|
| 11 | Release: %{release} |
|---|
| 12 | Source0: ftp://sourceware.org/pub/libffi/%{name}-%{version}.tar.gz |
|---|
| 13 | License: Distributable |
|---|
| 14 | Group: System Environment/Libraries |
|---|
| 15 | URL: http://sourceware.org/libffi/ |
|---|
| 16 | |
|---|
| 17 | BuildRequires: gcc |
|---|
| 18 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
|---|
| 19 | |
|---|
| 20 | Vendor: Project Vine |
|---|
| 21 | Distribution: Vine Linux |
|---|
| 22 | |
|---|
| 23 | %description |
|---|
| 24 | A foreign function interface is the popular name for the interface |
|---|
| 25 | that allows code written in one language to call code written in |
|---|
| 26 | another language. |
|---|
| 27 | |
|---|
| 28 | %description -l ja |
|---|
| 29 | Foreign function interface は一般に普及しているインターフェイスで、 |
|---|
| 30 | ある言語で書かれたコードから、他の言語で書かれたコードを呼び出すこ |
|---|
| 31 | とを可能にします。 |
|---|
| 32 | |
|---|
| 33 | #----------------------------------------------------------------------------- |
|---|
| 34 | |
|---|
| 35 | %package devel |
|---|
| 36 | Summary: Libraries and headers for %{name} |
|---|
| 37 | Summary(ja): %{name} 用の開発ライブラリおよびヘッダファイル |
|---|
| 38 | Group: Development/Libraries |
|---|
| 39 | Requires: %{name} = %{version} |
|---|
| 40 | Requires: pkgconfig |
|---|
| 41 | |
|---|
| 42 | %description devel |
|---|
| 43 | This package includes the files needed for developing and compiling |
|---|
| 44 | applications which use the ffi library. |
|---|
| 45 | |
|---|
| 46 | You should install the libffi-devel package if you would like to |
|---|
| 47 | develop applications using libffi. |
|---|
| 48 | |
|---|
| 49 | %description devel -l ja |
|---|
| 50 | このパッケージは ffi ライブラリを使用するアプリケーションを開発 |
|---|
| 51 | するのに必要なライブラリやヘッダファイルを含んでいます。 |
|---|
| 52 | |
|---|
| 53 | libffi を使用したアプリケーションを開発するなら、このパッケージ |
|---|
| 54 | をインストールしてください。 |
|---|
| 55 | |
|---|
| 56 | #compat32 |
|---|
| 57 | %package -n compat32-%{name} |
|---|
| 58 | Summary: Foreign function interface library |
|---|
| 59 | Summary(ja): Foreign function interface ライブラリ |
|---|
| 60 | Group: System Environment/Libraries |
|---|
| 61 | Requires: %{name} = %{version} |
|---|
| 62 | |
|---|
| 63 | %description -n compat32-%{name} |
|---|
| 64 | A foreign function interface is the popular name for the interface |
|---|
| 65 | that allows code written in one language to call code written in |
|---|
| 66 | another language. |
|---|
| 67 | |
|---|
| 68 | %description -n compat32-%{name} -l ja |
|---|
| 69 | Foreign function interface は一般に普及しているインターフェイスで、 |
|---|
| 70 | ある言語で書かれたコードから、他の言語で書かれたコードを呼び出すこ |
|---|
| 71 | とを可能にします。 |
|---|
| 72 | |
|---|
| 73 | %package -n compat32-%{name}-devel |
|---|
| 74 | Summary: Libraries and headers for %{name} |
|---|
| 75 | Summary(ja): %{name} 用の開発ライブラリおよびヘッダファイル |
|---|
| 76 | Group: Development/Libraries |
|---|
| 77 | Requires: compat32-%{name} = %{version} |
|---|
| 78 | Requires: %{name}-devel = %{version} |
|---|
| 79 | |
|---|
| 80 | %description -n compat32-%{name}-devel |
|---|
| 81 | This package includes the files needed for developing and compiling |
|---|
| 82 | applications which use the ffi library. |
|---|
| 83 | |
|---|
| 84 | You should install the libffi-devel package if you would like to |
|---|
| 85 | develop applications using libffi. |
|---|
| 86 | |
|---|
| 87 | %description -n compat32-%{name}-devel -l ja |
|---|
| 88 | このパッケージは ffi ライブラリを使用するアプリケーションを開発 |
|---|
| 89 | するのに必要なライブラリやヘッダファイルを含んでいます。 |
|---|
| 90 | |
|---|
| 91 | libffi を使用したアプリケーションを開発するなら、このパッケージ |
|---|
| 92 | をインストールしてください。 |
|---|
| 93 | |
|---|
| 94 | #----------------------------------------------------------------------------- |
|---|
| 95 | |
|---|
| 96 | |
|---|
| 97 | %prep |
|---|
| 98 | |
|---|
| 99 | %setup -q |
|---|
| 100 | |
|---|
| 101 | |
|---|
| 102 | %build |
|---|
| 103 | %configure |
|---|
| 104 | %{__make} |
|---|
| 105 | |
|---|
| 106 | |
|---|
| 107 | %install |
|---|
| 108 | %{__rm} -rf ${RPM_BUILD_ROOT} |
|---|
| 109 | %{__make} install DESTDIR=${RPM_BUILD_ROOT} |
|---|
| 110 | |
|---|
| 111 | # move include files. |
|---|
| 112 | %{__mv} ${RPM_BUILD_ROOT}/%{_libdir}/libffi-%{version}/include ${RPM_BUILD_ROOT}/%{_includedir} |
|---|
| 113 | sed -i -e "s|^includedir=.*include$|includedir=%{_includedir}|" \ |
|---|
| 114 | ${RPM_BUILD_ROOT}/%{_libdir}/pkgconfig/libffi.pc |
|---|
| 115 | |
|---|
| 116 | # remove unnecessary files. |
|---|
| 117 | %{__rm} -rf ${RPM_BUILD_ROOT}/%{_libdir}/libffi.la |
|---|
| 118 | %{__rm} -rf ${RPM_BUILD_ROOT}/%{_infodir}/dir |
|---|
| 119 | |
|---|
| 120 | %clean |
|---|
| 121 | %{__rm} -rf ${RPM_BUILD_ROOT} |
|---|
| 122 | |
|---|
| 123 | %post -p /sbin/ldconfig |
|---|
| 124 | |
|---|
| 125 | %postun -p /sbin/ldconfig |
|---|
| 126 | |
|---|
| 127 | |
|---|
| 128 | %files |
|---|
| 129 | %defattr(-,root,root) |
|---|
| 130 | %doc ChangeLog* LICENSE README |
|---|
| 131 | %{_libdir}/libffi.so.* |
|---|
| 132 | %{_infodir}/libffi.info* |
|---|
| 133 | %{_mandir}/man3/ffi.3* |
|---|
| 134 | %{_mandir}/man3/ffi_call.3* |
|---|
| 135 | %{_mandir}/man3/ffi_prep_cif.3* |
|---|
| 136 | |
|---|
| 137 | %files devel |
|---|
| 138 | %defattr(-,root,root) |
|---|
| 139 | %{_libdir}/pkgconfig/* |
|---|
| 140 | %{_libdir}/libffi.a |
|---|
| 141 | %{_libdir}/libffi.so |
|---|
| 142 | %{_includedir}/*.h |
|---|
| 143 | |
|---|
| 144 | # compat32 |
|---|
| 145 | %if %{build_compat32} |
|---|
| 146 | %files -n compat32-%{name} |
|---|
| 147 | %defattr(-,root,root) |
|---|
| 148 | %{_libdir}/libffi.so.* |
|---|
| 149 | |
|---|
| 150 | %files -n compat32-%{name}-devel |
|---|
| 151 | %defattr(-,root,root) |
|---|
| 152 | %{_libdir}/pkgconfig/* |
|---|
| 153 | %{_libdir}/libffi.so |
|---|
| 154 | %endif |
|---|
| 155 | |
|---|
| 156 | %changelog |
|---|
| 157 | * Wed Aug 17 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.0.9-4 |
|---|
| 158 | - create compat32 sub packages |
|---|
| 159 | |
|---|
| 160 | * Fri Nov 26 2010 Shu KONNO <owa@bg.wakwak.com> 3.0.9-3 |
|---|
| 161 | - fixed includedir in libffi.pc |
|---|
| 162 | |
|---|
| 163 | * Tue Sep 21 2010 IWAI, Masaharu <iwai@alib.jp> 3.0.9-2 |
|---|
| 164 | - build with rpm-4.8.1-1 for pkg-config file |
|---|
| 165 | |
|---|
| 166 | * Tue Feb 23 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 3.0.9-1 |
|---|
| 167 | - new upstream release |
|---|
| 168 | - built with new toolchain |
|---|
| 169 | |
|---|
| 170 | * Wed Jan 21 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 3.0.8-1 |
|---|
| 171 | - new upstream release |
|---|
| 172 | - spec in UTF-8 |
|---|
| 173 | |
|---|
| 174 | * Thu Apr 17 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 3.0.5-1 |
|---|
| 175 | - updated to new upstream release |
|---|
| 176 | |
|---|
| 177 | * Wed Apr 02 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 3.0.4-1 |
|---|
| 178 | - apply new versioning policy |
|---|
| 179 | |
|---|
| 180 | * Sun Mar 02 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 3.0.4-0vl1 |
|---|
| 181 | - initial build for Vine Linux |
|---|