-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathscript.sh
70 lines (45 loc) · 1.86 KB
/
script.sh
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
sudo yum install -y rpm-build redhat-rpm-config createrepo
epel-release
centos-release-scl
cmake3
devtoolset-7
unixODBC-devel
libtool-ltdl-devel
unixODBC
libtool-ltdl
ODBC_INCLUDE_DIRECTORIES ODBC_LIBRARIES
LINKER_FLAGS
/usr/include/libiodbc/isql.h
/usr/include/libiodbc/isqlext.h
/usr/include/libiodbc/isqltypes.h
/usr/include/libiodbc/odbcinst.h
/usr/include/libiodbc/sql.h
/usr/include/libiodbc/sqlext.h
/usr/include/libiodbc/sqltypes.h
/usr/lib64/libiodbc.so.2
/usr/lib64/libiodbc.so.2.1.19
/usr/lib64/libiodbcinst.so.2
/usr/lib64/libiodbcinst.so.2.1.19
cmake3 .. -DODBC_INCLUDE_DIRECTORIES=/usr/include/libiodbc -DODBC_LIBRARIES=/usr/lib64/libiodbc.so,/usr/lib64/libiodbcinst.so > cm
cmake3 .. -DODBC_INCLUDE_DIRECTORIES=/usr/include/libodbc -DODBC_LIBRARIES=/usr/lib64/libodbc.so,/usr/lib64/libodbcinst.so -DCMAKE_CXX_LINK_FLAGS="-Wl,-rpath,/usr/lib64 -L/usr/lib64,-llibodbc,libodbcinst" > cm
-DCMAKE_CXX_LINK_FLAGS="-Wl,-rpath,/usr/local/lib64 -L/usr/local/lib64"
-DLTDL_LIBRARY=/usr/lib64/libltdl.so
cmake3 .. -DODBC_INCLUDE_DIRECTORIES=/usr/include/libodbc -DODBC_LIBRARIES=/usr/lib64/libodbc.so,/usr/lib64/libodbcinst.so -DCMAKE_CXX_LINK_FLAGS="-Wl,-rpath,/usr/lib64 -L/usr/lib64,-llibodbc,libodbcinst" -DLTDL_LIBRARY=/usr/lib64/libltdl.so > cm
cmake3 .. \
-DODBC_INCLUDE_DIRECTORIES=/usr/include \
-DODBC_LIBRARIES=/usr/lib64/libodbc.so \
-DODBC_LIBRARIES=/usr/lib64/libodbcinst.so \
-DCMAKE_CXX_LINK_FLAGS="-Wl,-rpath,/usr/lib64 -L/usr/lib64,-llibodbc,-llibodbcinst" \
-DLTDL_LIBRARY=/usr/lib64/libltdl.so \
-DCMAKE_INSTALL_PREFIX:PATH=/tmp \
> cm3
cmake3 .. \
-DCMAKE_INSTALL_PREFIX:PATH=/tmp \
> cm3
export CMAKE=cmake3
export CC=/opt/rh/devtoolset-7/root/usr/bin/gcc
export CXX=/opt/rh/devtoolset-7/root/usr/bin/g++
cmake3 .. -DCMAKE_INSTALL_PREFIX=/tmp/local
make -j6
make install
rpmbuild -v -bb --clean /home/user/rpmbuild/SPECS/clickhouse-odbc.spec