1 |
< |
### RPM external pyqt 4.5 |
2 |
< |
## INITENV +PATH PYTHONPATH %i/lib/python2.4/site-packages |
3 |
< |
## BUILDIF case %cmsplatf in osx*) false;; *) true;; esac |
1 |
> |
### RPM external pyqt 4.8 |
2 |
> |
## INITENV +PATH PYTHONPATH %i/lib/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages |
3 |
|
Source: http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-x11-gpl-%realversion.tar.gz |
4 |
+ |
Patch0: pyqt-relocatable-build |
5 |
|
Requires: python |
6 |
|
Requires: qt |
7 |
|
Requires: sip |
8 |
|
|
9 |
|
%prep |
10 |
|
%setup -n PyQt-x11-gpl-%realversion |
11 |
+ |
# pyqt builds and uses an helper program "qtdirs" to determine where qt is installed. |
12 |
+ |
# We had to patch its sources so that it reads the configuration file qt.conf |
13 |
+ |
# like other qt applications, so that we get the correctly relocated information. |
14 |
+ |
# Notice that in the build section we copy qt.conf from the QT installation to |
15 |
+ |
# get the correct location. |
16 |
+ |
%patch0 -p1 |
17 |
|
|
18 |
|
%build |
19 |
< |
echo yes | python ./configure.py -b %i/bin -d %i/lib/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages -e %i/include --no-sip-files --no-designer-plugin |
19 |
> |
# See above for explanation. |
20 |
> |
cp $QT_ROOT/bin/qt.conf . |
21 |
> |
|
22 |
> |
echo yes | python ./configure.py --verbose -b %i/bin -d %i/lib/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages \ |
23 |
> |
-e %i/include \ |
24 |
> |
`find $QT_ROOT/include/ -type d | xargs -n 1 basename| grep -v include | xargs echo | sed -e 's| | --enable=|g;s|^|--enable=|'` |
25 |
> |
|
26 |
|
make %makeprocesses |
27 |
|
|
28 |
|
%install |
29 |
|
make install |
30 |
|
|
31 |
< |
mkdir -p %i/etc/scram.d |
32 |
< |
cat << \EOF_TOOLFILE >%i/etc/scram.d/pyqt |
33 |
< |
<doc type=BuildSystem::ToolDoc version=1.0> |
34 |
< |
<Tool name=pyqt version=%v> |
35 |
< |
<info url="http://www.riverbankcomputing.co.uk/software/pyqt/intro"></info> |
36 |
< |
<Client> |
37 |
< |
<Environment name=PYQT_BASE default="%i"></Environment> |
38 |
< |
</Client> |
39 |
< |
<Runtime name=PYTHONPATH value="$PYQT_BASE/lib/python2.4/site-packages" type=path> |
40 |
< |
<use name="python"> |
41 |
< |
<use name="qt"> |
42 |
< |
<use name="sip"> |
43 |
< |
</Tool> |
44 |
< |
EOF_TOOLFILE |
31 |
> |
mkdir -p %i/etc/profile.d |
32 |
> |
cat << \EOF_INIT_ME > %i/etc/profile.d/init-standalone.sh |
33 |
> |
#!/bin/sh |
34 |
> |
source @GCC_ROOT@/etc/profile.d/init.sh |
35 |
> |
source @BZ2LIB_ROOT@/etc/profile.d/init.sh |
36 |
> |
source @EXPAT_ROOT@/etc/profile.d/init.sh |
37 |
> |
source @DB4_ROOT@/etc/profile.d/init.sh |
38 |
> |
source @GDBM_ROOT@/etc/profile.d/init.sh |
39 |
> |
source @ZLIB_ROOT@/etc/profile.d/init.sh |
40 |
> |
source @OPENSSL_ROOT@/etc/profile.d/init.sh |
41 |
> |
source @PYTHON_ROOT@/etc/profile.d/init.sh |
42 |
> |
source @QT_ROOT@/etc/profile.d/init.sh |
43 |
> |
source @SIP_ROOT@/etc/profile.d/init.sh |
44 |
> |
source %i/etc/profile.d/init.sh |
45 |
> |
EOF_INIT_ME |
46 |
> |
|
47 |
> |
perl -p -i -e "s|\@([^@]*)\@|\$ENV{\$1}|" %i/etc/profile.d/init-standalone.sh |
48 |
|
|
49 |
|
%post |
50 |
< |
%{relocateConfig}etc/scram.d/pyqt |
50 |
> |
%{relocateConfig}etc/profile.d/init-standalone.sh |