/[packages]/updates/8/mysql-connector-c++/current/SPECS/mysql-connector-c++.spec
ViewVC logotype

Contents of /updates/8/mysql-connector-c++/current/SPECS/mysql-connector-c++.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1935308 - (show annotations) (download)
Mon Jan 23 19:02:28 2023 UTC (14 months, 3 weeks ago) by daviddavid
File size: 6258 byte(s)
SILENT: fix underlinking issue

1 %define major8 2
2 %define libname8 %mklibname mysqlcppconn 8 %{major8}
3
4 %define major 9
5 %define libname %mklibname mysqlcppconn %{major}
6
7 %define develname %mklibname mysqlcppconn8 -d
8
9 %ifarch aarch64
10 %global _smp_ncpus_max 4
11 %endif
12
13 Summary: A MySQL database connector for C++
14 Name: mysql-connector-c++
15 Version: 8.0.32
16 Release: %mkrel 1
17 Group: System/Libraries
18 License: GPLv2
19 URL: https://dev.mysql.com/downloads/connector/cpp/
20 Source0: https://dev.mysql.com/get/Downloads/Connector-C++/%{name}-%{version}-src.tar.gz
21 ## from opensuse
22 Patch3: mysql-connector-cpp-libmysql_dynamic_proxy_typos.patch
23 Patch4: mysql-connector-cpp-mariadb.patch
24 Patch7: mysql-connector-cpp-test-feature.patch
25
26 BuildRequires: cmake
27 BuildRequires: mysql-devel
28 BuildRequires: boost-devel
29 BuildRequires: pkgconfig(RapidJSON)
30 BuildRequires: pkgconfig(liblz4)
31 BuildRequires: pkgconfig(libzstd)
32 BuildRequires: pkgconfig(protobuf)
33 BuildRequires: pkgconfig(zlib)
34
35 %description
36 MySQL Connector/C++ is a MySQL database connector for C++ development. The
37 MySQL driver for C++ can be used to connect to MySQL from C++ applications. The
38 driver mimics the JDBC 4.0 API. It implements a significant subset of JDBC 4.0.
39
40 The Driver for C++ is designed to work best with MySQL 5.1 or later. Note - its
41 full functionality is not available when connecting to MySQL 5.0. You cannot
42 connect to MySQL 4.1 or earlier.
43
44 Using MySQL Connector/C++ instead of the MySQL C API (MySQL Client Library)
45 offers the following advantages for C++ users:
46
47 * Convenience of pure C++ - no C function calls
48 * Support of a well designed API - JDBC 4.0
49 * Support of a commonly known and well documented API - JDBC 4.0
50 * Support of the object oriented programming paradigm
51 * Shorter development times
52
53 %package -n %{libname}
54 Summary: The shared mysql-connector-cpp library
55 Group: System/Libraries
56 Provides: %{name} = %{version}-%{release}
57 Provides: mysql-connector-cpp = %{version}-%{release}
58
59 %description -n %{libname}
60 MySQL Connector/C++ is a MySQL database connector for C++ development. The
61 MySQL driver for C++ can be used to connect to MySQL from C++ applications. The
62 driver mimics the JDBC 4.0 API. It implements a significant subset of JDBC 4.0.
63
64 The Driver for C++ is designed to work best with MySQL 5.1 or later. Note - its
65 full functionality is not available when connecting to MySQL 5.0. You cannot
66 connect to MySQL 4.1 or earlier.
67
68 Using MySQL Connector/C++ instead of the MySQL C API (MySQL Client Library)
69 offers the following advantages for C++ users:
70
71 * Convenience of pure C++ - no C function calls
72 * Support of a well designed API - JDBC 4.0
73 * Support of a commonly known and well documented API - JDBC 4.0
74 * Support of the object oriented programming paradigm
75 * Shorter development times
76
77 %package -n %{libname8}
78 Summary: The shared mysql-connector-cpp library
79 Group: System/Libraries
80
81 %description -n %{libname8}
82 MySQL Connector/C++ is a MySQL database connector for C++ development. The
83 MySQL driver for C++ can be used to connect to MySQL from C++ applications. The
84 driver mimics the JDBC 4.0 API. It implements a significant subset of JDBC 4.0.
85
86 The Driver for C++ is designed to work best with MySQL 5.1 or later. Note - its
87 full functionality is not available when connecting to MySQL 5.0. You cannot
88 connect to MySQL 4.1 or earlier.
89
90 Using MySQL Connector/C++ instead of the MySQL C API (MySQL Client Library)
91 offers the following advantages for C++ users:
92
93 * Convenience of pure C++ - no C function calls
94 * Support of a well designed API - JDBC 4.0
95 * Support of a commonly known and well documented API - JDBC 4.0
96 * Support of the object oriented programming paradigm
97 * Shorter development times
98
99 %package -n %{develname}
100 Summary: Development library and header files for development with mysql-connector-cpp
101 Group: Development/C++
102 Requires: %{libname} = %{version}-%{release}
103 Requires: %{libname8} = %{version}-%{release}
104 Provides: %{name}-devel = %{version}-%{release}
105 Provides: mysql-connector-cpp-devel = %{version}-%{release}
106
107 %description -n %{develname}
108 MySQL Connector/C++ is a MySQL database connector for C++ development. The
109 MySQL driver for C++ can be used to connect to MySQL from C++ applications. The
110 driver mimics the JDBC 4.0 API. It implements a significant subset of JDBC 4.0.
111
112 The Driver for C++ is designed to work best with MySQL 5.1 or later. Note - its
113 full functionality is not available when connecting to MySQL 5.0. You cannot
114 connect to MySQL 4.1 or earlier.
115
116 Using MySQL Connector/C++ instead of the MySQL C API (MySQL Client Library)
117 offers the following advantages for C++ users:
118
119 * Convenience of pure C++ - no C function calls
120 * Support of a well designed API - JDBC 4.0
121 * Support of a commonly known and well documented API - JDBC 4.0
122 * Support of the object oriented programming paradigm
123 * Shorter development times
124
125 %prep
126 %autosetup -n %{name}-%{version}-src -p1
127
128 chmod -x jdbc/examples/*.{cpp,txt}
129
130 # drop bundled stuff
131 rm -rf cdk/extra/protobuf/protobuf-*/
132 rm -rf cdk/extra/rapidjson/include/
133 rm -rf cdk/extra/lz4/
134 rm -rf cdk/extra/zlib/
135 rm -rf cdk/extra/zstd/
136
137 # Save examples to keep directory clean (for doc)
138 cp -apr jdbc/examples examples
139 rm -rf examples/CMakeLists.txt
140
141 %build
142 export CXXFLAGS="%{build_cxxflags} -Wno-deprecated-declarations"
143 export LDFLAGS="%{ldflages} -lpthread"
144 %cmake \
145 -DMYSQL_INCLUDE_DIR=%{_includedir}/mysql \
146 -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
147 -DMYSQL_LIB=%{_libdir}/libmysqlclient.so \
148 -DBUNDLE_DEPENDENCIES=OFF \
149 -DWITH_PROTOBUF=system \
150 -DWITH_LZ4=system \
151 -DWITH_SSL=system \
152 -DWITH_ZLIB=system \
153 -DWITH_ZSTD=system \
154 -DWITH_JDBC=ON \
155 -DMYSQLCLIENT_STATIC_BINDING=OFF \
156 -DMYSQLCLIENT_STATIC_LINKING=OFF \
157 -DDEBUG_PREFIX_MAP=OFF
158 %cmake_build
159
160 %install
161 %cmake_install
162
163 mv -f %{buildroot}%{_prefix}/INFO_* .
164
165 %files -n %{libname8}
166 %license LICENSE* INFO_BIN
167 %{_libdir}/libmysqlcppconn8.so.%{major8}{,.*}
168
169 %files -n %{libname}
170 %license LICENSE* INFO_BIN
171 %{_libdir}/libmysqlcppconn.so.%{major}{,.*}
172
173 %files -n %{develname}
174 %doc README* CONTRIBUTING* examples
175 %{_includedir}/mysqlx/
176 %{_includedir}/jdbc/
177 %{_includedir}/mysql/jdbc.h
178 %{_libdir}/libmysqlcppconn.so
179 %{_libdir}/libmysqlcppconn8.so

  ViewVC Help
Powered by ViewVC 1.1.30