1 |
|
### RPM external pyqt 4.5.4 |
2 |
< |
## INITENV +PATH PYTHONPATH %i/lib/python2.4/site-packages |
2 |
> |
## INITENV +PATH PYTHONPATH %i/lib/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages |
3 |
|
## BUILDIF case %cmsplatf in osx*) false;; *) true;; esac |
4 |
|
Source: http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-x11-gpl-%realversion.tar.gz |
5 |
+ |
Patch0: pyqt-relocatable-build.patch |
6 |
|
Requires: python |
7 |
|
Requires: qt |
8 |
|
Requires: sip |
9 |
|
|
10 |
|
%prep |
11 |
|
%setup -n PyQt-x11-gpl-%realversion |
12 |
+ |
# pyqt builds and uses an helper program "qtdirs" to determine where qt is installed. |
13 |
+ |
# We had to patch its sources so that it reads the configuration file qt.conf |
14 |
+ |
# like other qt applications, so that we get the correctly relocated information. |
15 |
+ |
# Notice that in %build we copy qt.conf from the QT installation to get the correct |
16 |
+ |
# location. |
17 |
+ |
%patch0 -p1 |
18 |
|
|
19 |
|
%build |
20 |
< |
echo yes | python ./configure.py -b %i/bin -d %i/lib/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages \ |
20 |
> |
# See above for explanation. |
21 |
> |
cp $QT_ROOT/bin/qt.conf . |
22 |
> |
|
23 |
> |
echo yes | python ./configure.py --verbose -b %i/bin -d %i/lib/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages \ |
24 |
|
-e %i/include \ |
25 |
|
`find $QT_ROOT/include/ -type d | xargs -n 1 basename| grep -v include | xargs echo | sed -e 's| | --enable=|g;s|^|--enable=|'` |
26 |
|
|
54 |
|
<Client> |
55 |
|
<Environment name=PYQT_BASE default="%i"></Environment> |
56 |
|
</Client> |
57 |
< |
<Runtime name=PYTHONPATH value="$PYQT_BASE/lib/python2.4/site-packages" type=path> |
57 |
> |
<Runtime name=PYTHONPATH value="$PYQT_BASE/lib/python@PYTHONV@/site-packages" type=path> |
58 |
|
<use name="python"> |
59 |
|
<use name="qt"> |
60 |
|
<use name="sip"> |
61 |
|
</Tool> |
62 |
|
EOF_TOOLFILE |
63 |
+ |
export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.) |
64 |
+ |
perl -p -i -e 's|\@([^@]*)\@|$ENV{$1}|g' %i/etc/scram.d/* |
65 |
|
|
66 |
|
%post |
67 |
|
%{relocateConfig}etc/scram.d/pyqt |