%define pythonver 2.2 %define pythonsitedir %{_libdir}/python%{pythonver}/site-packages %define beta_version rc4 %define is_release 1 %define qtver 3.0.5 %define qtpkg qt Summary: SIP - Python/C++ Bindings Generator Name: sip Version: 3.3.2 %if %{is_release} Release: 4 %else Release: 0.%{beta_version}.1 %endif License: GPL Group: Development/Tools %if %{is_release} Source: http://www.riverbankcomputing.co.uk/download/sip/sip-%{version}.tar.gz %else Source: http://www.riverbankcomputing.co.uk/download/sip/sip-%{version}%{beta_version}.tar.gz %endif BuildRoot: %{_tmppath}/%{name}-%{version}-root Url: http://www.riverbankcomputing.co.uk/ Prereq: /sbin/ldconfig %if "%{pythonver}" == "2.2" %define pythonpkg python %define pythonprog /usr/bin/python2.2 %define minor .1 %else %define pythonpkg python %define pythonprog /usr/bin/python %define minor .2 %endif BuildPrereq: %{pythonpkg} == %{pythonver}%{minor} BuildPrereq: %{qtpkg}-devel >= %{qtver} BuildPrereq: sed Requires: %{pythonpkg} == %{pythonver}%{minor} %description SIP is a tool for generating bindings for C++ classes so that they can be accessed as normal Python classes. SIP takes many of its ideas from SWIG but, because it is specifically designed for C++ and Python, is able to generate tighter bindings. SIP is so called because it is a small SWIG. SIP was originally designed to generate Python bindings for KDE and so has explicit support for the signal slot mechanism used by the Qt/KDE class libraries. However, SIP can be used to generate Python bindings for any C++ class library. %package devel Summary: Files needed to generate Python bindings for any C++ class library Group: Development/Libraries Requires: %{name} = %{version} %description devel This package contains files needed to generate Python bindings for any C++ classes library. %prep %if %{is_release} %setup -q %else %setup -q -n %{name}-%{version}%{beta_version} %endif %build rm -rf $RPM_BUILD_ROOT mkdir -p %{buildroot}%{pythonsitedir} \ %{buildroot}%{_bindir} QTDIR="" && source /etc/profile.d/qt.sh %pythonprog build.py \ -l qt-mt \ -b %{buildroot}%{_bindir} \ -d %{buildroot}%{pythonsitedir} mv siplib/Makefile siplib/Makefile.orig sed -e "s#-rpath,.*site-packages*#-rpath,%{pythonsitedir}#" siplib/Makefile.orig >siplib/Makefile make %{?_smp_mflags} %install mkdir -p %{buildroot}%{_includedir}/python%{pythonver} install siplib/*.h %{buildroot}%{_includedir}/python%{pythonver}/ %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root) %doc ChangeLog LICENSE NEWS README THANKS %{pythonsitedir}/*.so* %{_bindir}/* %files devel %defattr(-,root,root) %{_includedir}/python%{pythonver}/* %changelog * Wed Aug 28 2002 Than Ngo 3.3.2-4 - rpath issue * Mon Aug 26 2002 Than Ngo 3.3.2-3 - rebuild against new qt * Sat Aug 10 2002 Elliot Lee - rebuilt with gcc-3.2 (we hope) * Tue Jul 23 2002 Than Ngo 3.3.2-1 - 3.3.2 release for qt 3.0.5 * Mon Jul 1 2002 Than Ngo 3.2.4-4 - move python modul libsip.so into sip (bug #67640) * Fri Jun 21 2002 Tim Powers - automated rebuild * Sun May 26 2002 Tim Powers - automated rebuild * Wed May 22 2002 Harald Hoyer - updated to release 3.2.4 * Thu May 02 2002 Than Ngo 3.2-0.rc4 - 3.2rc4 - build against python 2 * Tue Apr 16 2002 Than Ngo 3.1-2 - rebuild * Fri Mar 29 2002 Than Ngo 3.1-1 - update 3.1 for qt 3.0.3 * Tue Mar 07 2002 Than Ngo 3.0-6 - rebuild against qt3 * Fri Feb 22 2002 Than Ngo 3.0-5 - build against python 1.5 and qt 2.3.2 * Wed Jan 09 2002 Tim Powers - automated rebuild * Tue Jan 08 2002 Than Ngo 3.0-3 - rebuild to get rid of libGL * Mon Nov 19 2001 Than Ngo 3.0-2 - build against qt3 * Sun Nov 18 2001 Than Ngo 3.0-1 - update to 3.0 * Sun Nov 11 2001 Than Ngo 3.0-0.20011110.1 - snapshot * Tue Aug 14 2001 Than Ngo 2.5-1 - update to 2.5 - requires python 2 - Updated URL * Mon Jul 23 2001 Than Ngo - fix build dependency (bug #49698) * Mon Jul 16 2001 Trond Eivind Glomsrød - s/Copyright/License/ - Make devel subpackage depend on main * Mon Apr 23 2001 Than Ngo - update to 2.4 * Wed Feb 28 2001 Tim Powers - rebuilt against new libmng * Fri Feb 23 2001 Than Ngo - fix to use python1.5 * Thu Feb 22 2001 Than Ngo - update to 2.3 release * Fri Feb 02 2001 Than Ngo - rebuild in new envoroment * Tue Dec 26 2000 Than Ngo - rebuilt against qt-2.2.3 - update Url * Mon Nov 20 2000 Tim Powers - rebuilt to fix bad dir perms * Wed Nov 8 2000 Than Ngo - update to 2.2 - don't apply the patch, since the gcc-2.96-62 works correct * Mon Oct 23 2000 Than Ngo - update to 2.1 * Thu Aug 3 2000 Than Ngo - add ldconfig in %post, %postun and Prereq (Bug #15136) * Thu Jul 27 2000 Than Ngo - don't hardcode Qt version * Mon Jul 25 2000 Prospector - rebuilt * Mon Jul 17 2000 Tim Powers - added defattr to both packages * Wed Jul 12 2000 Than Ngo - fix to built withe gcc-2.96 * Mon Jul 03 2000 Prospector - automatic rebuild * Sat May 27 2000 Ngo Than - update 0.12 for 7.0 * Mon May 8 2000 Bernhard Rosenkraenzer - 0.11.1 - Qt 2.1.0 * Wed Feb 2 2000 Bernhard Rosenkraenzer - 0.10.1 - Qt 1.45 - handle RPM_OPT_FLAGS * Tue Dec 21 1999 Ngo Than - updated 0.10 * Tue Dec 14 1999 Ngo Than - 0.10pre5 * Sun Nov 28 1999 Ngo Than - Initial packaging as RPM for powertools-6.2