summaryrefslogtreecommitdiff
path: root/sip.spec
blob: 7d64e83ef69d0e4e64824e5900d15e387e5ab6cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
%include        /usr/lib/rpm/macros.python
Summary:	Python bindings generator for C++ class libraries
Summary(pl):	Generator powiązań Pythona z bibliotekami klas C++
Name:		sip
Version:	3.11
%define		_snap       	20040218
Release:	0.%{_snap}.7
License:	GPL
Group:		Development/Languages/Python
# Source0:	http://www.river-bank.demon.co.uk/download/sip/%{name}-x11-gpl-%{version}.tar.gz
# http://www.river-bank.demon.co.uk/download/snapshots/sip/sip-snapshot-20040218.tar.gz
Source0:	http://www.river-bank.demon.co.uk/download/snapshots/sip/%{name}-snapshot-%{_snap}.tar.gz
# Source0-md5:	73dd4a8be8e75fb1a44e46280030e0f2
URL:		http://www.riverbankcomputing.co.uk/sip/index.php
BuildRequires:	python-devel >= 2.2
BuildRequires:	qt-devel >= 3.1.2
BuildRequires:	rpm-pythonprov
BuildRequires:	tmake
%pyrequires_eq	python
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%define		_sipfilesdir	%{_datadir}/sip

%description
Generates Python bindings for C++ class libraries from a set of class
specification files. Also includes a runtime support library needed by
all generated bindings.

%description -l pl
Generuje powiązania Pythona z bibliotekami klas C++ ze zbioru plików
ze specyfikacjami klas. Zawiera też bibliotekę potrzebną do
uruchomienia wszystkich wygenerowanych powiązań.

%prep
#%%setup -q -n %{name}-x11-gpl-%{version}
%setup -q -n %{name}-snapshot-%{_snap}

%build
# configure.py notes:
# - macros overrides must be last
# - cannot pass CXXFLAGS+="%{rpmcflags}" or so - builtin -O2 overrides rpmcflags
QTDIR=%{_prefix} \
TMAKEPATH=/usr/share/tmake \
python configure.py \
	-b %{_bindir} \
	-d %{py_sitedir} \
	-e %{py_incdir} \
	-l qt-mt \
	LIBDIR_QT="%{_libdir}" \
	LIBDIR_X11="/usr/X11R6/%{_lib}"

%{__make} -C sipgen \
	CC="%{__cc}" \
	CFLAGS="%{rpmcflags} -pipe -w" \
	LINK="%{__cc}"

%{__make} -C siplib \
	CC="%{__cc}" \
	CXX="%{__cxx}" \
	CFLAGS="%{rpmcflags} -fPIC -pipe -w -D_REENTRANT" \
	CXXFLAGS="%{rpmcflags} -fPIC -pipe -w -D_REENTRANT" \
	LINK="%{__cxx}"

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_sipfilesdir}

%{__make} install \
	DESTDIR=$RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%doc ChangeLog NEWS README THANKS
%attr(755,root,root) %{_bindir}/*
%attr(755,root,root) %{py_sitedir}/libsip.so
%{py_sitedir}/sipconfig.py
%{py_incdir}/*.h
%dir %{_sipfilesdir}