ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/py2-pymongo.spec
Revision: 1.2
Committed: Tue Oct 13 15:52:13 2009 UTC (15 years, 6 months ago) by valya
Branch: MAIN
CVS Tags: MotT0_1_0_2, MotT0_1_0_1, MotT0_1_0_0, MotT0_100531_1, MotT0_100528_1, T0Mon_100518_1, T0Mon_100503_1, T0Mon_100316_1, T0Mon_100308_2, T0Mon_100308_1, T0Mon_100216_1, T0Mon_100210_1, T0Mon_100204_4, T0Mon_100204_3, T0Mon_100204_1, T0Mon_100127_1, dg20091203-comp-base, T0Mon_091111_1, BUILDBOT_01, CERNOIDv02, DAS_20091104, CouchDB_0_10_0, DAS_20091016, CERNOIDv01, DAS_20091014, WMCORE-before-refactor
Changes since 1.1: +1 -1 lines
Log Message:
Move to 1.0 version

File Contents

# User Rev Content
1 valya 1.2 ### RPM external py2-pymongo 1.0
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