ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/mongo.spec
Revision: 1.42
Committed: Wed Sep 12 01:48:53 2012 UTC (12 years, 7 months ago) by valya
Branch: MAIN
CVS Tags: bld_1361214804_filemover_slc5_amd64_gcc461, bld_1361213027_filemover_slc5_amd64_gcc461, bld_1358971407_t0_reqmon_slc5_amd64_gcc461, bld_1358742470_t0wmstats_slc5_amd64_gcc461, HG1302a, HG1212d, HG1212c, HG1212b, HG1212a, bld_1352811218_cmsfomon_slc5_amd64_gcc461, HG1211g, bld_1351773793_cmsweb_osx106_amd64_gcc461, bld_1351772993_cmsweb_osx106_amd64_gcc461, HG1211f, HG1211e, HG1211d, HG1211c, HG1211b
Changes since 1.41: +6 -13 lines
Log Message:
New MongoDB (2.2)

File Contents

# User Rev Content
1 valya 1.42 ### RPM external mongo 2.2.0
2 diego 1.23
3 valya 1.42 Patch: mongo2.2-osx
4 diego 1.23 Source: http://downloads.mongodb.org/src/mongodb-src-r%{realversion}.tar.gz
5 valya 1.42 Requires: scons rotatelogs
6 valya 1.1
7 valya 1.2 Provides: libpcap.so.0.8.3
8 valya 1.6 Provides: libpcap.so.0.8.3()(64bit)
9 valya 1.1
10     %prep
11 valya 1.7 %setup -n mongodb-src-r%{realversion}
12 lat 1.34 perl -p -i -e 's/-rdynamic//' SConstruct
13 lat 1.35 perl -p -i -e 's/"-mt"/""/' SConstruct
14 lat 1.32 %patch
15 valya 1.1
16 lat 1.27 # scons apparently removes $PATH and $LD_LIBRARY_PATH when invoking
17     # compiler commands, so force the environment back -- gcc needs it.
18     # this isn't actually quite enough as scons also forces -L/lib64
19     # type options straight into command line, with -lstdc++, etc., so
20     # linking is also likely somewhat broken.
21 valya 1.38 cat > scons-cxx-wrapper << EOFCXX
22     #!/bin/sh
23 lat 1.32 %if "%{?use_system_gcc:set}" != "set"
24 valya 1.38 . $GCC_ROOT/etc/profile.d/init.sh
25 lat 1.32 %endif
26 valya 1.42 exec c++ \${1+"\$@"}
27 valya 1.38 EOFCXX
28     chmod 755 scons-cxx-wrapper
29    
30     cat > scons-cc-wrapper << EOFCC
31     #!/bin/sh
32     %if "%{?use_system_gcc:set}" != "set"
33     . $GCC_ROOT/etc/profile.d/init.sh
34     %endif
35 valya 1.42 exec cc \${1+"\$@"}
36 valya 1.38 EOFCC
37     chmod 755 scons-cc-wrapper
38 lat 1.27
39 valya 1.1 %build
40 lat 1.32 case $(uname) in
41     Darwin ) X64= ;;
42     * ) X64=--64 ;;
43     esac
44 valya 1.42 scons %makeprocesses $X64 --cxx=$PWD/scons-cxx-wrapper --cc=$PWD/scons-cc-wrapper --prefix=%i install
45 valya 1.1
46 diego 1.28
47 valya 1.1 %install
48 lat 1.32 case $(uname) in
49     Darwin ) X64= ;;
50     * ) X64=--64 ;;
51     esac
52 valya 1.38 #scons %makeprocesses $X64 --cxx=$PWD/scons-sucks-wrapper --cc=$PWD/scons-cc-wrapper --extrapathdyn=$PCRE_ROOT,$BOOST_ROOT,$SPIDERMONKEY_ROOT --prefix=%i install
53 valya 1.14
54 diego 1.22 # Generate dependencies-setup.{sh,csh} so init.{sh,csh} picks full environment.
55 valya 1.15 mkdir -p %i/etc/profile.d
56 diego 1.22 : > %i/etc/profile.d/dependencies-setup.sh
57     : > %i/etc/profile.d/dependencies-setup.csh
58     for tool in $(echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'); do
59     root=$(echo $tool | tr a-z- A-Z_)_ROOT; eval r=\$$root
60     if [ X"$r" != X ] && [ -r "$r/etc/profile.d/init.sh" ]; then
61     echo "test X\$$root != X || . $r/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
62     echo "test X\$$root != X || source $r/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
63     fi
64 valya 1.15 done
65    
66 valya 1.1 %post
67 diego 1.22 %{relocateConfig}etc/profile.d/dependencies-setup.*sh