cd0c163
de034a7
%global with_python3 0
de034a7
de034a7
%if 0%{?with_python3}
de034a7
%{!?python3_inc:%global python3_inc %(%{__python3} -c "from distutils.sysconfig import get_python_inc; print(get_python_inc(1))")}
de034a7
%global python3dir   python3-%{name}-%{version}%{?snap:-snapshot-%{snap}}
de034a7
%endif
de034a7
e81b45d
%{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
e81b45d
%{!?python_inc:%global python_inc %(%{__python} -c "from distutils.sysconfig import get_python_inc; print get_python_inc(1)")}
e81b45d
e8565e0
%define snap 20100102
e8565e0
cvsdist 49f66d1
Summary: SIP - Python/C++ Bindings Generator
cvsdist 49f66d1
Name: sip
e8565e0
Version: 4.10
de034a7
Release: 0.2.%{snap}%{?dist}
413b3a1
License: GPLv2 or GPLv3
cvsdist 49f66d1
Group: Development/Tools
1169b0b
Url: http://www.riverbankcomputing.com/software/sip/intro 
413b3a1
Source0: http://www.riverbankcomputing.com/static/Downloads/sip4/sip-%{version}%{?snap:-snapshot-%{snap}}.tar.gz
b6dceb6
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
e81b45d
20ee583
# extracted from sip.h, SIP_API_MAJOR_NR SIP_API_MINOR_NR defines
20ee583
Source1: macros.sip
e8565e0
%global _sip_api_major 7
20ee583
%global _sip_api_minor 0
20ee583
%global _sip_api %{_sip_api_major}.%{_sip_api_minor}
20ee583
20ee583
Provides: sip-api(%{_sip_api_major}) = %{_sip_api}
20ee583
910c638
BuildRequires: python-devel
b6dceb6
BuildRequires: sed
cvsdist 4f91b63
de034a7
%if 0%{?with_python3}
de034a7
BuildRequires:  python3-devel
de034a7
%endif
de034a7
cvsdist 49f66d1
%description
cvsdist 49f66d1
SIP is a tool for generating bindings for C++ classes so that they can be
7947156
accessed as normal Python classes. SIP takes many of its ideas from SWIG but,
cvsdist 49f66d1
because it is specifically designed for C++ and Python, is able to generate
7947156
tighter bindings. SIP is so called because it is a small SWIG.
cvsdist 49f66d1
cvsdist 49f66d1
SIP was originally designed to generate Python bindings for KDE and so has
cvsdist 49f66d1
explicit support for the signal slot mechanism used by the Qt/KDE class
7947156
libraries. However, SIP can be used to generate Python bindings for any C++
cvsdist 49f66d1
class library.
cvsdist 49f66d1
cvsdist 49f66d1
%package devel
cvsdist 49f66d1
Summary: Files needed to generate Python bindings for any C++ class library
cvsdist 49f66d1
Group: Development/Libraries
cvsdist 4f91b63
Requires: %{name} = %{version}-%{release}
cvsdist 199f046
Requires: python-devel 
20ee583
Requires: rpm
cvsdist 49f66d1
%description devel
cvsdist 49f66d1
This package contains files needed to generate Python bindings for any C++
cvsdist 49f66d1
classes library.
cvsdist 49f66d1
de034a7
%if 0%{?with_python3}
de034a7
%package -n python3-sip
de034a7
Summary: SIP - Python 3/C++ Bindings Generator
de034a7
Group: Development/Tools
de034a7
Provides: python3-sip-api(%{_sip_api_major}) = %{_sip_api}
de034a7
de034a7
%description -n python3-sip
de034a7
This is the Python 3 build of SIP.
de034a7
de034a7
SIP is a tool for generating bindings for C++ classes so that they can be
de034a7
accessed as normal Python 3 classes. SIP takes many of its ideas from SWIG but,
de034a7
because it is specifically designed for C++ and Python, is able to generate
de034a7
tighter bindings. SIP is so called because it is a small SWIG.
de034a7
de034a7
SIP was originally designed to generate Python bindings for KDE and so has
de034a7
explicit support for the signal slot mechanism used by the Qt/KDE class
de034a7
libraries. However, SIP can be used to generate Python 3 bindings for any C++
de034a7
class library.
de034a7
de034a7
%package -n python3-sip-devel
de034a7
Summary: Files needed to generate Python 3 bindings for any C++ class library
de034a7
Group: Development/Libraries
de034a7
Requires: python3-sip = %{version}-%{release}
de034a7
Requires: python3-devel
de034a7
Requires: rpm
de034a7
de034a7
%description -n python3-sip-devel
de034a7
This package contains files needed to generate Python 3 bindings for any C++
de034a7
classes library.
de034a7
%endif
de034a7
e81b45d
cvsdist 49f66d1
%prep
cvsdist 199f046
a22bcd3
%setup -q -n %{name}-%{version}%{?snap:-snapshot-%{snap}}
afc95f4
de034a7
%if 0%{?with_python3}
de034a7
#FIXME: rdieter says: reuse the %setup macro - but this is a simple case, without lots of patch application etc
de034a7
pushd ..
de034a7
cp -a %{name}-%{version}%{?snap:-snapshot-%{snap}} %{python3dir}
de034a7
popd
de034a7
%endif
de034a7
e81b45d
cvsdist 49f66d1
%build
e81b45d
%{__python} configure.py -d %{python_sitearch} CXXFLAGS="%{optflags}" CFLAGS="%{optflags}"
cvsdist 460264a
cvsdist 3e556a4
make %{?_smp_mflags} 
cvsdist 49f66d1
de034a7
%if 0%{?with_python3}
de034a7
pushd ../%{python3dir}
de034a7
%{__python3} configure.py -d %{python3_sitearch} CXXFLAGS="%{optflags}" CFLAGS="%{optflags}" --sipdir=%{_datadir}/python3-sip
de034a7
de034a7
make %{?_smp_mflags} 
de034a7
popd
de034a7
%endif
de034a7
e81b45d
cvsdist 49f66d1
%install
cvsdist 199f046
rm -rf %{buildroot}
cvsdist 199f046
cvsdist 199f046
make install DESTDIR=%{buildroot}
da0c076
mkdir -p %{buildroot}%{_datadir}/sip
cvsdist 49f66d1
20ee583
install -D -p -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.sip
20ee583
de034a7
%if 0%{?with_python3}
de034a7
pushd ../%{python3dir}
de034a7
#FIXME: this is going to stomp over /usr/bin/sip from the python2 build above:
de034a7
make install DESTDIR=%{buildroot}
de034a7
mkdir -p %{buildroot}%{_datadir}/python3-sip
de034a7
popd
de034a7
%endif
de034a7
e81b45d
cvsdist 49f66d1
%clean
cvsdist 199f046
rm -rf %{buildroot}
cvsdist 49f66d1
e81b45d
cvsdist 49f66d1
%files
e81b45d
%defattr(-,root,root,-)
261fe85
%doc ChangeLog LICENSE NEWS README
413b3a1
%doc LICENSE-GPL2.txt LICENSE-GPL3.txt
910c638
%{python_sitearch}/*
cvsdist 49f66d1
cvsdist 49f66d1
%files devel
e81b45d
%defattr(-,root,root,-)
e2ad522
%{_bindir}/sip
e81b45d
%{_datadir}/sip/
e81b45d
%{python_inc}/*
e2ad522
%{_sysconfdir}/rpm/macros.sip
e81b45d
de034a7
%if 0%{?with_python3}
de034a7
%files -n python3-sip
de034a7
%{python3_sitearch}/*
de034a7
de034a7
%files -n python3-sip-devel
de034a7
# FIXME: what should the python3 sip binary be named?  It gets invoked by name in various places higher up in the KDE-Python stack...
de034a7
%{_bindir}/sip-3
de034a7
%{_datadir}/python-3sip/
de034a7
%{python3_inc}/*
de034a7
%endif
de034a7
cvsdist 49f66d1
cvsdist 49f66d1
%changelog
de034a7
* Fri Jan 08 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.10-0.2.20100102
de034a7
- RFE: Support python3 when building sip (#545124)
de034a7
- drop old pre v4 changelog
de034a7
de034a7
* Thu Jan 07 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.10-0.1.20100102
e8565e0
- sip-4.10-snapshot-20100102
e8565e0
233bd42
* Mon Nov 23 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.9.3-1
233bd42
- sip-4.9.3
233bd42
3ba24ed
* Fri Nov 20 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.9.2-1
3ba24ed
- sip-4.9.2
3ba24ed
e2ad522
* Tue Nov 16 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.9.1-3
e2ad522
- move sip binary to -devel 
e2ad522
20ee583
* Mon Nov 16 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.9.1-2
20ee583
- Provides: sip-api(%%_sip_api_major) = %%_sip_api
20ee583
- devel: /etc/rpm/macros.sip helper
20ee583
5404147
* Fri Oct 23 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.9.1-1
5404147
- sip-4.9.1
5404147
e176914
* Thu Oct 15 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.9.1-0.1.20091014
e176914
- sip-4.9.1-snapshot-20091014
e176914
413b3a1
* Thu Oct 15 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.9-1
413b3a1
- sip-4.9
413b3a1
- License: GPLv2 or GPLv3
413b3a1
43bba52
* Mon Aug 10 2009 Ville Skyttä <ville.skytta@iki.fi> - 4.8.2-2
43bba52
- Convert specfile to UTF-8.
43bba52
fa343ff
* Tue Jul 28 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.8.2-1
fa343ff
- sip-4.8.2
fa343ff
806b8ee
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.8.1-2
806b8ee
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
806b8ee
7c80e4f
* Tue Jun 16 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.8.1-1
7c80e4f
- sip-4.8.1
7c80e4f
8f78f2c
* Fri Jun 05 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.8-1
8f78f2c
- sip-4.8
8f78f2c
f9756f7
* Thu May 21 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.8-0.1.20090430
f9756f7
- sip-4.8-snapshot-20090430
f9756f7
1780dd6
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.7.9-3
1780dd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
1780dd6
9b11b8c
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 4.7.9-2
9b11b8c
- Rebuild for Python 2.6
9b11b8c
c44fd86
* Mon Nov 17 2008 Rex Dieter <rdieter@fedoraproject.org> 4.7.9-1
c44fd86
- sip-4.7.9
c44fd86
c44fd86
* Mon Nov 10 2008 Rex Dieter <rdieter@fedoraproject.org> 4.7.8-1
c44fd86
- sip-4.7.8
c44fd86
69890d2
* Thu Sep 04 2008 Tom "spot" Callaway <tcallawa@redhat.com> 4.7.7-3
69890d2
- fix license tag
69890d2
b4d395f
* Tue Sep 02 2008 Than Ngo <than@redhat.com> 4.7.7-2
b4d395f
- get rid of BR on qt
b4d395f
1169b0b
* Tue Aug 26 2008 Rex Dieter <rdieter@fedoraproject.org> - 4.7.7-1
1169b0b
- sip-4.7.7
1169b0b
8a15a6f
* Wed May 21 2008 Rex Dieter <rdieter@fedoraproject.org> - 4.7.6-1
8a15a6f
- sip-4.7.6
8a15a6f
d4ed633
* Wed May 14 2008 Rex Dieter <rdieter@fedoraproject.org> - 4.7.5-1
d4ed633
- sip-4.7.5
d4ed633
db9ceff
* Tue Mar 25 2008 Rex Dieter <rdieter@fedoraproject.org> - 4.7.4-3
db9ceff
- BR: qt3-devel (f9+)
db9ceff
d3a9f8f
* Tue Feb 12 2008 Rex Dieter <rdieter@fedoraproject.org> - 4.7.4-2
d3a9f8f
- fix 64bit patch
d3a9f8f
cd0c163
* Tue Feb 12 2008 Rex Dieter <rdieter@fedoraproject.org> - 4.7.4-1
cd0c163
- sip-4.7.4
cd0c163
daf2e19
* Thu Dec 06 2007 Rex Dieter <rdieter[AT]fedoraproject.org> - 4.7.3-1
daf2e19
- sip-4.7.3
daf2e19
afc95f4
* Wed Dec 05 2007 Rex Dieter <rdieter[AT]fedoraproject.org> - 4.7.2-1
afc95f4
- sip-4.7.2
afc95f4
- omit needless scriptlets
afc95f4
e81b45d
* Mon Nov 12 2007 Rex Dieter <rdieter[AT]fedoraproject.org> - 4.7.1-2
e81b45d
- License: Python Software Foundation License v2
e81b45d
- fix/cleanup some macro usage
e81b45d
- fix Source, Url. 
e81b45d
0a2ceea
* Mon Oct 22 2007 Than Ngo <than@redhat.com> - 4.7.1-1
0a2ceea
- 4.7.1
0a2ceea
40cea3b
* Mon Oct 01 2007 Than Ngo <than@redhat.com> - 4.6-3
40cea3b
- fix rh#289321, sipconfig.py includes wrong py_lib_dir, thanks to Rex Dieter
40cea3b
7947156
* Thu Aug 30 2007 Than Ngo <than@redhat.com> - 4.6-2.fc7
7947156
- typo in description
7947156
6e36d25
* Thu Apr 12 2007 Than Ngo <than@redhat.com> - 4.6-1.fc7
6e36d25
- 4.6
6e36d25
f0b570d
* Thu Jan 18 2007 Than Ngo <than@redhat.com> - 4.5.2-1
f0b570d
- 4.5.2 
f0b570d
910c638
* Thu Dec  7 2006 Jeremy Katz <katzj@redhat.com> - 4.5-2
910c638
- rebuild against python 2.5
910c638
- cleanups for python packaging guidelines
910c638
0bf08f6
* Mon Nov 06 2006 Than Ngo <than@redhat.com> 4.5-1
0bf08f6
- 4.5
0bf08f6
d0e1716
* Thu Sep 28 2006 Than Ngo <than@redhat.com> 4.4.5-3
d0e1716
- fix #207297, use qt qmake files
d0e1716
c706533
* Wed Sep 20 2006 Than Ngo <than@redhat.com> 4.4.5-2
c706533
- fix #206633, own %%_datadir/sip
c706533
b6dceb6
* Wed Jul 19 2006 Than Ngo <than@redhat.com> 4.4.5-1
b6dceb6
- update to 4.4.5
b6dceb6
f37eb2e
* Mon Jul 17 2006 Than Ngo <than@redhat.com> 4.4.3-2
f37eb2e
- rebuild
f37eb2e
e9d3d34
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 4.4.3-1.1
e9d3d34
- rebuild
e9d3d34
d9ca327
* Thu Apr 27 2006 Than Ngo <than@redhat.com> 4.4.3-1
d9ca327
- update to 4.4.3
d9ca327
- built with %%{optflags}
d9ca327
7a04a49
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 4.3.1-1.2.1
7a04a49
- bump again for double-long bug on ppc(64)
7a04a49
37dade3
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 4.3.1-1.2
37dade3
- rebuilt for new gcc4.1 snapshot and glibc changes
37dade3
702e925
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
702e925
- rebuilt
702e925
e77de54
* Mon Sep 12 2005 Than Ngo <than@redhat.com> 4.3.1-1
e77de54
- update to 4.3.1
e77de54
135c7bd
* Wed Mar 23 2005 Than Ngo <than@redhat.com> 4.2.1-1
135c7bd
- 4.2.1
135c7bd
a6c1ab4
* Fri Mar 04 2005 Than Ngo <than@redhat.com> 4.2-1
a6c1ab4
- 4.2
a6c1ab4
7f6dc7e
* Thu Nov 11 2004 Than Ngo <than@redhat.com> 4.1-2
7f6dc7e
- rebuild against python 2.4
7f6dc7e
91222db
* Fri Sep 24 2004 Than Ngo <than@redhat.com> 4.1-1
91222db
- update to 4.1