]>
Commit | Line | Data |
---|---|---|
47cf54c9 | 1 | # |
c645cb66 | 2 | # Conditional build: |
3 | %bcond_without static_libs # don't build static library | |
4 | # | |
e2b3d64a | 5 | Summary: Foreign Function Interface library |
31107309 | 6 | Summary(pl.UTF-8): Biblioteka Foreign Function Interface |
e2b3d64a | 7 | Name: libffi |
d210c9fe | 8 | Version: 3.2.1 |
7863a1fb | 9 | Release: 2 |
73a73a22 JB |
10 | Epoch: 7 |
11 | License: MIT-like | |
e2b3d64a | 12 | Group: Libraries |
73a73a22 | 13 | Source0: ftp://sourceware.org/pub/libffi/%{name}-%{version}.tar.gz |
d210c9fe | 14 | # Source0-md5: 83b89587607e3eb65c70d361f13bab43 |
73a73a22 | 15 | Patch0: %{name}-info.patch |
7863a1fb | 16 | Patch1: %{name}-libdir.patch |
e2b3d64a | 17 | URL: http://sources.redhat.com/libffi/ |
4310be14 JB |
18 | BuildRequires: autoconf >= 2.68 |
19 | BuildRequires: automake | |
20 | BuildRequires: libtool | |
326fe4a6 | 21 | BuildRequires: libltdl-devel |
16c35215 | 22 | BuildRequires: texinfo |
e2b3d64a MM |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | %description | |
02288106 JB |
26 | The libffi library provides a portable, high level programming |
27 | interface to various calling conventions. This allows a programmer to | |
28 | call any function specified by a call interface description at | |
29 | run-time. | |
30 | ||
31 | Ffi stands for Foreign Function Interface. A foreign function | |
32 | interface is the popular name for the interface that allows code | |
33 | written in one language to call code written in another language. The | |
34 | libffi library really only provides the lowest, machine dependent | |
35 | layer of a fully featured foreign function interface. A layer must | |
36 | exist above libffi that handles type conversions for values passed | |
05d32588 | 37 | between the two languages. |
e2b3d64a | 38 | |
4916b9d6 JR |
39 | %description -l pl.UTF-8 |
40 | Biblioteka libffi dostarcza przenośny, wysokopoziomowy interfejs do | |
41 | różnych konwencji wywołań funkcji. Pozwala to programiście wywołać | |
42 | dowolną funkcję podaną przez opis interfejsu wywołania w czasie | |
43 | działania programu. | |
02288106 | 44 | |
4916b9d6 JR |
45 | FFI to skrót od Foreign Function Interface, czyli interfejsu do obcych |
46 | funkcji. Jest to potoczna nazwa interfejsu pozwalającego programowi | |
47 | napisanemu w jednym języku wywoływać kod napisany w innym języku. | |
48 | Biblioteka libffi daje tylko najniższą, zależną od maszyny warstwę | |
49 | pełnego interfejsu. Potrzebne są wyższe warstwy do obsługi konwersji | |
50 | typów dla wartości przekazywanych pomiędzy różnymi językami. | |
e2b3d64a MM |
51 | |
52 | %package devel | |
02288106 | 53 | Summary: libffi development package |
31107309 | 54 | Summary(pl.UTF-8): libffi - część dla programistów |
02288106 | 55 | Group: Development/Libraries |
73a73a22 | 56 | Requires: %{name} = %{epoch}:%{version}-%{release} |
e2b3d64a MM |
57 | |
58 | %description devel | |
59 | Header files for libffi. | |
60 | ||
4916b9d6 JR |
61 | %description devel -l pl.UTF-8 |
62 | Pliki nagłówkowe do biblioteki libffi. | |
e2b3d64a MM |
63 | |
64 | %package static | |
02288106 | 65 | Summary: libffi static library |
31107309 | 66 | Summary(pl.UTF-8): Statyczna biblioteka libffi |
02288106 | 67 | Group: Development/Libraries |
73a73a22 | 68 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
e2b3d64a MM |
69 | |
70 | %description static | |
71 | Static version of libffi. | |
72 | ||
4916b9d6 | 73 | %description static -l pl.UTF-8 |
e2b3d64a MM |
74 | Statyczna wersja biblioteki libffi. |
75 | ||
76 | %prep | |
77 | %setup -q | |
168543c2 | 78 | %patch0 -p1 |
7863a1fb | 79 | %patch1 -p1 |
e2b3d64a MM |
80 | |
81 | %build | |
4310be14 JB |
82 | %{__libtoolize} |
83 | %{__aclocal} -I m4 | |
84 | %{__autoconf} | |
85 | %{__autoheader} | |
86 | %{__automake} | |
c645cb66 | 87 | %configure \ |
88 | %{!?with_static_libs:--disable-static} | |
168543c2 | 89 | |
e2b3d64a MM |
90 | %{__make} |
91 | ||
92 | %install | |
93 | rm -rf $RPM_BUILD_ROOT | |
e2b3d64a | 94 | |
73a73a22 JB |
95 | %{__make} install \ |
96 | DESTDIR=$RPM_BUILD_ROOT | |
e2b3d64a | 97 | |
e2b3d64a MM |
98 | %clean |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
101 | %post -p /sbin/ldconfig | |
102 | %postun -p /sbin/ldconfig | |
103 | ||
73a73a22 JB |
104 | %post devel -p /sbin/postshell |
105 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
106 | ||
107 | %postun devel -p /sbin/postshell | |
108 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
109 | ||
e2b3d64a MM |
110 | %files |
111 | %defattr(644,root,root,755) | |
73a73a22 JB |
112 | %doc ChangeLog* LICENSE README |
113 | %attr(755,root,root) %{_libdir}/libffi.so.*.*.* | |
300fca2e | 114 | %attr(755,root,root) %ghost %{_libdir}/libffi.so.6 |
e2b3d64a MM |
115 | |
116 | %files devel | |
117 | %defattr(644,root,root,755) | |
118 | %attr(755,root,root) %{_libdir}/libffi.so | |
73a73a22 JB |
119 | %{_libdir}/libffi.la |
120 | %{_libdir}/libffi-%{version} | |
121 | %{_pkgconfigdir}/libffi.pc | |
122 | %{_mandir}/man3/ffi*.3* | |
123 | %{_infodir}/libffi.info* | |
e2b3d64a | 124 | |
c645cb66 | 125 | %if %{with static_libs} |
e2b3d64a MM |
126 | %files static |
127 | %defattr(644,root,root,755) | |
73a73a22 | 128 | %{_libdir}/libffi.a |
c645cb66 | 129 | %endif |