Search
j0ke.net Open Build Service
>
Projects
>
devel
:
tools
:
building
>
swig
> swig.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File swig.spec of Package swig
# # spec file for package swig (Version 1.3.40) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Name: swig BuildRequires: boost-devel gcc-c++ python-devel BuildRequires: perl python-devel %if 0%{?rhel_version} > 0 BuildRequires: -vim %endif %if 0%{?fedora} + 0%{?rhel_version} > 0 BuildRequires: pkgconfig ruby-devel %if 0%{?rhel_version} == 0 BuildRequires: perl-devel %endif %endif %if 0%{?suse_version} > 0 %if 0%{?suse_version} > 1020 BuildRequires: fdupes %endif # SLE9 %if 0%{?suse_version} < 920 BuildRequires: pkgconfig ruby %else # SLE10 and up BuildRequires: ruby-devel BuildRequires: pkg-config %endif %endif Url: http://www.swig.org License: BSD3c Group: Development/Languages/C and C++ AutoReqProv: on Summary: Simplified Wrapper and Interface Generator Version: 1.3.40 Release: 3 Source: swig-%{version}.tar.bz2 Patch1: swig-1.3.36-perl-long-long.patch Patch2: swig-fixassert.diff Patch3: adapt-perl512.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description SWIG is a compiler that attempts to make it easy to integrate C, C++, or Objective-C code with scripting languages including Perl, Tcl, and Python. In a nutshell, you give it a bunch of ANSI C/C++ declarations and it generates an interface between C and your favorite scripting language. However, this is only scratching the surface of what SWIG can do--some of its more advanced features include automatic documentation generation, module and library management, extensive customization options, and more. Authors: -------- Dave Beazley <beazley@cs.utah.edu> William S Fulton <wsf@fultondesigns.co.uk> %package doc License: BSD3c Summary: SWIG Manual Group: Development/Languages/C and C++ Requires: swig %if 0%{?suse_version} >= 1120 BuildArch: noarch %endif %description doc SWIG is a compiler that attempts to make it easy to integrate C, C++, or Objective-C code with scripting languages including Perl, Tcl, and Python. In a nutshell, you give it a bunch of ANSI C/C++ declarations and it generates an interface between C and your favorite scripting language. However, this is only scratching the surface of what SWIG can do--some of its more advanced features include automatic documentation generation, module and library management, extensive customization options, and more. This package contains the SWIG manual. Authors: -------- Dave Beazley <beazley@cs.utah.edu> %package examples License: BSD3c Summary: SWIG example files Group: Development/Languages/C and C++ Requires: swig %description examples SWIG is a compiler that attempts to make it easy to integrate C, C++, or Objective-C code with scripting languages including Perl, Tcl, and Python. In a nutshell, you give it a bunch of ANSI C/C++ declarations and it generates an interface between C and your favorite scripting language. However, this is only scratching the surface of what SWIG can do--some of its more advanced features include automatic documentation generation, module and library management, extensive customization options, and more. This package contains SWIG examples, useful both for testing and understandig SWIG usage. Authors: -------- Dave Beazley <beazley@cs.utah.edu> %prep %setup -q %patch1 %patch2 %patch3 -p1 %build v1=$(awk '/^# Generated by GNU Autoconf / { print $6; exit; }' configure) v2=$(autoconf -V | awk '/autoconf \(GNU Autoconf\)/ {print $4; exit}') old=$(perl -e "print ($v1 <= $v2);") if test "x$old" = "x1"; then ./autogen.sh fi export CCSHARED="-fPIC -fno-strict-aliasing $RPM_OPT_FLAGS" export CFLAGS="$RPM_OPT_FLAGS" export CXXFLAGS="$RPM_OPT_FLAGS" ./configure \ --prefix=/usr \ --libdir=%{_libdir} \ --disable-ccache make %{?jobs:-j%jobs} make check %install make install DESTDIR=$RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{_docdir}/%{name} cp -a FUTURE TODO NEW ANNOUNCE CHANGES* LICENSE README Doc/{Devel,Manual} \ $RPM_BUILD_ROOT%{_docdir}/%{name}/ install -d $RPM_BUILD_ROOT%{_libdir}/swig cp -a Examples $RPM_BUILD_ROOT%_libdir/swig/examples # rm files that are not needed for runnig or rebuilding the examples find $RPM_BUILD_ROOT%_libdir/swig \ -name '*.dsp' -o -name '*.vcproj' -o -name '*.sln' -o \ -name '*.o' -o -name '*_wrap.c' | xargs rm # fix perms chmod -x $RPM_BUILD_ROOT%_docdir/%name/Manual/* find $RPM_BUILD_ROOT%_libdir/swig -name '*.h' -perm +111 | \ xargs --no-run-if-empty chmod -x ln -s %_libdir/swig/examples $RPM_BUILD_ROOT%_docdir/%name/Examples %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %dir %{_docdir}/%{name} %{_docdir}/%{name}/[A-Z][A-Z]* %{_datadir}/swig %attr(755,root,root) %{_bindir}/swig %files doc %defattr(-,root,root) %{_docdir}/%{name}/Devel %{_docdir}/%{name}/Manual %files examples %defattr(-,root,root) %{_docdir}/%{name}/Examples %{_libdir}/swig %changelog