-
Notifications
You must be signed in to change notification settings - Fork 1
/
oneclient.spec
157 lines (134 loc) · 5.92 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
%global _scl_prefix /opt/onedata
%{?scl:%scl_package oneclient-base}
%{!?scl:%global pkg_name %{name}}
%global version {{version}}
%global folly_version 2017.10.02.00
Name: %{?scl_prefix}oneclient
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: fuse
Requires: scl-utils
Requires: %scl_require_package %{scl} tbb >= 2018.5~
BuildRequires: %scl_require_package %{scl} aws-sdk-cpp-s3 >= 1.4.35
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} folly-devel = %{folly_version}
BuildRequires: %scl_require_package %{scl} folly-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} glusterfs-api-devel >= 3.12.15
BuildRequires: %scl_require_package %{scl} librados-devel
BuildRequires: %scl_require_package %{scl} libradosstriper-devel
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 devtoolset-6 gcc-c++
BuildRequires: binutils-devel
BuildRequires: cmake3
BuildRequires: double-conversion-devel
BuildRequires: epel-release
BuildRequires: fuse-devel >= 2.7
BuildRequires: git
BuildRequires: golang
BuildRequires: libcurl-devel
BuildRequires: libevent-devel
BuildRequires: libsodium-devel
BuildRequires: libtool-ltdl
BuildRequires: libtool-ltdl-devel
BuildRequires: nspr-devel
BuildRequires: nss-devel
BuildRequires: openssl
BuildRequires: openssl-devel
BuildRequires: python-devel
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: %{name} = %{version}
Requires: python
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: %{name} = %{version}
Requires: python36
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-%{version}
%build
cat <<SCL_EOF_MACRO | scl enable devtoolset-6 onedata1802 --
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 \
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 \
-DWITH_CEPH=ON -DWITH_GLUSTERFS=ON -DWITH_SWIFT=ON -DWITH_WEBDAV=ON \
-DCMAKE_BUILD_TYPE=Release -DBUILD_INTEGRATION_TESTS=OFF -DBUILD_SHARED_LIBS=ON \
-DSTATIC_LIBSTDCPP=ON -DSTATIC_BOOST=OFF -DSTATIC_PROTOBUF=ON
make %{_smp_mflags} oneclient
make %{_smp_mflags} onebench
make %{_smp_mflags} onedatafs.py2
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}python2-onedatafs
/opt/onedata/%{scl}/root/%{python_sitearch}/onedatafs/*
%post -n %{?scl_prefix}python2-onedatafs
%{__ln_s} -f /opt/onedata/%{scl}/root/%{python_sitearch}/onedatafs/onedatafs_py2.so /opt/onedata/%{scl}/root/%{python_sitearch}/onedatafs/onedatafs.so
%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
%changelog
* %(date +"%a %b %d %Y") Onedata Package Maintainer <[email protected]>
- Build from %{version}