ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/glimpse.spec
Revision: 1.10
Committed: Tue May 1 11:21:05 2007 UTC (18 years ago) by elmer
Branch: MAIN
CVS Tags: pe20070522a-ports, pe20070519a-ports, pe20070512a-ports, pe20070508a-ports, pe20070507a-ports, pe20070501c-ports, pe20070501b-ports, pe20070501a-ports
Changes since 1.9: +0 -2 lines
Log Message:
Remove gcc-wrappers stuff

File Contents

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