]> git.pld-linux.org Git - packages/swig.git/blobdiff - swig.spec
- rel 2
[packages/swig.git] / swig.spec
index 011c56d9a0f51a8029e4ccab6e85f2e820a144a2..c1fae8af3c42bf73b67061b8cd7de560dec2f054 100644 (file)
--- a/swig.spec
+++ b/swig.spec
@@ -1,22 +1,44 @@
+#
+# Conditional build:
+%bcond_without guile   # disable guile support
+%bcond_without ocaml   # disable ocaml support
+%bcond_without perl    # disable perl support
+%bcond_without php     # disable php support
+%bcond_without ruby    # disable ruby support
+%bcond_without tcl     # disable tcl support
+#
 Summary:       Interface generator for Perl, Tcl, Guile and Python
-Summary(pl):   Generator interfejsu do Perl'a, Tcl'a, Guile'a i Python'a
+Summary(pl):   Generator interfejsów do Perla, Tcl-a, Guile'a i Pythona
+Summary(pt_BR):        Gerador de Interfaces e "Wrappers" Simplificado (SWIG)
 Name:          swig
-Version:       1.3.11
+Version:       1.3.29
 Release:       2
 License:       distributable
 Group:         Development/Languages
-Source0:       http://prdownloads.sourceforge.net/swig/%{name}-%{version}.tar.gz
-Patch0:                %{name}-configure.patch
+Source0:       http://dl.sourceforge.net/swig/%{name}-%{version}.tar.gz
+# Source0-md5: 44c6f6d8d724cf7fa4a5109e6f63c9b1
+Patch0:                %{name}-format.patch
+Patch1:                %{name}-php.patch
+Patch2:                %{name}-php-freearg.patch
+Patch3:                %{name}-php-vdecl.patch
+Patch4:                %{name}-python25.patch
 URL:           http://www.swig.org/
 BuildRequires: autoconf
-BuildRequires: guile-devel
+BuildRequires: automake
+%{?with_guile:BuildRequires:   guile-devel}
 BuildRequires: libstdc++-devel
-BuildRequires: perl-devel >= 5.6.1
-BuildRequires: php-devel >= 4.1.0
-BuildRequires: python >= 2.2
-BuildRequires: ruby >= 1.6.3
-BuildRequires: tcl >= 8.3.3
-Icon:          swig.gif
+BuildRequires: libtool
+%{?with_ocaml:BuildRequires:   ocaml}
+%{?with_perl:BuildRequires:    perl-devel >= 1:5.6.1}
+%{?with_php:BuildRequires:     php-cli}
+%{?with_php:BuildRequires:     php-devel >= 4.1.0}
+BuildRequires: python-devel >= 1:2.3.2
+%if %{with ruby}
+BuildRequires: rpmbuild(macros) >= 1.277
+BuildRequires: ruby-devel >= 1:1.6.3
+%endif
+%{?with_tcl:BuildRequires:     tcl-devel >= 8.3.3}
+Obsoletes:     swig-ocaml
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -35,136 +57,194 @@ individually, but without this support, SWIG would be not be nearly as
 powerful or fun to use as it is now. Many thanks!
 
 %description -l pl
-SWIG jesk kompilatorem, który próbuje ulatwic integrowanie kodu
-napisanego w C, C++ lub Objective-C z jêzykami skryptowymitakimi jak
-Perl, Tcl i Python. Mówi±c najpro¶ciej, jesli dostarczysz mu zestaw
-zdeklarowanych w ANSI C/C++ funkcji, SWIG wygeneruje Ci interfejs
-pomiedzy C a Twoim ulubionym jêzykiem skryptowym. To tylko drobna
+SWIG jesk kompilatorem, który próbuje u³atwiæ integrowanie kodu
+napisanego w C, C++ lub Objective-C z jêzykami skryptowymitakimi jak
+Perl, Tcl i Python. Mówi±c najpro¶ciej, jeli dostarczysz mu zestaw
+zadeklarowanych w ANSI C/C++ funkcji, SWIG wygeneruje Ci interfejs
+pomiêdzy C a Twoim ulubionym jêzykiem skryptowym. To tylko drobna
 czê¶æ tego co SWIG potrafi robiæ, bardziej zaawansowane zastosowania
-to automatyczne generowanie dokumentacji, zarzadzanie bibliotekami i
+to automatyczne generowanie dokumentacji, zarz±dzanie bibliotekami i
 modu³ami i wiele innych.
 
-SWIG jest w ca³o¶ci dzi³em ludzi, którzy go u¿ywali i wprowadzali nowe
-pomys³y. Zbyt wielu ich jest, aby dziêkowaæ ka¿demu z nich osobno, ale
-bez ich wsparcia, SWIG nie by³by anie tak pote¿nym na¿edziem, ani tak
-fajnym w u¿yciu jak jest teraz. Wiekie dziêki!
+SWIG jest w ca³o¶ci dzie³em ludzi, którzy go u¿ywali i wprowadzali
+nowe pomys³y. Zbyt wielu ich jest, aby dziêkowaæ ka¿demu z nich
+osobno, ale bez ich wsparcia SWIG nie by³by ani tak potê¿nym
+narzêdziem, ani tak fajnym w u¿yciu jak jest teraz. Wiekie dziêki!
+
+%description -l pt_BR
+O SWIG gera interfaces para perl, python e Tcl a partir de uma arquivo
+com uma interface de descrição que consiste de uma combinação de C/C++
+e diretivas especiais. Permite que linguagens tipo script usem C/C++
+com um mínimo de esforço.
 
 %package guile
 Summary:       SWIG library: guile
 Summary(pl):   Biblioteka SWIG: guile
 Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
 
 %description guile
-SWIG library: guile
+SWIG library: guile.
 
 %description guile -l pl
-Biblioteka SWIG: guile
+Biblioteka SWIG: guile.
 
 %package perl
 Summary:       SWIG library: Perl
 Summary(pl):   Biblioteka SWIG: Perl
 Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
 
 %description perl
-SWIG library: perl
+SWIG library: perl.
 
 %description perl -l pl
-Biblioteka SWIG: perl
+Biblioteka SWIG: perl.
+
+%package php
+Summary:       SWIG library: php
+Summary(pl):   Biblioteka SWIG: php
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description php
+SWIG library: php.
+
+%description php -l pl
+Biblioteka SWIG: php.
 
 %package python
 Summary:       SWIG library: python
 Summary(pl):   Biblioteka SWIG: python
 Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
 
 %description python
-SWIG library: python
+SWIG library: python.
 
 %description python -l pl
-Biblioteka SWIG: python
+Biblioteka SWIG: python.
 
 %package ruby
 Summary:       SWIG library: ruby
 Summary(pl):   Biblioteka SWIG: ruby
 Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+%{?ruby_mod_ver_requires_eq}
 
 %description ruby
-SWIG library: ruby
+SWIG library: ruby.
 
 %description ruby -l pl
-Biblioteka SWIG: ruby
+Biblioteka SWIG: ruby.
 
 %package tcl
 Summary:       SWIG library: tcl
 Summary(pl):   Biblioteka SWIG: tcl
 Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
 
 %description tcl
-SWIG library: tcl
+SWIG library: tcl.
 
 %description tcl -l pl
-Biblioteka SWIG: tcl
+Biblioteka SWIG: tcl.
 
 %prep
-%setup -q -n SWIG-%{version}
+%setup -q
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
 
 %build
-oldpwd=$PWD
-for i in . Source/DOH Tools Examples/GIFPlot; do
-  cd $i
-  aclocal
-  autoconf
-  cd $oldpwd
-done
+%{__libtoolize}
+%{__aclocal} -I Tools/config
+%{__autoconf}
+%{__automake}
 %configure
-%{__make} OPT="%{rpmcflags}"
 
+%{__make} \
+       OPT="%{rpmcflags}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/{%{_mandir}/man1,%{_examplesdir}/%{name}-%{version}}
+install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_examplesdir}/%{name}-%{version}}
 
 %{__make} install \
-       DESTDIR=$RPM_BUILD_ROOT
+       DESTDIR=$RPM_BUILD_ROOT \
+       M4_INSTALL_DIR=$RPM_BUILD_ROOT%{_aclocaldir}
 
 cp -a Examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
-gzip -9nf CHANGES NEW README ANNOUNCE TODO LICENSE
-
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
+
+%post  guile -p /sbin/ldconfig
+%postun        guile -p /sbin/ldconfig
+
+%post  perl -p /sbin/ldconfig
+%postun        perl -p /sbin/ldconfig
+
+%post  php -p /sbin/ldconfig
+%postun        php -p /sbin/ldconfig
+
+%post  python -p /sbin/ldconfig
+%postun        python -p /sbin/ldconfig
+
+%post  ruby -p /sbin/ldconfig
+%postun        ruby -p /sbin/ldconfig
+
+%post  tcl -p /sbin/ldconfig
+%postun        tcl -p /sbin/ldconfig
+
 %files
 %defattr(644,root,root,755)
-%doc Doc *.gz
-%{_libdir}/%{name}*
+%doc Doc CHANGES NEW README ANNOUNCE TODO LICENSE
 %attr(755,root,root) %{_bindir}/swig
+%{_datadir}/%{name}
+%{?with_guile:%exclude %{_datadir}/%{name}/%{version}/guile}
+%{?with_perl:%exclude %{_datadir}/%{name}/%{version}/perl5}
+%{?with_php:%exclude %{_datadir}/%{name}/%{version}/php4}
+%exclude %{_datadir}/%{name}/%{version}/python
+%{?with_ruby:%exclude %{_datadir}/%{name}/%{version}/ruby}
+%{?with_tcl:%exclude %{_datadir}/%{name}/%{version}/tcl}
 %{_examplesdir}/%{name}-%{version}
 
+%if %{with guile}
 %files guile
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/lib*guile.so
-%attr(755,root,root) %{_libdir}/lib*guile.la
+%{_datadir}/%{name}/%{version}/guile
+%endif
 
+%if %{with perl}
 %files perl
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/lib*pl.so
-%attr(755,root,root) %{_libdir}/lib*pl.la
+%{_datadir}/%{name}/%{version}/perl5
+%endif
+
+%if %{with php}
+%files php
+%defattr(644,root,root,755)
+%{_datadir}/%{name}/%{version}/php4
+%endif
 
 %files python
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/lib*py.so
-%attr(755,root,root) %{_libdir}/lib*py.la
+%{_datadir}/%{name}/%{version}/python
 
+%if %{with ruby}
 %files ruby
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/lib*rb.so
-%attr(755,root,root) %{_libdir}/lib*rb.la
+%{_datadir}/%{name}/%{version}/ruby
+%endif
 
+%if %{with tcl}
 %files tcl
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/lib*tcl*.so
-%attr(755,root,root) %{_libdir}/lib*tcl*.la
+%{_datadir}/%{name}/%{version}/tcl
+%endif
This page took 0.05941 seconds and 4 git commands to generate.