forked from cms-sw/cmsdist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
classlib.spec
55 lines (47 loc) · 1.51 KB
/
classlib.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
### RPM external classlib 3.1.3
%define online %(case %cmsplatf in (*onl_*_*) echo true;; (*) echo false;; esac)
Source: http://cmsrep.cern.ch/cmssw/cms/SOURCES/slc5_amd64_gcc472/external/classlib/3.1.3/classlib-3.1.3.tar.bz2
Patch0: classlib-3.1.3-gcc46
Patch1: classlib-3.1.3-sl6
Patch2: classlib-3.1.3-fix-gcc47-cxx11
Patch3: classlib-3.1.3-fix-unwind-x86_64
Requires: bz2lib
Requires: pcre
Requires: xz
Requires: openssl
%if "%online" != "true"
Requires: zlib
%else
Requires: onlinesystemtools
%endif
%if "%{?cms_cxx:set}" != "set"
%define cms_cxx g++
%endif
%if "%{?cms_cxxflags:set}" != "set"
%define cms_cxxflags -std=c++0x -O2
%endif
%prep
%setup -n %n-%realversion
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
./configure --prefix=%i \
--with-zlib-includes=$ZLIB_ROOT/include \
--with-zlib-libraries=$ZLIB_ROOT/lib \
--with-bz2lib-includes=$BZ2LIB_ROOT/include \
--with-bz2lib-libraries=$BZ2LIB_ROOT/lib \
--with-pcre-includes=$PCRE_ROOT/include \
--with-pcre-libraries=$PCRE_ROOT/lib \
--with-openssl-includes=$OPENSSL_ROOT/include \
--with-openssl-libraries=$OPENSSL_ROOT/lib \
--with-lzma-includes=$XZ_ROOT/include \
--with-lzma-libraries=$XZ_ROOT/lib
perl -p -i -e '
s{-llzo2}{}g;
!/^\S+: / && s{\S+LZO((C|Dec)ompressor|Constants|Error)\S+}{}g' \
Makefile
make %makeprocesses CXX="%cms_cxx" CXXFLAGS="-Wno-error=extra -ansi -pedantic -W -Wall -Wno-long-long -Werror %cms_cxxflags"
%install
make %makeprocesses install