3 %bcond_without guile # disable guile support
4 %bcond_without ocaml # disable ocaml support
5 %bcond_without perl # disable perl support
6 %bcond_without php # disable php support
7 %bcond_without ruby # disable ruby support
8 %bcond_without tcl # disable tcl support
10 Summary: Interface generator for Perl, Tcl, Guile and Python
11 Summary(pl): Generator interfejsów do Perla, Tcl-a, Guile'a i Pythona
12 Summary(pt_BR): Gerador de Interfaces e "Wrappers" Simplificado (SWIG)
16 License: distributable
17 Group: Development/Languages
18 Source0: http://dl.sourceforge.net/swig/%{name}-%{version}.tar.gz
19 # Source0-md5: 4a0bae63e3713e89b26db7209b6a7e05
20 Patch0: %{name}-format.patch
21 Patch1: %{name}-php.patch
22 Patch2: %{name}-php-freearg.patch
23 Patch3: %{name}-php-vdecl.patch
24 URL: http://www.swig.org/
25 BuildRequires: autoconf
26 BuildRequires: automake
27 %{?with_guile:BuildRequires: guile-devel}
28 BuildRequires: libstdc++-devel
29 BuildRequires: libtool
30 %{?with_ocaml:BuildRequires: ocaml}
31 %{?with_perl:BuildRequires: perl-devel >= 1:5.6.1}
32 %{?with_php:BuildRequires: php-cli}
33 %{?with_php:BuildRequires: php-devel >= 4.1.0}
34 BuildRequires: python-devel >= 1:2.3.2
36 BuildRequires: rpmbuild(macros) >= 1.277
37 BuildRequires: ruby-devel >= 1:1.6.3
39 %{?with_tcl:BuildRequires: tcl-devel >= 8.3.3}
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 SWIG is a compiler that attempts to make it easy to integrate C, C++,
45 or Objective-C code with scripting languages including Perl, Tcl, and
46 Python. In a nutshell, you give it a bunch of ANSI C/C++ declarations
47 and it generates an interface between C and your favorite scripting
48 language. However, this is only scratching the surface of what SWIG
49 can do--some of its more advanced features include automatic
50 documentation generation, module and library management, extensive
51 customization options, and more.
53 SWIG is entirely the product of users who have used the system and
54 suggested new idea. There are far too many people to thank
55 individually, but without this support, SWIG would be not be nearly as
56 powerful or fun to use as it is now. Many thanks!
59 SWIG jesk kompilatorem, który próbuje u³atwiæ integrowanie kodu
60 napisanego w C, C++ lub Objective-C z jêzykami skryptowymi, takimi jak
61 Perl, Tcl i Python. Mówi±c najpro¶ciej, je¶li dostarczysz mu zestaw
62 zadeklarowanych w ANSI C/C++ funkcji, SWIG wygeneruje Ci interfejs
63 pomiêdzy C a Twoim ulubionym jêzykiem skryptowym. To tylko drobna
64 czê¶æ tego co SWIG potrafi robiæ, bardziej zaawansowane zastosowania
65 to automatyczne generowanie dokumentacji, zarz±dzanie bibliotekami i
66 modu³ami i wiele innych.
68 SWIG jest w ca³o¶ci dzie³em ludzi, którzy go u¿ywali i wprowadzali
69 nowe pomys³y. Zbyt wielu ich jest, aby dziêkowaæ ka¿demu z nich
70 osobno, ale bez ich wsparcia SWIG nie by³by ani tak potê¿nym
71 narzêdziem, ani tak fajnym w u¿yciu jak jest teraz. Wiekie dziêki!
74 O SWIG gera interfaces para perl, python e Tcl a partir de uma arquivo
75 com uma interface de descrição que consiste de uma combinação de C/C++
76 e diretivas especiais. Permite que linguagens tipo script usem C/C++
77 com um mínimo de esforço.
80 Summary: SWIG library: guile
81 Summary(pl): Biblioteka SWIG: guile
83 Requires: %{name} = %{version}-%{release}
88 %description guile -l pl
89 Biblioteka SWIG: guile.
92 Summary: SWIG library: Perl
93 Summary(pl): Biblioteka SWIG: Perl
95 Requires: %{name} = %{version}-%{release}
100 %description perl -l pl
101 Biblioteka SWIG: perl.
104 Summary: SWIG library: php
105 Summary(pl): Biblioteka SWIG: php
107 Requires: %{name} = %{version}-%{release}
112 %description php -l pl
113 Biblioteka SWIG: php.
116 Summary: SWIG library: python
117 Summary(pl): Biblioteka SWIG: python
119 Requires: %{name} = %{version}-%{release}
122 SWIG library: python.
124 %description python -l pl
125 Biblioteka SWIG: python.
128 Summary: SWIG library: ruby
129 Summary(pl): Biblioteka SWIG: ruby
131 Requires: %{name} = %{version}-%{release}
132 %{?ruby_mod_ver_requires_eq}
137 %description ruby -l pl
138 Biblioteka SWIG: ruby.
141 Summary: SWIG library: tcl
142 Summary(pl): Biblioteka SWIG: tcl
144 Requires: %{name} = %{version}-%{release}
149 %description tcl -l pl
150 Biblioteka SWIG: tcl.
161 %{__aclocal} -I Tools/config
170 rm -rf $RPM_BUILD_ROOT
171 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_examplesdir}/%{name}-%{version}}
174 DESTDIR=$RPM_BUILD_ROOT \
175 M4_INSTALL_DIR=$RPM_BUILD_ROOT%{_aclocaldir}
177 cp -a Examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
180 rm -rf $RPM_BUILD_ROOT
182 %post -p /sbin/ldconfig
183 %postun -p /sbin/ldconfig
185 %post guile -p /sbin/ldconfig
186 %postun guile -p /sbin/ldconfig
188 %post perl -p /sbin/ldconfig
189 %postun perl -p /sbin/ldconfig
191 %post php -p /sbin/ldconfig
192 %postun php -p /sbin/ldconfig
194 %post python -p /sbin/ldconfig
195 %postun python -p /sbin/ldconfig
197 %post ruby -p /sbin/ldconfig
198 %postun ruby -p /sbin/ldconfig
200 %post tcl -p /sbin/ldconfig
201 %postun tcl -p /sbin/ldconfig
204 %defattr(644,root,root,755)
205 %doc Doc CHANGES NEW README ANNOUNCE TODO LICENSE
206 %attr(755,root,root) %{_bindir}/swig
208 %{?with_guile:%exclude %{_datadir}/%{name}/%{version}/guile}
209 %{?with_perl:%exclude %{_datadir}/%{name}/%{version}/perl5}
210 %{?with_php:%exclude %{_datadir}/%{name}/%{version}/php4}
211 %exclude %{_datadir}/%{name}/%{version}/python
212 %{?with_ruby:%exclude %{_datadir}/%{name}/%{version}/ruby}
213 %{?with_tcl:%exclude %{_datadir}/%{name}/%{version}/tcl}
214 %{_examplesdir}/%{name}-%{version}
218 %defattr(644,root,root,755)
219 %{_datadir}/%{name}/%{version}/guile
224 %defattr(644,root,root,755)
225 %{_datadir}/%{name}/%{version}/perl5
230 %defattr(644,root,root,755)
231 %{_datadir}/%{name}/%{version}/php4
235 %defattr(644,root,root,755)
236 %{_datadir}/%{name}/%{version}/python
240 %defattr(644,root,root,755)
241 %{_datadir}/%{name}/%{version}/ruby
246 %defattr(644,root,root,755)
247 %{_datadir}/%{name}/%{version}/tcl