Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1589413
 поиск   регистрация   авторизация 
 
Группа :: Разработка/C
Пакет: swig

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

# vim:set ft=spec:
%def_with M24

%if_with M24
%define _release alt0.M24.1
%else
%define _release alt1
%endif

Name: swig
Version: 1.3.27
Release: %_release

Summary: Simplified Wrapper and Interface Generator (SWIG)
License: Open Source
Group: Development/C
Url: http://www.swig.org/
Packager: Gleb Stiblo <ulfr at altlinux.ru>

Source: http://download.sourceforge.net/swig/%name-%version.tar.gz
Patch1: %name-1.3.21-alt-configure.patch
#Patch2: %name-1.3.22-runtime.patch
Patch3: %name-1.3.22-no_ansi.patch
Patch4: %name-1.3.25-runtime.patch

BuildPreReq: python-devel = %__python_version
BuildRequires: XFree86-devel findlib gcc-c++ guile-devel jdkgcj libruby-devel ocaml perl-devel php-devel ruby tcl-devel lua5 liblua5-devel
#BuildRequires: glibc-devel-static libstdc++-devel ruby-stdlibs

Provides: %name-devel = %version-%release
Obsoletes: %name-devel
#Provides: %name-runtime-guile = %version-%release %name-runtime-php = %version-%release %name-runtime-python = %version-%release %name-runtime-perl = %version-%release %name-runtime-ruby = %version-%release %name-runtime-tcl = %version-%release
Obsoletes: %name-runtime-guile  %name-runtime-php  %name-runtime-python  %name-runtime-perl  %name-runtime-ruby  %name-runtime-tcl


%package doc
Summary: SWIG documentation
Group: Books/Other
Requires: %name = %version-%release

%package runtime-guile
Group: System/Libraries
Summary: SWIG runtime guile library

%package runtime-php
Group: System/Libraries
Summary: SWIG runtime php library

%package runtime-perl
Group: System/Libraries
Summary: SWIG runtime perl library

%package runtime-python
Group: System/Libraries
Summary: SWIG runtime python library

%package runtime-ruby
Group: System/Libraries
Summary: SWIG runtime ruby library

%package runtime-tcl
Group: System/Libraries
Summary: SWIG runtime tcl library

%description
SWIG takes an interface description file written in a combination of C/C++
and special directives and produces interfaces to Perl, Python, and Tcl.
It allows scripting languages to use C/C++ code with minimal effort.

%description doc
SWIG takes an interface description file written in a combination of C/C++
and special directives and produces interfaces to Perl, Python, and Tcl.
It allows scripting languages to use C/C++ code with minimal effort.

This package contains SWIG documentation.

%description runtime-guile
SWIG takes an interface description file written in a combination of C/C++
and special directives and produces interfaces to Perl, Python, and Tcl.
It allows scripting languages to use C/C++ code with minimal effort.

This package contains SWIG runtime guile library.

%description runtime-php
SWIG takes an interface description file written in a combination of C/C++
and special directives and produces interfaces to Perl, Python, and Tcl.
It allows scripting languages to use C/C++ code with minimal effort.

This package contains SWIG runtime php library.

%description runtime-perl
SWIG takes an interface description file written in a combination of C/C++
and special directives and produces interfaces to Perl, Python, and Tcl.
It allows scripting languages to use C/C++ code with minimal effort.

This package contains SWIG runtime perl library.

%description runtime-python
SWIG takes an interface description file written in a combination of C/C++
and special directives and produces interfaces to Perl, Python, and Tcl.
It allows scripting languages to use C/C++ code with minimal effort.

This package contains SWIG runtime python library.

%description runtime-ruby
SWIG takes an interface description file written in a combination of C/C++
and special directives and produces interfaces to Perl, Python, and Tcl.
It allows scripting languages to use C/C++ code with minimal effort.

This package contains SWIG runtime ruby library.

%description runtime-tcl
SWIG takes an interface description file written in a combination of C/C++
and special directives and produces interfaces to Perl, Python, and Tcl.
It allows scripting languages to use C/C++ code with minimal effort.

This package contains SWIG runtime tcl library.

%prep
%setup -q
%patch1 -p1
#%patch4 -p1

%build
./autogen.sh
%__subst 's/PYLIBDIR="lib"/PYLIBDIR="%_lib"/' configure
%configure \
--with-pyinc=%_includedir/python%__python_version \
--with-pylib=%_libdir/python%__python_version \
--with-tclconfig=%_libdir
#--with-tcl --with-python --with-perl5 --with-java --with-guile --with-ruby --with-php4

#%__subst -p 's,/usr/local/include/Py,%_includedir/python%__python_version,g' Runtime/Makefile

# SMP incompatible
# no `all' target
%make
#%make runtime
#pushd Runtime
#%make
#popd
bzip2 -9fk CHANGES TODO

%install
%make_install install  \
DESTDIR=%buildroot \
M4_INSTALL_DIR=%buildroot%_datadir/aclocal
%__mkdir_p %buildroot%_includedir
%__cp -aL Source/Swig/swig.h Source/DOH/doh.h %buildroot%_includedir/
# symlinks
#__rm -fv Examples/perl Examples/test-suite/perl Examples/GIFPlot/Php4

%define docdir %_docdir/%name-%version
%__rm -rf %buildroot%docdir
%__mkdir_p %buildroot%docdir
%__install -p -m644 ANNOUNCE CHANGES.* LICENSE README TODO.* NEW FUTURE \
%buildroot%docdir/
%__cp -a Examples Doc %buildroot%docdir/

#pushd Runtime

#%make_install install DESTDIR=%buildroot
#popd

%post runtime-guile -p %post_ldconfig
%postun runtime-guile -p %postun_ldconfig

%post runtime-php -p %post_ldconfig
%postun runtime-php -p %postun_ldconfig

%post runtime-perl -p %post_ldconfig
%postun runtime-perl -p %postun_ldconfig

%post runtime-python -p %post_ldconfig
%postun runtime-python -p %postun_ldconfig

%post runtime-ruby -p %post_ldconfig
%postun runtime-ruby -p %postun_ldconfig

%post runtime-tcl -p %post_ldconfig
%postun runtime-tcl -p %postun_ldconfig

%files
%_bindir/%name
#%_datadir/aclocal/%name.m4
%_includedir/*
%_datadir/%{name}
%dir %docdir
%docdir/[A-Z][A-Z]*

%files doc
%dir %docdir
%docdir/[A-Z][a-z]*

#%files runtime-guile

#%_libdir/libswigguile*.so*
#%doc CHANGES.current LICENSE

#%files runtime-php

#%_libdir/libswigphp*.so*
#%doc CHANGES.current LICENSE

#%files runtime-perl

#%_libdir/libswigpl*.so*
#%doc CHANGES.current LICENSE

#%files runtime-python

#%_libdir/libswigpy*.so*
#%doc CHANGES.current LICENSE

#%files runtime-ruby

#%_libdir/libswigrb*.so*
#%doc CHANGES.current LICENSE

#%files runtime-tcl

#%_libdir/libswigtcl*.so*
#%doc CHANGES.current LICENSE

%changelog

Полный changelog можно просмотреть здесь

 
design & coding: Vladimir Lettiev aka crux © 2004-2005