Skip to content

Commit 23ebb99

Browse files
committed
WL12101: DEB packages for Connector/C++ 8.0
1 parent 13ae8a0 commit 23ebb99

13 files changed

+421
-0
lines changed

packaging/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@
2828
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2929

3030
CONFIGURE_FILE(mysql-connector-c++.spec.in ${CMAKE_CURRENT_BINARY_DIR}/mysql-connector-c++.spec @ONLY)
31+
ADD_SUBDIRECTORY(deb-in)

packaging/deb-in/CMakeLists.txt

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
2+
#
3+
# This program is free software; you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License, version 2.0,
5+
# as published by the Free Software Foundation.
6+
#
7+
# This program is also distributed with certain software (including
8+
# but not limited to OpenSSL) that is licensed under separate terms,
9+
# as designated in a particular file or component or in included license
10+
# documentation. The authors of MySQL hereby grant you an additional
11+
# permission to link the program and your derivative works with the
12+
# separately licensed software that they have included with MySQL.
13+
#
14+
# This program is distributed in the hope that it will be useful,
15+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
# GNU General Public License, version 2.0, for more details.
18+
#
19+
# You should have received a copy of the GNU General Public License
20+
# along with this program; if not, write to the Free Software
21+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22+
23+
IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
24+
RETURN()
25+
ENDIF()
26+
IF (NOT DEFINED DEB_CODENAME)
27+
execute_process(
28+
COMMAND lsb_release -cs
29+
OUTPUT_VARIABLE DEB_CODENAME
30+
OUTPUT_STRIP_TRAILING_WHITESPACE
31+
)
32+
SET (DEB_CODENAME ${DEB_CODENAME} CACHE STRING "")
33+
ENDIF()
34+
# Timestamp for use in debian/changelog
35+
IF (NOT DEFINED DEB_CHANGELOG_TIMESTAMP)
36+
execute_process(
37+
COMMAND date --rfc-2822
38+
OUTPUT_VARIABLE DEB_CHANGELOG_TIMESTAMP
39+
OUTPUT_STRIP_TRAILING_WHITESPACE
40+
)
41+
SET (DEB_CHANGELOG_TIMESTAMP ${DEB_CHANGELOG_TIMESTAMP} CACHE STRING "")
42+
ENDIF()
43+
44+
# Commercial or community
45+
IF (DEB_PRODUCT STREQUAL "commercial")
46+
SET (DEB_COPYRIGHT_UPSTREAMNAME "MySQL Commercial ${MYSQL_BASE_VERSION}")
47+
SET (DEB_PRODUCTNAME "-commercial")
48+
SET (DEB_LICENSENAME "Commercial")
49+
SET (DEB_VERSION "+commercial-1")
50+
ELSE()
51+
SET (DEB_COPYRIGHT_UPSTREAMNAME "MySQL ${MYSQL_BASE_VERSION}")
52+
SET (DEB_PRODUCTNAME "")
53+
SET (DEB_LICENSENAME "GPL")
54+
SET (DEB_VERSION "-1")
55+
ENDIF()
56+
57+
58+
59+
# Platform specifics. The differences are generally only distro name used in version string
60+
IF(DEB_CODENAME STREQUAL "stretch")
61+
SET (DEB_PLATFORMRELEASE "debian9")
62+
ELSEIF(DEB_CODENAME STREQUAL "sid")
63+
IF (DEFINED DEB_GCC_SNAPSHOT)
64+
SET (DEB_CMAKE_EXTRAS "${DEB_CMAKE_EXTRAS} -DCMAKE_C_COMPILER=/usr/lib/gcc-snapshot/bin/gcc -DCMAKE_CXX_COMPILER=/usr/lib/gcc-snapshot/bin/g++ -DMYSQL_MAINTAINER_MODE=0 -DCMAKE_CXX_COMPILER_LAUNCHER=ccache")
65+
ENDIF()
66+
SET (DEB_PLATFORMRELEASE "debianunstable")
67+
ELSEIF(DEB_CODENAME STREQUAL "xenial")
68+
SET (DEB_PLATFORMRELEASE "ubuntu16.04")
69+
ELSEIF(DEB_CODENAME STREQUAL "bionic")
70+
SET (DEB_PLATFORMRELEASE "ubuntu18.04")
71+
ELSEIF(DEB_CODENAME STREQUAL "cosmic")
72+
SET (DEB_PLATFORMRELEASE "ubuntu18.10")
73+
ELSE()
74+
MESSAGE(STATUS
75+
"Skipping deb packaging on unsupported platform ${DEB_CODENAME}.")
76+
RETURN()
77+
ENDIF()
78+
79+
# All files are configured and copied to the debian/ directory, which is used
80+
# by debuild to make the packages
81+
SET (DEB_ROOT ${CMAKE_SOURCE_DIR}/packaging/deb-in)
82+
FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/debian)
83+
FILE(GLOB_RECURSE SOURCEFILES RELATIVE "${DEB_ROOT}" "${DEB_ROOT}/*")
84+
# Skip the copyright file from the "other" product type
85+
LIST(REMOVE_ITEM SOURCEFILES "copyright.${DEB_REMOVEPATTERN}")
86+
LIST(REMOVE_ITEM SOURCEFILES "CMakeLists.txt")
87+
FOREACH (SOURCEFILE ${SOURCEFILES})
88+
STRING(REGEX REPLACE "-packagesource-" "${DEB_PRODUCTNAME}-"
89+
TMPFILE ${SOURCEFILE})
90+
# Strip away the input file endings from the destination filenames
91+
STRING(REGEX REPLACE ".in$" "" DESTFILE ${TMPFILE})
92+
CONFIGURE_FILE("${DEB_ROOT}/${SOURCEFILE}"
93+
"${CMAKE_BINARY_DIR}/debian/${DESTFILE}" @ONLY)
94+
ENDFOREACH()
95+
EXECUTE_PROCESS(
96+
COMMAND chmod +x ${CMAKE_BINARY_DIR}/debian/rules
97+
)
98+

packaging/deb-in/changelog.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
mysql-connector-c++@DEB_PRODUCTNAME@ (@CONCPP_VERSION@@DEB_VERSION@@DEB_PLATFORMRELEASE@) @DEB_CODENAME@; urgency=low
2+
3+
* New Release. For release notes, please refer to
4+
https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-@CONCPP_VERSION_MAJOR@-@CONCPP_VERSION_MINOR@-@[email protected]
5+
6+
-- MySQL Release Engineering <[email protected]> @DEB_CHANGELOG_TIMESTAMP@

packaging/deb-in/compat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10

packaging/deb-in/control.in

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Source: mysql-connector-c++@DEB_PRODUCTNAME@
2+
Maintainer: MySQL Release Engineering <[email protected]>
3+
Section: database
4+
Priority: optional
5+
Standards-Version: 3.9.8
6+
Homepage: https://dev.mysql.com/doc/connector-cpp/en/
7+
Build-Depends: cmake, debhelper (>= 10), libboost-dev, libmysqlclient-dev, libssl-dev
8+
9+
Package: libmysqlcppconn8-1
10+
Architecture: any
11+
Section: libs
12+
Pre-Depends: ${misc:Pre-Depends}
13+
Multi-Arch: same
14+
Depends: ${shlibs:Depends}, ${misc:Depends}
15+
Description: MySQL database connector for C++
16+
A C++ interface for communicating with MySQL servers.
17+
18+
Package: libmysqlcppconn7
19+
Architecture: any
20+
Section: libs
21+
Pre-Depends: ${misc:Pre-Depends}
22+
Multi-Arch: same
23+
Depends: ${shlibs:Depends}, ${misc:Depends}
24+
Breaks: libmysqlcppconn7v5
25+
ReplaceS: libmysqlcppconn7v5
26+
Description: MySQL Driver for C++ which mimics the JDBC 4.0 API
27+
This MySQL Driver for C++ mimics the JDBC 4.0 API.
28+
29+
Package: libmysqlcppconn-dev
30+
Architecture: any
31+
Section: libdevel
32+
Pre-Depends: ${misc:Pre-Depends}
33+
Multi-Arch: same
34+
Depends: libmysqlcppconn7 (= ${binary:Version}), libmysqlcppconn8-1 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
35+
Description: Development header files and libraries for MySQL C++ client applications
36+
This package contains the development header files and libraries necessary
37+
to develop MySQL client applications in C++.

packaging/deb-in/copyright.in

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Upstream-Name: @DEB_COPYRIGHT_UPSTREAMNAME@
3+
Upstream-Contact: MySQL Release Engineering <[email protected]>
4+
Source: https://dev.mysql.com/doc/connector-cpp/en/
5+
6+
Files: *
7+
Copyright: 2008, 2018, Oracle and/or its affiliates. All rights reserved.
8+
License: @DEB_LICENSENAME@
9+
This is a release of MySQL Connector/C++, the C++ interface for communicating
10+
with MySQL servers.
11+
.
12+
License information can be found in the LICENSE.txt file.
13+
.
14+
This distribution may include materials developed by third parties.
15+
For license and attribution notices for these materials, please refer to the LICENSE.txt file.
16+
.
17+
For more information on MySQL Connector/C++, visit
18+
https://dev.mysql.com/doc/connector-cpp/en/
19+
.
20+
For additional downloads and the source of MySQL Connector/C++, visit
21+
http://dev.mysql.com/downloads
22+
.
23+
MySQL Connector/C++ is brought to you by the MySQL team at Oracle.
24+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
2+
#
3+
# This program is free software; you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License, version 2.0,
5+
# as published by the Free Software Foundation.
6+
#
7+
# This program is also distributed with certain software (including
8+
# but not limited to OpenSSL) that is licensed under separate terms,
9+
# as designated in a particular file or component or in included license
10+
# documentation. The authors of MySQL hereby grant you an additional
11+
# permission to link the program and your derivative works with the
12+
# separately licensed software that they have included with MySQL.
13+
#
14+
# This program is distributed in the hope that it will be useful,
15+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
# GNU General Public License, version 2.0, for more details.
18+
#
19+
# You should have received a copy of the GNU General Public License
20+
# along with this program; if not, write to the Free Software
21+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22+
23+
usr/lib/*/libmysqlcppconn.so
24+
usr/lib/*/libmysqlcppconn-static.a
25+
usr/lib/*/libmysqlcppconn8.so
26+
usr/lib/*/libmysqlcppconn8-static.a
27+
28+
usr/include/mysqlx/*.h usr/include/mysql-cppconn-8/mysqlx
29+
usr/include/mysqlx/devapi/*.h usr/include/mysql-cppconn-8/mysqlx/devapi
30+
usr/include/mysqlx/devapi/detail/*.h usr/include/mysql-cppconn-8/mysqlx/devapi/detail
31+
usr/include/mysqlx/common/*.h usr/include/mysql-cppconn-8/mysqlx/common
32+
usr/include/jdbc/*.h usr/include/mysql-cppconn-8/jdbc
33+
usr/include/jdbc/cppconn/*.h usr/include/mysql-cppconn-8/jdbc/cppconn
34+
35+
/usr/BUILDINFO.txt /usr/share/doc/libmysqlcppconn-dev
36+
37+
# Legal
38+
usr/LICENSE.txt /usr/share/doc/libmysqlcppconn-dev
39+
usr/README.txt /usr/share/doc/libmysqlcppconn-dev
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
2+
#
3+
# This program is free software; you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License, version 2.0,
5+
# as published by the Free Software Foundation.
6+
#
7+
# This program is also distributed with certain software (including
8+
# but not limited to OpenSSL) that is licensed under separate terms,
9+
# as designated in a particular file or component or in included license
10+
# documentation. The authors of MySQL hereby grant you an additional
11+
# permission to link the program and your derivative works with the
12+
# separately licensed software that they have included with MySQL.
13+
#
14+
# This program is distributed in the hope that it will be useful,
15+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
# GNU General Public License, version 2.0, for more details.
18+
#
19+
# You should have received a copy of the GNU General Public License
20+
# along with this program; if not, write to the Free Software
21+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22+
23+
# Additional license file is needed so overriding this warning
24+
libmysqlcppconn-dev: extra-license-file
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
2+
#
3+
# This program is free software; you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License, version 2.0,
5+
# as published by the Free Software Foundation.
6+
#
7+
# This program is also distributed with certain software (including
8+
# but not limited to OpenSSL) that is licensed under separate terms,
9+
# as designated in a particular file or component or in included license
10+
# documentation. The authors of MySQL hereby grant you an additional
11+
# permission to link the program and your derivative works with the
12+
# separately licensed software that they have included with MySQL.
13+
#
14+
# This program is distributed in the hope that it will be useful,
15+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
# GNU General Public License, version 2.0, for more details.
18+
#
19+
# You should have received a copy of the GNU General Public License
20+
# along with this program; if not, write to the Free Software
21+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22+
23+
usr/lib/*/libmysqlcppconn.so.7*
24+
25+
# Legal
26+
usr/LICENSE.txt /usr/share/doc/libmysqlcppconn
27+
usr/README.txt /usr/share/doc/libmysqlcppconn
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
2+
#
3+
# This program is free software; you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License, version 2.0,
5+
# as published by the Free Software Foundation.
6+
#
7+
# This program is also distributed with certain software (including
8+
# but not limited to OpenSSL) that is licensed under separate terms,
9+
# as designated in a particular file or component or in included license
10+
# documentation. The authors of MySQL hereby grant you an additional
11+
# permission to link the program and your derivative works with the
12+
# separately licensed software that they have included with MySQL.
13+
#
14+
# This program is distributed in the hope that it will be useful,
15+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
# GNU General Public License, version 2.0, for more details.
18+
#
19+
# You should have received a copy of the GNU General Public License
20+
# along with this program; if not, write to the Free Software
21+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22+
23+
# Additional license file is needed so overriding this warning
24+
libmysqlcppconn7: extra-license-file
25+
26+
# Due to static linking this cannot be avoided and hence being overridden
27+
libmysqlcppconn7: embedded-library
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
2+
#
3+
# This program is free software; you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License, version 2.0,
5+
# as published by the Free Software Foundation.
6+
#
7+
# This program is also distributed with certain software (including
8+
# but not limited to OpenSSL) that is licensed under separate terms,
9+
# as designated in a particular file or component or in included license
10+
# documentation. The authors of MySQL hereby grant you an additional
11+
# permission to link the program and your derivative works with the
12+
# separately licensed software that they have included with MySQL.
13+
#
14+
# This program is distributed in the hope that it will be useful,
15+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
# GNU General Public License, version 2.0, for more details.
18+
#
19+
# You should have received a copy of the GNU General Public License
20+
# along with this program; if not, write to the Free Software
21+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22+
23+
usr/lib/*/libmysqlcppconn8.so.1*
24+
25+
# Legal
26+
usr/LICENSE.txt /usr/share/doc/libmysqlcppconn8-1
27+
usr/README.txt /usr/share/doc/libmysqlcppconn8-1
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
2+
#
3+
# This program is free software; you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License, version 2.0,
5+
# as published by the Free Software Foundation.
6+
#
7+
# This program is also distributed with certain software (including
8+
# but not limited to OpenSSL) that is licensed under separate terms,
9+
# as designated in a particular file or component or in included license
10+
# documentation. The authors of MySQL hereby grant you an additional
11+
# permission to link the program and your derivative works with the
12+
# separately licensed software that they have included with MySQL.
13+
#
14+
# This program is distributed in the hope that it will be useful,
15+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
# GNU General Public License, version 2.0, for more details.
18+
#
19+
# You should have received a copy of the GNU General Public License
20+
# along with this program; if not, write to the Free Software
21+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22+
23+
# Additional license file is needed so overriding this warning
24+
libmysqlcppconn8-1: extra-license-file

0 commit comments

Comments
 (0)