%define lua_version 5.3.3-1 %define pcre_version 8.39-1 %define perl_version 5.8.8-2 %define python_version 2.6.2-2 %define tcl_version 8.6.6-1 %define zlib_version 1.2.3-7 Summary: Connects C/C++/Objective C to some high-level programming languages. Name: swig Version: 3.0.11 Release: 1 License: GPLv3+ and BSD Group: Development/Tools URL: http://swig.sourceforge.net/ Source0: http://downloads.sourceforge.net/project/swig/swig/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: dos2unix BuildRequires: make BuildRequires: lua-devel >= %{lua_version} BuildRequires: pcre >= %{pcre_version} BuildRequires: perl >= %{perl_version} BuildRequires: python-devel >= %{python_version} BuildRequires: tcl-devel >= %{tcl_version} BuildRequires: zlib-devel >= %{zlib_version} Requires: pcre >= %{pcre_version} Requires: zlib >= %{zlib_version} %description Simplified Wrapper and Interface Generator (SWIG) is a software development tool for connecting C, C++ and Objective C programs with a variety of high-level programming languages. SWIG is primarily used with Perl, Python and Tcl/TK, but it has also been extended to Java, Eiffel and Guile. SWIG is normally used to create high-level interpreted programming environments, systems integration, and as a tool for building user interfaces. %package doc Summary: Documentation files for SWIG License: BSD Group: Development/Tools %description doc This package contains documentation for SWIG and useful examples. %prep %setup -q %build export CC="xlc_r -DLUA_C89_NUMBERS" export CXX="xlC_r -DLUA_C89_NUMBERS" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --with-pcre-prefix=%{_prefix} \ --with-tclconfig=%{_libdir} \ --with-python=/usr/bin/python \ --without-python3 \ --with-perl5=%{_bindir}/perl \ --without-octave \ --without-scilab \ --without-java \ --without-javascript \ --without-android \ --without-ruby \ --without-php \ --without-ocaml \ --without-pike \ --without-chicken \ --without-csharp \ --with-lua=%{_bindir}/lua \ --without-allegrocl \ --without-clisp \ --without-r \ --without-go \ --without-d gmake %{?_smp_mflags} %install # Remove all arch independent files in Examples/ created during tests gmake clean-examples cd Examples # Remove all arch dependent files in Examples/ find . -type f -name 'Makefile.in' -exec rm {} \; # We don't want to ship files below. rm -rf test-suite find . -type f -name '*.dsp' -exec rm {} \; find . -type f -name '*.dsw' -exec rm {} \; # Convert files to UNIX format for i in `find . -type f`; do dos2unix -k ${i} chmod -x ${i} done cd .. gmake DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %{_bindir}/* %{_datadir}/%{name} /usr/bin/* %files doc %doc ANNOUNCE CHANGES INSTALL LICENSE* README TODO %doc Doc Examples %changelog * Thu Jan 12 2017 Michael Perzl - 3.0.11-1 - updated to version 3.0.11 * Wed Nov 11 2009 Michael Perzl - 1.3.40-1 - first version for AIX V5.1 and higher