1 |
|
### RPM external kcachegrind 0.4.6-cmsp1 |
2 |
+ |
Requires: gcc-wrapper |
3 |
|
Provides: libDCOP.so.4 |
4 |
|
Provides: libart_lgpl_2.so.2 |
5 |
|
Provides: libfam.so.0 |
15 |
|
%define machine_os %(echo %cmsplatf | cut -d_ -f1) |
16 |
|
%if "%{machine_os}" == "slc4" |
17 |
|
%define sourcefile0 http://kcachegrind.sourceforge.net/%{n}-%{realversion}.tar.gz |
18 |
< |
%define pacthfile0 http://cmsdoc.cern.ch/~muzaffar/public/%{n}-%{realversion}-patch1.tar.gz |
18 |
> |
%define pacthfile0 http://cmsdoc.cern.ch/~muzaffar/public/%{n}-%{realversion}-patch.tar.gz |
19 |
|
%else |
20 |
|
%define sourcefile0 none |
21 |
|
%define pacthfile0 none |
26 |
|
|
27 |
|
%prep |
28 |
|
%if "%{machine_os}" == "slc4" |
29 |
< |
%setup -T -b 1 -n %{n}-%{realversion}-patch1 |
29 |
> |
%setup -T -b 1 -n %{n}-%{realversion}-patch |
30 |
|
%setup -T -b 0 -n %{n}-%{realversion} |
31 |
|
# CMS patch |
32 |
< |
cp -fp %{_builddir}/%{n}-%{realversion}-patch1/functionnameanalyzer.* %{_builddir}/%n-%realversion/kcachegrind/ |
33 |
< |
patch -u %{_builddir}/%n-%realversion/kcachegrind/tracedata.cpp %{_builddir}/%{n}-%{realversion}-patch1/tracedata.cpp.patch |
34 |
< |
patch -u %{_builddir}/%n-%realversion/kcachegrind/Makefile.am %{_builddir}/%{n}-%{realversion}-patch1/Makefile.am.patch |
32 |
> |
cp -fp %{_builddir}/%{n}-%{realversion}-patch/functionnameanalyzer.* %{_builddir}/%n-%realversion/kcachegrind/ |
33 |
> |
patch -u %{_builddir}/%n-%realversion/kcachegrind/tracedata.cpp %{_builddir}/%{n}-%{realversion}-patch/tracedata.cpp.patch |
34 |
> |
patch -u %{_builddir}/%n-%realversion/kcachegrind/Makefile.am %{_builddir}/%{n}-%{realversion}-patch/Makefile.am.patch |
35 |
|
make -f admin/Makefile.common cvs |
36 |
|
%endif |
37 |
|
|
38 |
|
%build |
39 |
+ |
## IMPORT gcc-wrapper |
40 |
|
%if "%{machine_os}" == "slc4" |
41 |
|
export CPPFLAGS="-I$LIBPNG_ROOT/include" |
42 |
|
export LDFLAGS="-L$LIBPNG_ROOT/lib" |
43 |
|
./configure --prefix=%i --disable-rpath |
44 |
< |
patch -u %{_builddir}/%n-%realversion/libtool %{_builddir}/%{n}-%{realversion}-patch1/libtool.patch |
44 |
> |
|
45 |
> |
# Fix for hard coded rpath |
46 |
> |
sed 's|hardcode_libdir_flag_spec=".*"|hardcode_libdir_flag_spec=""|' libtool > libtool.new |
47 |
> |
mv libtool.new libtool |
48 |
> |
|
49 |
|
make %makeprocesses |
50 |
|
%install |
51 |
|
make install |
55 |
|
mkdir -p $RPM_INSTALL_PREFIX/%pkgrel/bin |
56 |
|
cat << \EOF_KCACHEGRIND > $RPM_INSTALL_PREFIX/%pkgrel/bin/kcachegrind |
57 |
|
#!/bin/sh |
58 |
< |
echo "WARNING: KCachegrind is only available for %{machine_os}" |
58 |
> |
echo "WARNING: KCachegrind is only available for SLC4" |
59 |
|
EOF_KCACHEGRIND |
60 |
|
chmod 755 $RPM_INSTALL_PREFIX/%pkgrel/bin/kcachegrind |
61 |
|
%endif |