]> git.pld-linux.org Git - packages/swig.git/blob - swig.spec
- unified bcond headers
[packages/swig.git] / swig.spec
1 #
2 # Conditional build:
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
9 #
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)
13 Name:           swig
14 Version:        1.3.21
15 Release:        3
16 License:        distributable
17 Group:          Development/Languages
18 Source0:        http://dl.sourceforge.net/swig/%{name}-%{version}.tar.gz
19 # Source0-md5:  88ff5b99be3eafebb8a6e20f4f986c04
20 Patch0:         %{name}-format.patch
21 Patch1:         %{name}-php.patch
22 Patch2:         %{name}-php-tsrm.patch
23 Patch3:         %{name}-php-freearg.patch
24 Patch4:         %{name}-php-vdecl.patch
25 Patch5:         %{name}-python-lib64.patch
26 URL:            http://www.swig.org/
27 Icon:           swig.gif
28 BuildRequires:  autoconf
29 BuildRequires:  automake
30 %{?with_guile:BuildRequires:    guile-devel}
31 BuildRequires:  libstdc++-devel
32 BuildRequires:  libtool
33 %{?with_ocaml:BuildRequires:    ocaml}
34 %{?with_perl:BuildRequires:     perl-devel >= 1:5.6.1}
35 %{?with_php:BuildRequires:      php-devel >= 4.1.0}
36 %{?with_php:BuildRequires:      php-cgi}
37 BuildRequires:  python-devel >= 1:2.3.2
38 %{?with_ruby:BuildRequires:     ruby >= 1:1.6.3}
39 %{?with_tcl:BuildRequires:      tcl-devel >= 8.3.3}
40 Obsoletes:      swig-ocaml
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %description
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.
52
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!
57
58 %description -l pl
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.
67
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!
72
73 %description -l pt_BR
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.
78
79 %package guile
80 Summary:        SWIG library: guile
81 Summary(pl):    Biblioteka SWIG: guile
82 Group:          Libraries
83
84 %description guile
85 SWIG library: guile.
86
87 %description guile -l pl
88 Biblioteka SWIG: guile.
89
90 %package perl
91 Summary:        SWIG library: Perl
92 Summary(pl):    Biblioteka SWIG: Perl
93 Group:          Libraries
94
95 %description perl
96 SWIG library: perl.
97
98 %description perl -l pl
99 Biblioteka SWIG: perl.
100
101 %package php
102 Summary:        SWIG library: php
103 Summary(pl):    Biblioteka SWIG: php
104 Group:          Libraries
105
106 %description php
107 SWIG library: php.
108
109 %description php -l pl
110 Biblioteka SWIG: php.
111
112 %package python
113 Summary:        SWIG library: python
114 Summary(pl):    Biblioteka SWIG: python
115 Group:          Libraries
116
117 %description python
118 SWIG library: python.
119
120 %description python -l pl
121 Biblioteka SWIG: python.
122
123 %package ruby
124 Summary:        SWIG library: ruby
125 Summary(pl):    Biblioteka SWIG: ruby
126 Group:          Libraries
127
128 %description ruby
129 SWIG library: ruby.
130
131 %description ruby -l pl
132 Biblioteka SWIG: ruby.
133
134 %package tcl
135 Summary:        SWIG library: tcl
136 Summary(pl):    Biblioteka SWIG: tcl
137 Group:          Libraries
138
139 %description tcl
140 SWIG library: tcl.
141
142 %description tcl -l pl
143 Biblioteka SWIG: tcl.
144
145 %prep
146 %setup -q -n SWIG-%{version}
147 %patch0 -p1
148 %patch1 -p1
149 %patch2 -p1
150 %patch3 -p1
151 %patch4 -p1
152 %if "%{_lib}" == "lib64"
153 %patch5 -p1
154 %endif
155
156 %build
157 %{__libtoolize}
158 %{__aclocal} -I Tools/config
159 %{__autoconf}
160 %configure
161
162 %{__make} source runtime \
163         OPT="%{rpmcflags}"
164
165 %install
166 rm -rf $RPM_BUILD_ROOT
167 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_examplesdir}/%{name}-%{version}}
168
169 %{__make} install install-runtime \
170         DESTDIR=$RPM_BUILD_ROOT \
171         M4_INSTALL_DIR=$RPM_BUILD_ROOT%{_aclocaldir}
172
173 cp -a Examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
174
175 %clean
176 rm -rf $RPM_BUILD_ROOT
177
178 %post   -p /sbin/ldconfig
179 %postun -p /sbin/ldconfig
180
181 %post   guile -p /sbin/ldconfig
182 %postun guile -p /sbin/ldconfig
183
184 %post   perl -p /sbin/ldconfig
185 %postun perl -p /sbin/ldconfig
186
187 %post   php -p /sbin/ldconfig
188 %postun php -p /sbin/ldconfig
189
190 %post   python -p /sbin/ldconfig
191 %postun python -p /sbin/ldconfig
192
193 %post   ruby -p /sbin/ldconfig
194 %postun ruby -p /sbin/ldconfig
195
196 %post   tcl -p /sbin/ldconfig
197 %postun tcl -p /sbin/ldconfig
198
199 %files
200 %defattr(644,root,root,755)
201 %doc Doc CHANGES NEW README ANNOUNCE TODO LICENSE
202 %{_libdir}/%{name}*
203 %attr(755,root,root) %{_bindir}/swig
204 %{_aclocaldir}/swig.m4
205 %{_examplesdir}/%{name}-%{version}
206
207 %if %{with guile}
208 %files guile
209 %defattr(644,root,root,755)
210 %attr(755,root,root) %{_libdir}/libswigguile*.so.*.*.*
211 %attr(755,root,root) %{_libdir}/libswigguile*.so
212 %{_libdir}/libswigguile*.la
213 %endif
214
215 %if %{with perl}
216 %files perl
217 %defattr(644,root,root,755)
218 %attr(755,root,root) %{_libdir}/libswigpl.so.*.*.*
219 %attr(755,root,root) %{_libdir}/libswigpl.so
220 %{_libdir}/libswigpl.la
221 %endif
222
223 %if %{with php}
224 %files php
225 %defattr(644,root,root,755)
226 %attr(755,root,root) %{_libdir}/libswigphp4.so.*.*.*
227 %attr(755,root,root) %{_libdir}/libswigphp4.so
228 %{_libdir}/libswigphp4.la
229 %endif
230
231 %files python
232 %defattr(644,root,root,755)
233 %attr(755,root,root) %{_libdir}/libswigpy.so.*.*.*
234 %attr(755,root,root) %{_libdir}/libswigpy.so
235 %{_libdir}/libswigpy.la
236
237 %if %{with ruby}
238 %files ruby
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_libdir}/libswigrb.so.*.*.*
241 %attr(755,root,root) %{_libdir}/libswigrb.so
242 %{_libdir}/libswigrb.la
243 %endif
244
245 %if %{with tcl}
246 %files tcl
247 %defattr(644,root,root,755)
248 %attr(755,root,root) %{_libdir}/libswigtcl*.so.*.*.*
249 %attr(755,root,root) %{_libdir}/libswigtcl*.so
250 %{_libdir}/libswigtcl*.la
251 %endif
This page took 0.088592 seconds and 4 git commands to generate.