1 |
< |
### RPM external cppunit 1.10.2-CMS18 |
1 |
> |
### RPM external cppunit 1.12.1 |
2 |
|
Source0: http://switch.dl.sourceforge.net/sourceforge/%n/%n-%realversion.tar.gz |
3 |
< |
Source1: http://spi.cvs.cern.ch:8180/cgi-bin/spi.cgi/*checkout*/Components/UnitTesting/Tools/CppUnit/CppUnit_testdriver.cpp?rev=1.1 |
3 |
> |
Source1: CppUnit_testdriver_cpp |
4 |
|
|
5 |
|
%prep |
6 |
|
%setup -n %n-%realversion |
7 |
|
|
8 |
|
%build |
9 |
< |
./configure --prefix=%i |
9 |
> |
case %cmsplatf in |
10 |
> |
osx* ) perl -p -i -e 's|rm(.*)conftest|rm -fr $1 conftest|g' configure \ |
11 |
> |
aclocal.m4 \ |
12 |
> |
libtool \ |
13 |
> |
config/ltmain.sh |
14 |
> |
;; |
15 |
> |
slc* ) |
16 |
> |
# Ugly hack to force -ldl to be linked, which for some reason is |
17 |
> |
# not currently happening via configure |
18 |
> |
perl -p -i -e 's|LIBS.*LIBS.*lm|LIBS="$LIBS -lm -ldl|' configure |
19 |
> |
;; |
20 |
> |
esac |
21 |
> |
./configure --prefix=%i --disable-static |
22 |
|
make %makeprocesses |
23 |
|
%install |
24 |
|
make install |
25 |
< |
cp %_sourcedir/CppUnit_testdriver.cpp* %i/include/CppUnit_testdriver.cpp |
26 |
< |
|
27 |
< |
# SCRAM ToolBox toolfile |
28 |
< |
mkdir -p %i/etc/scram.d |
29 |
< |
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n |
30 |
< |
<doc type=BuildSystem::ToolDoc version=1.0> |
31 |
< |
<Tool name=%n version=%v> |
32 |
< |
<lib name=cppunit> |
33 |
< |
<Client> |
34 |
< |
<Environment name=CPPUNIT_BASE default="%i"></Environment> |
35 |
< |
<Environment name=LIBDIR default="$CPPUNIT_BASE/lib"></Environment> |
36 |
< |
<Environment name=INCLUDE default="$CPPUNIT_BASE/include"></Environment> |
37 |
< |
</Client> |
26 |
< |
<use name=sockets> |
27 |
< |
</Tool> |
28 |
< |
EOF_TOOLFILE |
25 |
> |
cp %_sourcedir/CppUnit_testdriver_cpp %i/include/CppUnit_testdriver.cpp |
26 |
> |
# We remove pkg-config files for two reasons: |
27 |
> |
# * it's actually not required (macosx does not even have it). |
28 |
> |
# * rpm 4.8 adds a dependency on the system /usr/bin/pkg-config |
29 |
> |
# on linux. |
30 |
> |
# In the case at some point we build a package that can be build |
31 |
> |
# only via pkg-config we have to think on how to ship our own |
32 |
> |
# version. |
33 |
> |
rm -rf %i/lib/pkgconfig |
34 |
> |
# Remove unneded files |
35 |
> |
rm -rf %i/lib/*.{l,}a |
36 |
> |
# Read documentation online |
37 |
> |
%define drop_files %i/share |
38 |
|
|
39 |
|
%post |
40 |
|
%{relocateConfig}/bin/cppunit-config |
32 |
– |
%{relocateConfig}/lib/libcppunit.la |
33 |
– |
%{relocateConfig}etc/scram.d/%n |