]>
Commit | Line | Data |
---|---|---|
1164fd14 | 1 | # |
2dfe0926 | 2 | # Conditional build: |
3 | %bcond_without guile # disable guile support | |
2dfe0926 | 4 | %bcond_without perl # disable perl support |
a53a7b90 | 5 | %bcond_without php # disable php support |
2dfe0926 | 6 | %bcond_without ruby # disable ruby support |
a53a7b90 JB |
7 | %bcond_without tcl # disable tcl support |
8 | # | |
bc0be7d9 ER |
9 | %if "%{?php_suffix}" == "" |
10 | %define php_suffix 55 | |
11 | %endif | |
12 | %define php_name php%{?php_suffix} | |
f1505a61 | 13 | Summary: Interface generator for Perl, Tcl, Guile and Python |
eeba410f ER |
14 | Summary(pl.UTF-8): Generator interfejsów do Perla, Tcl-a, Guile'a i Pythona |
15 | Summary(pt_BR.UTF-8): Gerador de Interfaces e "Wrappers" Simplificado (SWIG) | |
f1505a61 | 16 | Name: swig |
a6b8f92a | 17 | Version: 3.0.8 |
21ded742 | 18 | Release: 1 |
8d185dc8 | 19 | License: GPL v3+ (utility), free (library) |
f1505a61 | 20 | Group: Development/Languages |
8d185dc8 | 21 | Source0: http://downloads.sourceforge.net/swig/%{name}-%{version}.tar.gz |
a6b8f92a | 22 | # Source0-md5: c96a1d5ecb13d38604d7e92148c73c97 |
2a3705bd | 23 | Patch0: %{name}-php-freearg.patch |
a778deab | 24 | URL: http://www.swig.org/ |
8d185dc8 JB |
25 | BuildRequires: autoconf >= 2.58 |
26 | BuildRequires: automake >= 1:1.7.2 | |
8dc93494 | 27 | %{?with_guile:BuildRequires: guile-devel >= 5:1.8} |
17739701 | 28 | BuildRequires: libstdc++-devel |
21ded742 JB |
29 | # used only in examples, doesn't affect actual swig build |
30 | #BuildRequires: ocaml | |
31 | # used only in examples, doesn't affect actual swig build | |
32 | #BuildRequires: octave-devel | |
8dc93494 | 33 | BuildRequires: pcre-devel |
2dfe0926 | 34 | %{?with_perl:BuildRequires: perl-devel >= 1:5.6.1} |
bc0be7d9 ER |
35 | %{?with_php:BuildRequires: %{php_name}-cli} |
36 | %{?with_php:BuildRequires: %{php_name}-devel >= 4.1.0} | |
86a07a9b | 37 | BuildRequires: python-devel >= 1:2.3.2 |
8a65fc8c | 38 | BuildRequires: python-modules |
8dc93494 JB |
39 | BuildRequires: python3-devel |
40 | BuildRequires: python3-modules | |
8a65fc8c | 41 | BuildRequires: rpm-pythonprov |
1bb19926 | 42 | %if %{with ruby} |
43 | BuildRequires: rpmbuild(macros) >= 1.277 | |
44 | BuildRequires: ruby-devel >= 1:1.6.3 | |
1bb19926 | 45 | %endif |
2dfe0926 | 46 | %{?with_tcl:BuildRequires: tcl-devel >= 8.3.3} |
c44d5037 | 47 | Obsoletes: swig-ocaml |
a42ebffc | 48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
4c9f45fa | 49 | |
50 | %description | |
51 | SWIG is a compiler that attempts to make it easy to integrate C, C++, | |
52 | or Objective-C code with scripting languages including Perl, Tcl, and | |
7eb26fa0 | 53 | Python. In a nutshell, you give it a bunch of ANSI C/C++ declarations |
4c9f45fa | 54 | and it generates an interface between C and your favorite scripting |
7eb26fa0 | 55 | language. However, this is only scratching the surface of what SWIG |
4c9f45fa | 56 | can do--some of its more advanced features include automatic |
57 | documentation generation, module and library management, extensive | |
58 | customization options, and more. | |
59 | ||
60 | SWIG is entirely the product of users who have used the system and | |
7eb26fa0 | 61 | suggested new idea. There are far too many people to thank |
4c9f45fa | 62 | individually, but without this support, SWIG would be not be nearly as |
63 | powerful or fun to use as it is now. Many thanks! | |
64 | ||
b386be58 JR |
65 | %description -l pl.UTF-8 |
66 | SWIG jesk kompilatorem, który próbuje ułatwić integrowanie kodu | |
67 | napisanego w C, C++ lub Objective-C z językami skryptowymi, takimi jak | |
68 | Perl, Tcl i Python. Mówiąc najprościej, jeśli dostarczysz mu zestaw | |
2c3035a6 | 69 | zadeklarowanych w ANSI C/C++ funkcji, SWIG wygeneruje Ci interfejs |
b386be58 JR |
70 | pomiędzy C a Twoim ulubionym językiem skryptowym. To tylko drobna |
71 | część tego co SWIG potrafi robić, bardziej zaawansowane zastosowania | |
72 | to automatyczne generowanie dokumentacji, zarządzanie bibliotekami i | |
73 | modułami i wiele innych. | |
9ba41159 | 74 | |
b386be58 JR |
75 | SWIG jest w całości dziełem ludzi, którzy go używali i wprowadzali |
76 | nowe pomysły. Zbyt wielu ich jest, aby dziękować każdemu z nich | |
77 | osobno, ale bez ich wsparcia SWIG nie byłby ani tak potężnym | |
78 | narzędziem, ani tak fajnym w użyciu jak jest teraz. Wiekie dzięki! | |
9ba41159 | 79 | |
b386be58 | 80 | %description -l pt_BR.UTF-8 |
ede1674d | 81 | O SWIG gera interfaces para perl, python e Tcl a partir de uma arquivo |
b386be58 | 82 | com uma interface de descrição que consiste de uma combinação de C/C++ |
60a191ce | 83 | e diretivas especiais. Permite que linguagens tipo script usem C/C++ |
b386be58 | 84 | com um mínimo de esforço. |
60a191ce | 85 | |
48fb2a6b JB |
86 | %package guile |
87 | Summary: SWIG library: guile | |
eeba410f | 88 | Summary(pl.UTF-8): Biblioteka SWIG: guile |
8d185dc8 | 89 | License: free |
48fb2a6b | 90 | Group: Libraries |
fd89abd1 | 91 | Requires: %{name} = %{version}-%{release} |
48fb2a6b JB |
92 | |
93 | %description guile | |
94 | SWIG library: guile. | |
95 | ||
b386be58 | 96 | %description guile -l pl.UTF-8 |
48fb2a6b JB |
97 | Biblioteka SWIG: guile. |
98 | ||
99 | %package perl | |
100 | Summary: SWIG library: Perl | |
eeba410f | 101 | Summary(pl.UTF-8): Biblioteka SWIG: Perl |
8d185dc8 | 102 | License: free |
48fb2a6b | 103 | Group: Libraries |
fd89abd1 | 104 | Requires: %{name} = %{version}-%{release} |
48fb2a6b JB |
105 | |
106 | %description perl | |
107 | SWIG library: perl. | |
108 | ||
b386be58 | 109 | %description perl -l pl.UTF-8 |
48fb2a6b JB |
110 | Biblioteka SWIG: perl. |
111 | ||
112 | %package php | |
113 | Summary: SWIG library: php | |
eeba410f | 114 | Summary(pl.UTF-8): Biblioteka SWIG: php |
8d185dc8 | 115 | License: free |
48fb2a6b | 116 | Group: Libraries |
fd89abd1 | 117 | Requires: %{name} = %{version}-%{release} |
48fb2a6b JB |
118 | |
119 | %description php | |
120 | SWIG library: php. | |
121 | ||
b386be58 | 122 | %description php -l pl.UTF-8 |
48fb2a6b JB |
123 | Biblioteka SWIG: php. |
124 | ||
125 | %package python | |
126 | Summary: SWIG library: python | |
eeba410f | 127 | Summary(pl.UTF-8): Biblioteka SWIG: python |
8d185dc8 | 128 | License: free |
48fb2a6b | 129 | Group: Libraries |
fd89abd1 | 130 | Requires: %{name} = %{version}-%{release} |
48fb2a6b JB |
131 | |
132 | %description python | |
133 | SWIG library: python. | |
134 | ||
b386be58 | 135 | %description python -l pl.UTF-8 |
48fb2a6b JB |
136 | Biblioteka SWIG: python. |
137 | ||
138 | %package ruby | |
139 | Summary: SWIG library: ruby | |
eeba410f | 140 | Summary(pl.UTF-8): Biblioteka SWIG: ruby |
8d185dc8 | 141 | License: free |
48fb2a6b | 142 | Group: Libraries |
fd89abd1 | 143 | Requires: %{name} = %{version}-%{release} |
0a4291d4 | 144 | %{?ruby_mod_ver_requires_eq} |
48fb2a6b JB |
145 | |
146 | %description ruby | |
147 | SWIG library: ruby. | |
148 | ||
b386be58 | 149 | %description ruby -l pl.UTF-8 |
48fb2a6b JB |
150 | Biblioteka SWIG: ruby. |
151 | ||
152 | %package tcl | |
153 | Summary: SWIG library: tcl | |
eeba410f | 154 | Summary(pl.UTF-8): Biblioteka SWIG: tcl |
8d185dc8 | 155 | License: free |
48fb2a6b | 156 | Group: Libraries |
fd89abd1 | 157 | Requires: %{name} = %{version}-%{release} |
48fb2a6b JB |
158 | |
159 | %description tcl | |
160 | SWIG library: tcl. | |
161 | ||
b386be58 | 162 | %description tcl -l pl.UTF-8 |
48fb2a6b JB |
163 | Biblioteka SWIG: tcl. |
164 | ||
4c9f45fa | 165 | %prep |
fd89abd1 | 166 | %setup -q |
754c3c3a | 167 | %patch0 -p1 |
4c9f45fa | 168 | |
169 | %build | |
c44d5037 JB |
170 | %{__aclocal} -I Tools/config |
171 | %{__autoconf} | |
fd89abd1 | 172 | %{__automake} |
b41764c7 | 173 | %configure |
4c9f45fa | 174 | |
a5c86aca | 175 | %{__make} \ |
c44d5037 | 176 | OPT="%{rpmcflags}" |
a778deab | 177 | |
4c9f45fa | 178 | %install |
179 | rm -rf $RPM_BUILD_ROOT | |
2c3035a6 | 180 | install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_examplesdir}/%{name}-%{version}} |
62bc0a5c | 181 | |
fd89abd1 | 182 | %{__make} install \ |
c44d5037 JB |
183 | DESTDIR=$RPM_BUILD_ROOT \ |
184 | M4_INSTALL_DIR=$RPM_BUILD_ROOT%{_aclocaldir} | |
f1505a61 | 185 | |
7eb26fa0 | 186 | cp -a Examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
f1505a61 | 187 | |
4c9f45fa | 188 | %clean |
189 | rm -rf $RPM_BUILD_ROOT | |
190 | ||
191 | %files | |
7eb26fa0 | 192 | %defattr(644,root,root,755) |
8d185dc8 | 193 | %doc ANNOUNCE CHANGES CHANGES.current COPYRIGHT LICENSE LICENSE-UNIVERSITIES README RELEASENOTES TODO Doc |
7c6ffd0d | 194 | %attr(755,root,root) %{_bindir}/ccache-swig |
f1505a61 | 195 | %attr(755,root,root) %{_bindir}/swig |
8dc93494 JB |
196 | %dir %{_datadir}/%{name} |
197 | %dir %{_datadir}/%{name}/%{version} | |
198 | %{_datadir}/%{name}/%{version}/*.i | |
199 | %{_datadir}/%{name}/%{version}/allkw.swg | |
21ded742 | 200 | %{_datadir}/%{name}/%{version}/director_common.swg |
8dc93494 JB |
201 | %{_datadir}/%{name}/%{version}/runtime.swg |
202 | %{_datadir}/%{name}/%{version}/swig*.swg | |
203 | %{_datadir}/%{name}/%{version}/allegrocl | |
204 | %{_datadir}/%{name}/%{version}/cffi | |
205 | %{_datadir}/%{name}/%{version}/chicken | |
206 | %{_datadir}/%{name}/%{version}/clisp | |
207 | %{_datadir}/%{name}/%{version}/csharp | |
208 | %{_datadir}/%{name}/%{version}/d | |
209 | %{_datadir}/%{name}/%{version}/gcj | |
210 | %{_datadir}/%{name}/%{version}/go | |
211 | %{_datadir}/%{name}/%{version}/java | |
286ce71a JB |
212 | %dir %{_datadir}/%{name}/%{version}/javascript |
213 | %{_datadir}/%{name}/%{version}/javascript/jsc | |
214 | %{_datadir}/%{name}/%{version}/javascript/v8 | |
8dc93494 JB |
215 | %{_datadir}/%{name}/%{version}/lua |
216 | %{_datadir}/%{name}/%{version}/modula3 | |
217 | %{_datadir}/%{name}/%{version}/mzscheme | |
218 | %{_datadir}/%{name}/%{version}/ocaml | |
219 | %{_datadir}/%{name}/%{version}/octave | |
220 | %{_datadir}/%{name}/%{version}/pike | |
221 | %{_datadir}/%{name}/%{version}/r | |
21ded742 | 222 | %{_datadir}/%{name}/%{version}/scilab |
8dc93494 JB |
223 | %{_datadir}/%{name}/%{version}/std |
224 | %{_datadir}/%{name}/%{version}/typemaps | |
225 | %{_datadir}/%{name}/%{version}/uffi | |
7eb26fa0 | 226 | %{_examplesdir}/%{name}-%{version} |
48fb2a6b JB |
227 | |
228 | %if %{with guile} | |
229 | %files guile | |
230 | %defattr(644,root,root,755) | |
fd89abd1 | 231 | %{_datadir}/%{name}/%{version}/guile |
48fb2a6b JB |
232 | %endif |
233 | ||
234 | %if %{with perl} | |
235 | %files perl | |
236 | %defattr(644,root,root,755) | |
fd89abd1 | 237 | %{_datadir}/%{name}/%{version}/perl5 |
48fb2a6b JB |
238 | %endif |
239 | ||
240 | %if %{with php} | |
241 | %files php | |
242 | %defattr(644,root,root,755) | |
c9149a66 | 243 | %{_datadir}/%{name}/%{version}/php |
48fb2a6b JB |
244 | %endif |
245 | ||
246 | %files python | |
247 | %defattr(644,root,root,755) | |
fd89abd1 | 248 | %{_datadir}/%{name}/%{version}/python |
48fb2a6b JB |
249 | |
250 | %if %{with ruby} | |
251 | %files ruby | |
252 | %defattr(644,root,root,755) | |
fd89abd1 | 253 | %{_datadir}/%{name}/%{version}/ruby |
48fb2a6b JB |
254 | %endif |
255 | ||
256 | %if %{with tcl} | |
257 | %files tcl | |
258 | %defattr(644,root,root,755) | |
fd89abd1 | 259 | %{_datadir}/%{name}/%{version}/tcl |
48fb2a6b | 260 | %endif |