1 # Maintainer: Konstantin Gizdov < arch at kge dot pw >
2 # Contributor: Jan Kašpar < jan.kaspar at gmail dot com >
3 # Contributor: Alex Pearce < alex at alexpearce dot me >
6 pkgdesc="Software framework for fast, low latency, scalable and fault tolerant data access."
10 url="https://xrootd.slac.stanford.edu/"
12 depends=('ceph' 'curl' 'libxml2' 'openssl' 'perl' 'python')
13 makedepends=('cmake' 'systemd')
14 checkdepends=('cppunit')
17 source=("${url}/download/v${pkgver}/${_pkgname}-${pkgver}.tar.gz"
20 sha256sums=('1a9056ab7aeeaafa586ea77e442960c71d233c9ba60c7f9db9262c1410954ac4'
21 '9e8e17ea1a6a07a4d636d07c397fcfde5a6a398fea2fbb89a763044a481698af'
22 'ad423ea5c78c89e4f048da5c0ffd0fe263a3005e6de638077fbd770de89603eb')
25 python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
29 cd "${srcdir}/${_pkgname}-${pkgver}"
30 patch -Np1 -i "${srcdir}/cxx17.patch"
31 patch -Np1 -i "${srcdir}/stat_ver.patch"
35 cd "${srcdir}/${_pkgname}-${pkgver}"
38 mkdir -p "${srcdir}/build"
42 CXXFLAGS="${CXXFLAGS}" \
43 LDFLAGS="${LDFLAGS}" \
44 cmake -DCMAKE_BUILD_TYPE:STRING=Release \
45 -DCMAKE_INSTALL_LIBDIR:PATH=lib \
46 -DCMAKE_INSTALL_PREFIX:PATH=/usr \
47 -DCMAKE_CXX_STANDARD="17" \
49 -DXRD_PYTHON_REQ_VERSION=$(get_pyver) \
50 "${srcdir}/${_pkgname}-${pkgver}"
57 cd "${srcdir}/build/tests"
59 # Check has significantly changed, to-be-updated
60 # ./common/text-runner ./XrdCephTests/libXrdCephTests.so "All Tests"
63 # This requires a running XRootD server with multiIP DNS forwarder and local disk servers
64 # only run this if you have configured the env correctly,
65 # examples in https://github.com/xrootd/xrootd-test-suite
66 # sample environment can be configured like so:
67 # export XRDTEST_MAINSERVERURL=metaman.xrd.test
68 # or export XRDTEST_MAINSERVERURL=http://xrootd.cern.ch/
69 # export XRDTEST_DISKSERVERURL=srv1.xrd.test
70 # or export XRDTEST_DISKSERVERURL=http://xrootd.cern.ch/
71 # export XRDTEST_DATAPATH=/tests/test-files/
72 # export XRDTEST_LOCALFILE=/data/a048e67f-4397-4bb8-85eb-8d7e40d90763.dat
73 # or export XRDTEST_LOCALFILE=/tmp/accwe.root
74 # export XRDTEST_REMOTEFILE=${XRDTEST_MAINSERVERURL}${XRDTEST_DATAPATH}/a048e67f-4397-4bb8-85eb-8d7e40d90763.dat
75 # or export XRDTEST_MULTIIPSERVERURL=multiip.xrd.test
76 # ./common/text-runner ./XrdClTests/libXrdClTests.so "All Tests"
81 make DESTDIR="${pkgdir}" install
82 # drop unneeded test bin & lib
83 rm "${pkgdir}/usr/bin/text-runner"
84 rm "${pkgdir}/usr/lib/libXrdClTests.so"
85 install -d "${pkgdir}/usr/lib/cmake/XRootD"
86 mv "${pkgdir}/usr/share/xrootd/cmake/XRootDConfig.cmake" "${pkgdir}/usr/lib/cmake/XRootD"/
87 rm -rf "${pkgdir}/usr/share/xrootd/cmake"
88 ln -s "/usr/lib/cmake" "${pkgdir}/usr/share/xrootd/cmake"