ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/py2-pymongo.spec
Revision: 1.6
Committed: Thu Dec 17 16:53:30 2009 UTC (15 years, 4 months ago) by valya
Branch: MAIN
CVS Tags: FRONTEND_CONF_3_30_20100724, FRONTEND_CONF_3_29_20100723, DAS_20100302_slc5_amd64_gcc434b, DAS_20100302_slc5_amd64_gcc434, FRONTEND_CONF_3_24_20100217, DAS_20100217_slc5_amd64_gcc434, DAS_20100216b_slc5_amd64_gcc434, DAS_20100216_slc5_amd64_gcc434, T0Mon_100204_2, dg20100201-dbs3, dg20100129-dbs3, dg20100128-dbs3, DAS_20100127_slc5_amd64_gcc434, DAS_20100126_slc5_amd64_gcc434, DAS_20100119_slc5_amd64_gcc434, DAS_20100115_slc5_amd64_gcc434, DAS_20100105_slc5_amd64_gcc434, DAS_20091221_slc5_amd64_gcc434
Changes since 1.5: +1 -1 lines
Log Message:
New version

File Contents

# User Rev Content
1 valya 1.6 ### RPM external py2-pymongo 1.3
2 valya 1.1 %define pythonv %(echo $PYTHON_VERSION | cut -f1,2 -d.)
3     ## INITENV +PATH PYTHONPATH %i/lib/python`echo $PYTHON_VERSION | cut -f1,2 -d.`/site-packages
4    
5     Source: http://pypi.python.org/packages/source/p/pymongo/pymongo-%realversion.tar.gz
6     Requires: python elementtree
7    
8     %prep
9     %setup -n pymongo-%realversion
10    
11     %build
12    
13     %install
14     mkdir -p %i/lib/python`echo $PYTHON_VERSION | cut -f1,2 -d.`/site-packages
15     python setup.py build
16     #build builds lib.linux-i686-2.6
17     mv build/lib*/* %i/lib/python`echo $PYTHON_VERSION | cut -f1,2 -d.`/site-packages
18    
19     mkdir -p %i/etc/profile.d/
20     # This will generate the correct dependencies-setup.sh/dependencies-setup.csh
21     # using the information found in the Requires statements of the different
22     # specs and their dependencies.
23     echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh
24     echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh
25     echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
26     for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
27     do
28     case X$tool in
29     Xdistcc|Xccache )
30     ;;
31     * )
32     toolcap=`echo $tool | tr a-z- A-Z_`
33     eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh
34     eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh
35     ;;
36     esac
37     done
38     perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh
39     perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh
40    
41     %post
42     %{relocateConfig}etc/profile.d/dependencies-setup.sh
43     %{relocateConfig}etc/profile.d/dependencies-setup.csh