ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/glimpse.spec
Revision: 1.15
Committed: Fri Nov 2 18:24:54 2007 UTC (17 years, 5 months ago) by elmer
Branch: MAIN
CVS Tags: nr080215g491p01dbg, dl080120, dl080115, NR080108_geant491-dbg-global, sm20080101a-newscram, pe20071226b-for180p6, pe20071226a-for180p6, ge20071224, ge20071223, ge20071221, pe20071220b-for180p6, ge20071220, pe20071220-for180p6, ge20071217, CMSSW_1_8_0_pre5, pe20071216-for180p5, ge20071216, CMSSW_1_8_0_pre4-vg330, ge20071213, ge20071212-perfreport, ge20071212, ge20071211, ge20071210a, ge20071210, pe20071207-for180p4g491c3, NR071206_geant491cand3-global, ge20071207, pe20071206-for180test1, CMSSW_1_8_0_pre4-412, CMSSW_1_8_0_pre4, pe20071205b-for180p4-412, pe20071205b-for180p4, pe20071205-for180p4, ge20071205, CMSSW_1_8_0_pre3a-412, ge20071203, pe20071202-for180p3a-gcc412, CMSSW_1_8_0_pre3a, pe20071201b-for180p3a, pe20071201-for180p3a, V00-06-08, ge20071128, pe20071130-for180p3, pe20071129-for180p3, ge20071127a-leopard, ge20071127-leopard, pe20071127a-ports-412, ge20071126-new-bootstrap, CMSSW_1_8_0_pre2, CMSSW_1_8_0_pre0-amd64, CMSSW_1_8_0_pre0, pe20071123e-ports-412, pe20071123d-ports-412, pe20071123c-ports-422, pe20071123c-ports-412, pe20071123c-ports, pe20071123b-ports-422, pe20071123b-ports-412, pe20071123b-ports, pe20071123a-ports-422, pe20071123a-ports-412, pe20071123a-ports, ge20071122-new-bootstrap, pe20071121a-ports-422, pe20071121a-ports-412, pe20071121a-ports, pe20071112c-ports-422, pe20071112c-ports-412, pe20071112c-ports, pe20071112b-ports-412, pe20071112b-ports, pe20071112a-ports, pe20071105c-ports, pe20071105b-ports, pe20071105a-ports, pe20071103e-ports, pe20071103d-ports, pe20071103c-ports, pe20071103b-ports, pe20071103a-ports, pe20071102b-ports
Changes since 1.14: +1 -1 lines
Log Message:
Update to -CMS18

File Contents

# User Rev Content
1 elmer 1.15 ### RPM external glimpse 4.18.5-CMS18
2 elmer 1.11 Source: http://webglimpse.net/trial/glimpse-%{realversion}.tar.gz
3 elmer 1.1
4     %prep
5 elmer 1.11 %setup -n glimpse-%realversion
6 elmer 1.1 %build
7     ./configure --prefix=%{i}
8 elmer 1.12 # Turn off this part, it causes problems for 32-bit-on-64-bit and is only
9     # needed for webglimpse
10     perl -p -i -e "s|dynfilters||g" Makefile
11 eulisse 1.2 make
12 elmer 1.1
13     %install
14     make install
15 elmer 1.4 cat <<\EOF_CMS_GLIMPSE >%{i}/bin/cmsglimpse
16 eulisse 1.3 #!/bin/bash
17     CURRENT_SCRAM_PROJECT=$(echo $SCRAMRT_SET | cut -d: -f2)
18     args=
19     action=
20    
21     while [ $# -gt 0 ]
22     do
23     case $1 in
24 elmer 1.8 --full )
25 elmer 1.6 action=full; shift;;
26 elmer 1.8 --help )
27     echo "cmsglimpse [-H <CMSSW_TAG>] [--full] [--help] [glimpse-options] <search term>"
28 elmer 1.6 echo ""
29     echo " -H <CMSSW_TAG> - specify the CMSSW tag for the release you "
30     echo " would like to search (e.g. 'CMSSW_1_0_0'). "
31     echo " If you do not specify the -H option it will "
32     echo " default to the release corresponding to "
33     echo " your current scram runtime environment. "
34     echo ""
35 elmer 1.8 echo " --full - Print the full path to the source files. The "
36 elmer 1.6 echo " default is to print the relative path "
37     echo " beginning with the CMSSW subsystem. "
38     echo ""
39 elmer 1.8 echo " --help - This help information "
40     echo ""
41 elmer 1.6 echo " [glimpse-options] - any of the glimpse options can also be "
42 elmer 1.8 echo " specified, except for -H and --help, which"
43     echo " are used as described above. "
44     echo " See 'glimpse --help' for the full list. "
45 eulisse 1.3 exit
46     ;;
47     -H )[ $# -gt 1 ] || { echo "Option \`$1' requires an argument" 1>&2; exit 1; }
48     CURRENT_SCRAM_PROJECT=$2; shift; shift ;;
49     * ) args="$args $1"; shift;;
50     esac
51     done
52    
53     if [ "$CURRENT_SCRAM_PROJECT" == "" ]
54     then
55     echo "No project specified. "
56     echo "Please eval some scram runtime or use -H option."
57     exit 1
58     fi
59    
60     case $action in
61 elmer 1.6 full )
62 elmer 1.7 if [ ! -e @INSTROOT@/@CMSPLATF@/cms/cmssw/$CURRENT_SCRAM_PROJECT/src/.glimpse_full/.glimpse_index ]
63     then
64     echo "Glimpse index not found. Expected it in directory:"
65     echo " @INSTROOT@/@CMSPLATF@/cms/cmssw/$CURRENT_SCRAM_PROJECT/src/.glimpse_full/"
66     exit 1
67     fi
68     glimpse -H @INSTROOT@/@CMSPLATF@/cms/cmssw/$CURRENT_SCRAM_PROJECT/src/.glimpse_full/ $args
69 eulisse 1.3 ;;
70     * )
71 elmer 1.7 if [ ! -e @INSTROOT@/@CMSPLATF@/cms/cmssw/$CURRENT_SCRAM_PROJECT/src/.glimpse_index ]
72     then
73     echo "Glimpse index not found. Expected it in directory:"
74     echo " @INSTROOT@/@CMSPLATF@/cms/cmssw/$CURRENT_SCRAM_PROJECT/src/"
75     exit 1
76     fi
77     glimpse -H @INSTROOT@/@CMSPLATF@/cms/cmssw/$CURRENT_SCRAM_PROJECT/src $args
78 eulisse 1.3 ;;
79     esac
80     EOF_CMS_GLIMPSE
81 elmer 1.4 perl -p -i -e "s|\@CMSPLATF\@|%cmsplatf|g" %{i}/bin/cmsglimpse
82     chmod +x %{i}/bin/cmsglimpse
83 muzaffar 1.14 # SCRAM ToolBox toolfile
84     mkdir -p %i/etc/scram.d
85     cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
86     <doc type=BuildSystem::ToolDoc version=1.0>
87     <Tool name=glimpse version=%v>
88     <Client>
89     <Environment name=GLIMPSE_BASE default="%i"></Environment>
90     </Client>
91     <Runtime name=PATH value="$GLIMPSE_BASE/bin" type=path>
92     </Tool>
93     EOF_TOOLFILE
94    
95 eulisse 1.3 %post
96 elmer 1.5 perl -p -i -e "s|\@INSTROOT\@|$RPM_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/%{pkgrel}/bin/cmsglimpse
97 muzaffar 1.14 %{relocateConfig}etc/scram.d/%n