ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/pyqt.spec
Revision: 1.8
Committed: Tue Jan 5 10:40:53 2010 UTC (15 years, 3 months ago) by eulisse
Branch: MAIN
CVS Tags: dsr20100209fwlite342, CMSSW_3_4_2_patch1, for342patch1, CMSSW_3_4_2, eskFor342, ap20100123a-for35X, CMSSW_3_5_0_pre3, apFor350pre3v0, pe20100113a-for35X, sm20100113a-for35X, sm20100113-for35X, pe20100112b-for35X, sm20100112a-for35X, sm20100112-for35X, pe20100112-for35X, pe20100105a-for34X-for35X, ge20100105-pyqt-relocatable-build
Changes since 1.7: +1 -1 lines
Log Message:
Now builds pyqt correctly.

* patch name corrected.
* Patches ./configure.py rather than qtdirs.cpp which is a generated file.

File Contents

# User Rev Content
1 elmer 1.5 ### RPM external pyqt 4.5.4
2 elmer 1.6 ## INITENV +PATH PYTHONPATH %i/lib/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages
3 eulisse 1.1 ## 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 eulisse 1.8 Patch0: pyqt-relocatable-build
6 eulisse 1.1 Requires: python
7     Requires: qt
8     Requires: sip
9    
10     %prep
11     %setup -n PyQt-x11-gpl-%realversion
12 eulisse 1.7 # 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 eulisse 1.1
19     %build
20 eulisse 1.7 # See above for explanation.
21     cp $QT_ROOT/bin/qt.conf .
22    
23 elmer 1.6 echo yes | python ./configure.py --verbose -b %i/bin -d %i/lib/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages \
24 eulisse 1.4 -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    
27 eulisse 1.1 make %makeprocesses
28    
29     %install
30     make install
31    
32 eulisse 1.4 mkdir -p %i/etc/profile.d
33     cat << \EOF_INIT_ME > %i/etc/profile.d/init-standalone.sh
34     #!/bin/sh
35     source @GCC_ROOT@/etc/profile.d/init.sh
36     source @BZ2LIB_ROOT@/etc/profile.d/init.sh
37     source @EXPAT_ROOT@/etc/profile.d/init.sh
38     source @DB4_ROOT@/etc/profile.d/init.sh
39     source @GDBM_ROOT@/etc/profile.d/init.sh
40     source @ZLIB_ROOT@/etc/profile.d/init.sh
41     source @OPENSSL_ROOT@/etc/profile.d/init.sh
42     source @PYTHON_ROOT@/etc/profile.d/init.sh
43     source @QT_ROOT@/etc/profile.d/init.sh
44     source @SIP_ROOT@/etc/profile.d/init.sh
45     source %i/etc/profile.d/init.sh
46     EOF_INIT_ME
47    
48     perl -p -i -e "s|\@([^@]*)\@|\$ENV{\$1}|" %i/etc/profile.d/init-standalone.sh
49 eulisse 1.2 mkdir -p %i/etc/scram.d
50     cat << \EOF_TOOLFILE >%i/etc/scram.d/pyqt
51     <doc type=BuildSystem::ToolDoc version=1.0>
52     <Tool name=pyqt version=%v>
53     <info url="http://www.riverbankcomputing.co.uk/software/pyqt/intro"></info>
54     <Client>
55     <Environment name=PYQT_BASE default="%i"></Environment>
56     </Client>
57 elmer 1.6 <Runtime name=PYTHONPATH value="$PYQT_BASE/lib/python@PYTHONV@/site-packages" type=path>
58 eulisse 1.2 <use name="python">
59     <use name="qt">
60 eulisse 1.3 <use name="sip">
61 eulisse 1.2 </Tool>
62     EOF_TOOLFILE
63 elmer 1.6 export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.)
64     perl -p -i -e 's|\@([^@]*)\@|$ENV{$1}|g' %i/etc/scram.d/*
65 eulisse 1.1
66 eulisse 1.2 %post
67     %{relocateConfig}etc/scram.d/pyqt
68 eulisse 1.4 %{relocateConfig}etc/profile.d/init-standalone.sh