-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibffi.spec
132 lines (110 loc) · 3.65 KB
/
libffi.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#
# Conditional build:
%bcond_without static_libs # static library
#
Summary: Foreign Function Interface library
Summary(pl.UTF-8): Biblioteka Foreign Function Interface
Name: libffi
Version: 3.4.8
Release: 1
Epoch: 7
License: MIT-like
Group: Libraries
#Source0Download: https://github.com/libffi/libffi/releases/
Source0: https://github.com/libffi/libffi/releases/download/v%{version}/%{name}-%{version}.tar.gz
# Source0-md5: ba5fc49d57d13b9e6cecd0c78d76688b
Patch0: %{name}-info.patch
URL: http://www.sourceware.org/libffi/
BuildRequires: autoconf >= 2.71
BuildRequires: automake
BuildRequires: libltdl-devel >= 2:2
BuildRequires: libtool >= 2:2
BuildRequires: texinfo
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
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.
%description -l pl.UTF-8
Biblioteka libffi dostarcza przenośny, wysokopoziomowy interfejs do
różnych konwencji wywołań funkcji. Pozwala to programiście wywołać
dowolną funkcję podaną przez opis interfejsu wywołania w czasie
działania programu.
FFI to skrót od Foreign Function Interface, czyli interfejsu do obcych
funkcji. Jest to potoczna nazwa interfejsu pozwalającego programowi
napisanemu w jednym języku wywoływać kod napisany w innym języku.
Biblioteka libffi daje tylko najniższą, zależną od maszyny warstwę
pełnego interfejsu. Potrzebne są wyższe warstwy do obsługi konwersji
typów dla wartości przekazywanych pomiędzy różnymi językami.
%package devel
Summary: libffi development package
Summary(pl.UTF-8): libffi - część dla programistów
Group: Development/Libraries
Requires: %{name} = %{epoch}:%{version}-%{release}
%description devel
Header files for libffi.
%description devel -l pl.UTF-8
Pliki nagłówkowe do biblioteki libffi.
%package static
Summary: libffi static library
Summary(pl.UTF-8): Statyczna biblioteka libffi
Group: Development/Libraries
Requires: %{name}-devel = %{epoch}:%{version}-%{release}
%description static
Static version of libffi.
%description static -l pl.UTF-8
Statyczna wersja biblioteki libffi.
%prep
%setup -q
%patch -P0 -p1
%build
%if 0
# as of 3.4.[78] build fails in strange way after ac/am/lt rebuild???
%{__libtoolize}
%{__aclocal} -I m4
%{__autoconf}
%{__autoheader}
%{__automake}
%endif
%configure \
--disable-multi-os-directory \
%{!?with_static_libs:--disable-static}
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post devel -p /sbin/postshell
-/usr/sbin/fix-info-dir -c %{_infodir}
%postun devel -p /sbin/postshell
-/usr/sbin/fix-info-dir -c %{_infodir}
%files
%defattr(644,root,root,755)
%doc ChangeLog* LICENSE README.md
%attr(755,root,root) %{_libdir}/libffi.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libffi.so.8
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libffi.so
%{_libdir}/libffi.la
%{_includedir}/ffi*.h
%{_pkgconfigdir}/libffi.pc
%{_mandir}/man3/ffi*.3*
%{_infodir}/libffi.info*
%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libffi.a
%endif