source: spec/trunk/SPECS/libffi.spec@ 1010

Last change on this file since 1010 was 317, checked in by Yuri Dario, 13 years ago

spec: added libffi build.

File size: 2.7 KB
Line 
1Name: libffi
2Version: 3.0.11
3Release: 1%{?dist}
4Summary: A portable foreign function interface library
5
6Group: System Environment/Libraries
7License: BSD
8URL: http://sourceware.org/libffi
9Source0: http://sourceware.org/libffi/libffi-%{version}.tar.gz
10BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
11
12%description
13Compilers for high level languages generate code that follow certain
14conventions. These conventions are necessary, in part, for separate
15compilation to work. One such convention is the "calling convention".
16The calling convention is a set of assumptions made by the compiler
17about where function arguments will be found on entry to a function. A
18calling convention also specifies where the return value for a function
19is found.
20
21Some programs may not know at the time of compilation what arguments
22are to be passed to a function. For instance, an interpreter may be
23told at run-time about the number and types of arguments used to call a
24given function. `Libffi' can be used in such programs to provide a
25bridge from the interpreter program to compiled code.
26
27The `libffi' library provides a portable, high level programming
28interface to various calling conventions. This allows a programmer to
29call any function specified by a call interface description at run time.
30
31FFI stands for Foreign Function Interface. A foreign function
32interface is the popular name for the interface that allows code
33written in one language to call code written in another language. The
34`libffi' library really only provides the lowest, machine dependent
35layer of a fully featured foreign function interface. A layer must
36exist above `libffi' that handles type conversions for values passed
37between the two languages.
38
39
40%package devel
41Summary: Development files for %{name}
42Group: Development/Libraries
43Requires: %{name} = %{version}-%{release}
44Requires: pkgconfig
45
46%description devel
47The %{name}-devel package contains libraries and header files for
48developing applications that use %{name}.
49
50
51%prep
52%setup -q
53
54
55%build
56export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe"
57export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
58export LIBS="-lurpo -lmmap"
59%configure \
60 --disable-static \
61 "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
62make %{?_smp_mflags}
63
64
65%install
66rm -rf $RPM_BUILD_ROOT
67make install DESTDIR=$RPM_BUILD_ROOT
68find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
69rm -f $RPM_BUILD_ROOT%{_infodir}/dir
70
71
72%clean
73rm -rf $RPM_BUILD_ROOT
74
75%files
76%defattr(-,root,root,-)
77%doc LICENSE README
78#%{_libdir}/*.so.*
79
80%files devel
81%defattr(-,root,root,-)
82%{_libdir}/pkgconfig/*.pc
83%{_libdir}/%{name}-%{version}
84%{_libdir}/*.a
85%{_mandir}/man3/*
86%{_infodir}/libffi.info
87
88%changelog
89* Sat Oct 27 2012 yd
90- initial unixroot build.
Note: See TracBrowser for help on using the repository browser.