ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/kcachegrind.spec
Revision: 1.4
Committed: Tue Feb 20 14:13:13 2007 UTC (18 years, 2 months ago) by muzaffar
Branch: MAIN
Changes since 1.3: +10 -6 lines
Log Message:
libtool fixed to remove all hardcoded rpath. previously created patch file used instead of using an new one

File Contents

# User Rev Content
1 muzaffar 1.1 ### RPM external kcachegrind 0.4.6-cmsp1
2     Provides: libDCOP.so.4
3     Provides: libart_lgpl_2.so.2
4     Provides: libfam.so.0
5     Provides: libkdecore.so.4
6     Provides: libkdefx.so.4
7     Provides: libkdesu.so.4
8     Provides: libkdeui.so.4
9     Provides: libkio.so.4
10     Provides: libkwalletclient.so.1
11 muzaffar 1.2 Requires: qt libpng
12 muzaffar 1.1
13     %define realversion %(echo %v | cut -d- -f1)
14     %define machine_os %(echo %cmsplatf | cut -d_ -f1)
15     %if "%{machine_os}" == "slc4"
16     %define sourcefile0 http://kcachegrind.sourceforge.net/%{n}-%{realversion}.tar.gz
17 muzaffar 1.4 %define pacthfile0 http://cmsdoc.cern.ch/~muzaffar/public/%{n}-%{realversion}-patch.tar.gz
18 muzaffar 1.1 %else
19 muzaffar 1.2 %define sourcefile0 none
20     %define pacthfile0 none
21 muzaffar 1.1 %endif
22    
23     Source0: %sourcefile0
24     Source1: %pacthfile0
25    
26     %prep
27     %if "%{machine_os}" == "slc4"
28 muzaffar 1.4 %setup -T -b 1 -n %{n}-%{realversion}-patch
29 muzaffar 1.1 %setup -T -b 0 -n %{n}-%{realversion}
30     # CMS patch
31 muzaffar 1.4 cp -fp %{_builddir}/%{n}-%{realversion}-patch/functionnameanalyzer.* %{_builddir}/%n-%realversion/kcachegrind/
32     patch -u %{_builddir}/%n-%realversion/kcachegrind/tracedata.cpp %{_builddir}/%{n}-%{realversion}-patch/tracedata.cpp.patch
33     patch -u %{_builddir}/%n-%realversion/kcachegrind/Makefile.am %{_builddir}/%{n}-%{realversion}-patch/Makefile.am.patch
34 muzaffar 1.1 make -f admin/Makefile.common cvs
35     %endif
36    
37     %build
38     %if "%{machine_os}" == "slc4"
39 muzaffar 1.2 export CPPFLAGS="-I$LIBPNG_ROOT/include"
40     export LDFLAGS="-L$LIBPNG_ROOT/lib"
41     ./configure --prefix=%i --disable-rpath
42 muzaffar 1.4
43     # Fix for hard coded rpath
44     sed 's|hardcode_libdir_flag_spec=".*"|hardcode_libdir_flag_spec=""|' libtool > libtool.new
45     mv libtool.new libtool
46    
47 muzaffar 1.1 make %makeprocesses
48     %install
49     make install
50     %endif
51     %post
52     %if "%{machine_os}" != "slc4"
53     mkdir -p $RPM_INSTALL_PREFIX/%pkgrel/bin
54     cat << \EOF_KCACHEGRIND > $RPM_INSTALL_PREFIX/%pkgrel/bin/kcachegrind
55     #!/bin/sh
56 muzaffar 1.3 echo "WARNING: KCachegrind is only available for SLC4"
57 muzaffar 1.1 EOF_KCACHEGRIND
58     chmod 755 $RPM_INSTALL_PREFIX/%pkgrel/bin/kcachegrind
59     %endif