-
Notifications
You must be signed in to change notification settings - Fork 3
/
oneclient.spec
192 lines (171 loc) · 7.96 KB
/
oneclient.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
%global _scl_prefix /opt/onedata
%{?scl:%scl_package oneclient-base}
%{!?scl:%global pkg_name %{name}}
%global version {{version}}
%global folly_version 2021.01.04.00
%global xrootd_version 20200703
Name: %{?scl_prefix}oneclient-base
Version: %{version}
Release: 1%{?dist}
Summary: FUSE client for Onedata distributed filesystem
Group: Applications/File
License: MIT
URL: https://onedata.org
Source0: oneclient-base-%{version}.orig.tar.gz
Requires: epel-release
Requires: fuse3
Requires: xrootd-libs >= %{xrootd_version}
Requires: xrootd-client-libs >= %{xrootd_version}
Requires: xrootd-server-libs >= %{xrootd_version}
Requires: scl-utils
Requires: libunwind
Requires: %scl_require_package %{scl} folly >= %{folly_version}
Requires: %scl_require_package %{scl} openssl >= 1.1.0
Requires: %scl_require_package %{scl} libnfs >= 4.0.0
Requires: %scl_require_package %{scl} tbb >= 2018.5~
BuildRequires: %scl_require_package %{scl} aws-c-common >= 0.4.49
BuildRequires: %scl_require_package %{scl} aws-checksums >= 0.1.7
BuildRequires: %scl_require_package %{scl} aws-c-event-stream >= 0.1.5
BuildRequires: %scl_require_package %{scl} aws-sdk-cpp-s3 >= 1.8.7
BuildRequires: %scl_require_package %{scl} boost-devel >= 1.58.0
BuildRequires: %scl_require_package %{scl} boost-python >= 1.58.0
BuildRequires: %scl_require_package %{scl} boost-python3 >= 1.58.0
BuildRequires: %scl_require_package %{scl} librados-devel
BuildRequires: %scl_require_package %{scl} libradospp-devel
BuildRequires: %scl_require_package %{scl} libradosstriper-devel
BuildRequires: %scl_require_package %{scl} libnfs-devel >= 4.0.0
BuildRequires: %scl_require_package %{scl} folly-devel >= %{folly_version}
BuildRequires: %scl_require_package %{scl} fizz-devel >= %{folly_version}
BuildRequires: %scl_require_package %{scl} fizz-static >= %{folly_version}
BuildRequires: %scl_require_package %{scl} gflags-devel >= 2.1.2
BuildRequires: %scl_require_package %{scl} glog-devel >= 0.3.4
BuildRequires: %scl_require_package %{scl} openssl >= 1.1.0
BuildRequires: %scl_require_package %{scl} openssl-devel >= 1.1.0
BuildRequires: %scl_require_package %{scl} openssl-libs >= 1.1.0
BuildRequires: %scl_require_package %{scl} poco-devel
BuildRequires: %scl_require_package %{scl} poco-foundation
BuildRequires: %scl_require_package %{scl} poco-netssl
BuildRequires: %scl_require_package %{scl} poco-util
BuildRequires: %scl_require_package %{scl} poco-xml
BuildRequires: %scl_require_package %{scl} protobuf-compiler >= 3.4.1
BuildRequires: %scl_require_package %{scl} protobuf-devel >= 3.4.1
BuildRequires: %scl_require_package %{scl} protobuf-static >= 3.4.1
BuildRequires: %scl_require_package %{scl} proxygen-devel >= %{folly_version}
BuildRequires: %scl_require_package %{scl} proxygen-static >= %{folly_version}
BuildRequires: %scl_require_package %{scl} swift-sdk-cpp >= 1.0.0
BuildRequires: %scl_require_package %{scl} tbb-devel >= 2018.5~
BuildRequires: %scl_require_package %{scl} wangle-devel >= %{folly_version}
BuildRequires: %scl_require_package %{scl} wangle-static >= %{folly_version}
BuildRequires: %scl_require_package %{scl} fmt-devel = 7.0.1
BuildRequires: %scl_require_package %{scl} spdlog-devel = 1.7.0
BuildRequires: %scl_require_package devtoolset-7 gcc-c++
BuildRequires: binutils-devel
BuildRequires: cmake3
BuildRequires: double-conversion-devel
BuildRequires: epel-release
BuildRequires: fuse3-devel >= 3.6
BuildRequires: git
BuildRequires: glusterfs-api-devel >= 6.0
BuildRequires: golang
BuildRequires: libcurl-devel
BuildRequires: libevent-devel
BuildRequires: libunwind-devel
BuildRequires: libsodium-devel
BuildRequires: libtool-ltdl
BuildRequires: libtool-ltdl-devel
BuildRequires: nspr-devel
BuildRequires: nss-devel
BuildRequires: xrootd-private-devel >= %{xrootd_version}
BuildRequires: xrootd-server-devel >= %{xrootd_version}
BuildRequires: xrootd-client-devel >= %{xrootd_version}
BuildRequires: xrootd-devel >= %{xrootd_version}
BuildRequires: python36-devel
BuildRequires: subversion
%description
Oneclient is a software based on FUSE (Filesystem in Userspace) that
allows mounting onedata filesystem on Linux systems.
%package -n %{?scl_prefix}python2-onedatafs
Summary: Python 2 OnedataFS library.
Requires: epel-release
Requires: python
Requires: scl-utils
Requires: xrootd-server-libs >= %{xrootd_version}
Requires: xrootd-client-libs >= %{xrootd_version}
Requires: xrootd-libs >= %{xrootd_version}
Requires: %scl_require_package %{scl} folly >= %{folly_version}
Requires: %scl_require_package %{scl} openssl >= 1.1.0
Requires: %scl_require_package %{scl} libnfs >= 4.0.0
Requires: %scl_require_package %{scl} tbb >= 2018.5~
Requires: %scl_require_package %{scl} boost-python
%description -n %{?scl_prefix}python2-onedatafs
Python 2 OnedataFS library.
%package -n %{?scl_prefix}python3-onedatafs
Summary: Python 3 OnedataFS library.
Requires: epel-release
Requires: python36
Requires: scl-utils
Requires: xrootd-server-libs >= %{xrootd_version}
Requires: xrootd-client-libs >= %{xrootd_version}
Requires: xrootd-libs >= %{xrootd_version}
Requires: %scl_require_package %{scl} folly >= %{folly_version}
Requires: %scl_require_package %{scl} openssl >= 1.1.0
Requires: %scl_require_package %{scl} libnfs >= 4.0.0
Requires: %scl_require_package %{scl} tbb >= 2018.5~
Requires: %scl_require_package %{scl} boost-python3
%description -n %{?scl_prefix}python3-onedatafs
Python 3 OnedataFS library.
%define _unpackaged_files_terminate_build 0
%prep
%setup -q -n oneclient-base-%{version}
%build
cat <<SCL_EOF_MACRO | scl enable devtoolset-7 %{scl} --
LDFLAGS="-L/opt/onedata/%{scl}/root/usr/lib64" \
CFLAGS="-I/opt/onedata/%{scl}/root/usr/include" \
CXXFLAGS="-I/opt/onedata/%{scl}/root/usr/include" \
TBB_INSTALL_DIR=/opt/onedata/%{scl}/root/usr \
HTTP_PROXY=http://proxy.devel.onedata.org:3128 \
HTTPS_PROXY=http://proxy.devel.onedata.org:3128 \
cmake3 . -DLIB_INSTALL_DIR=lib64 \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_LIBRARY_PATH=/opt/onedata/%{scl}/root/usr/lib64 \
-DCMAKE_INCLUDE_PATH=/opt/onedata/%{scl}/root/usr/include \
-DGLOG_INCLUDE_DIR_HINTS=/opt/onedata/%{scl}/root/usr/include \
-DGLOG_LIBRARY_DIR_HINTS=/opt/onedata/%{scl}/root/usr/lib64 \
-DGFLAGS_INCLUDEDIR=/opt/onedata/%{scl}/root/usr/include \
-DGFLAGS_LIBRARYDIR=/opt/onedata/%{scl}/root/usr/lib64 \
-DFOLLY_INCLUDEDIR=/opt/onedata/%{scl}/root/usr/include \
-DFOLLY_LIBRARYDIR=/opt/onedata/%{scl}/root/usr/lib64 \
-DWANGLE_INCLUDE_DIR=/opt/onedata/%{scl}/root/usr/include \
-DBOOST_ROOT=/opt/onedata/%{scl}/root/usr \
-DProtobuf_INCLUDE_DIR=/opt/onedata/%{scl}/root/usr/include \
-DOPENSSL_ROOT_DIR=/opt/onedata/%{scl}/root/usr \
-DWITH_CEPH=ON -DWITH_GLUSTERFS=ON -DWITH_SWIFT=ON -DWITH_WEBDAV=ON -DWITH_XROOTD=ON \
-DWITH_ONES3=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_INTEGRATION_TESTS=OFF -DBUILD_SHARED_LIBS=ON \
-DPYTHON3_LDFLAGS="-lpython3.6m -lpthread -ldl -lutil -lm -Xlinker -export-dynamic" \
-DSTATIC_LIBSTDCPP=ON -DSTATIC_BOOST=OFF -DSTATIC_PROTOBUF=ON
make %{_smp_mflags} oneclient
make %{_smp_mflags} onebench
make %{_smp_mflags} onedatafs.py3
SCL_EOF_MACRO
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT/opt/onedata/%{scl}/root/
%files
%{_bindir}/oneclient
%{_bindir}/onebench
/opt/onedata/%{scl}/root/etc/oneclient.conf
%{_mandir}/man1/oneclient.1.gz
%{_mandir}/man5/oneclient.conf.5.gz
/opt/onedata/%{scl}/root/var/lib/oneclient/*
%license
%{_defaultdocdir}/oneclient/LICENSE.txt
%doc
%{_defaultdocdir}/oneclient/README.md
%files -n %{?scl_prefix}python3-onedatafs
/opt/onedata/%{scl}/root/%{python3_sitearch}/onedatafs/*
%post -n %{?scl_prefix}python3-onedatafs
%{__ln_s} -f /opt/onedata/%{scl}/root/%{python3_sitearch}/onedatafs/onedatafs_py3.so /opt/onedata/%{scl}/root/%{python3_sitearch}/onedatafs/onedatafs.so
%{__ln_s} -f /opt/onedata/%{scl}/root/usr/lib64/ceph/libceph-common.so.0 /opt/onedata/%{scl}/root/usr/lib64/libceph-common.so.0
%changelog
* %(date +"%a %b %d %Y") Onedata Package Maintainer <[email protected]>
- Build from %{version}