forked from cms-sw/cmsdist
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxrootd.spec
More file actions
70 lines (59 loc) · 1.7 KB
/
Copy pathxrootd.spec
File metadata and controls
70 lines (59 loc) · 1.7 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
### RPM external xrootd 5.9.4
## INITENV +PATH LD_LIBRARY_PATH %i/lib64
## INITENV +PATH PYTHON3PATH %{i}/${PYTHON3_LIB_SITE_PACKAGES}
%define strip_files %i/lib
%define tag %{realversion}
%define branch master
%define github_user xrootd
Source: https://github.com/xrootd/xrootd/releases/download/v%{realversion}/%{n}-%{realversion}.tar.gz
BuildRequires: cmake gmake autotools py3-pip
Requires: zlib libuuid curl davix
Requires: python3 py3-setuptools
Requires: libxml2
Requires: isal
%define soext so
%ifarch darwin
%define soext dylib
%endif
%prep
%setup -n %{n}-%{realversion}
sed -i -e 's|^ *check_library_exists("uuid" "uuid_generate_random".*$|set(_have_libuuid True)|' cmake/Findlibuuid.cmake
%build
# By default xrootd has fuse, krb5, readline, and crypto enabled.
# libfuse is not produced by CMSDIST.
%if 0%{?fedora:1}
%define build_python 1
%else
%define build_python 1
%endif
rm -rf ../build; mkdir ../build; cd ../build
cmake ../%n-%{realversion} \
-DCMAKE_INSTALL_PREFIX=%{i} \
-DCMAKE_BUILD_TYPE=Release \
-DFORCE_ENABLED=ON \
-DENABLE_FUSE=FALSE \
-DENABLE_VOMS=FALSE \
-DXRDCL_ONLY=TRUE \
-DENABLE_KRB5=TRUE \
-DENABLE_READLINE=TRUE \
-DCMAKE_SKIP_RPATH=TRUE \
%if %{build_python}
-DENABLE_PYTHON=TRUE \
-DXRD_PYTHON_REQ_VERSION=3 \
-DPIP_OPTIONS="--verbose" \
%else
-DENABLE_PYTHON=FALSE \
%endif
-DENABLE_HTTP=TRUE \
-DENABLE_XRDEC=TRUE \
-DCMAKE_CXX_FLAGS="-I${LIBUUID_ROOT}/include" \
-DCMAKE_SHARED_LINKER_FLAGS="-L${LIBUUID_ROOT}/lib64" \
-DCMAKE_PREFIX_PATH="%{cmake_prefix_path}"
make %makeprocesses VERBOSE=1
%install
cd ../build
make install
%relocatePy3Shebang bin
%post
%{relocateConfig}bin/xrootd-config
%{relocateConfig}lib64/cmake/XRootD/XRootDConfig.cmake