Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*.0

# Compiled Dynamic libraries
libcassandra.so*
libscylla-cpp-driver.so*
*.dylib

# Compiled Static libraries
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.1)
project(cassandra C CXX)
project(scylla-cpp C CXX)

set(CASS_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(CASS_SRC_DIR "${CASS_ROOT_DIR}/src")
Expand Down Expand Up @@ -62,12 +62,12 @@ if(CASS_BUILD_INTEGRATION_TESTS OR CASS_BUILD_UNIT_TESTS)
endif()

# Determine which driver target should be used as a dependency
set(PROJECT_LIB_NAME_TARGET cassandra)
set(PROJECT_LIB_NAME_TARGET scylla-cpp-driver)
if(CASS_USE_STATIC_LIBS OR
(WIN32 AND (CASS_BUILD_INTEGRATION_TESTS OR CASS_BUILD_UNIT_TESTS)))
set(CASS_USE_STATIC_LIBS ON) # Not all driver internals are exported for test executable (e.g. CASS_EXPORT)
set(CASS_BUILD_STATIC ON)
set(PROJECT_LIB_NAME_TARGET cassandra_static)
set(PROJECT_LIB_NAME_TARGET scylla-cpp-driver_static)
endif()

# Ensure the driver is configured to build
Expand Down
31 changes: 31 additions & 0 deletions packaging/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## On a clean CentOS 7

Set up the EPEL, install the toolchain and `libuv`:
```
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-13.noarch.rpm
sudo rpm -Uvh epel-release*rpm
sudo yum install -y libuv-devel openssl-devel cmake3 make g++ git
```

Now clone the source code, checkout particular revision if needed:
```
git clone https://github.com/scylladb/cpp-driver.git
cd cpp-driver/
```

Packaging:
```
cat licenses/* > LICENSE.txt
cd packaging/
./build_rpm.sh
```

## On a clean Ubuntu 18

```
sudo apt-get update
sudo apt-get install -y libuv1-dev openssl cmake make g++ git devscripts debhelper dh-exec libssl-dev zlib1g-dev
git clone https://github.com/scylladb/cpp-driver.git
cd cpp-driver/packaging
./build_deb.sh
```
2 changes: 1 addition & 1 deletion packaging/build_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ check_command "lsb_release" "lsb-release"
version=$(header_version "../include/cassandra.h")
release=1
dist=$(lsb_release -s -c)
base="cassandra-cpp-driver-$version"
base="scylla-cpp-driver-$version"
archive="$base.tar.gz"
files="CMakeLists.txt cmake cmake_uninstall.cmake.in driver_config.hpp.in include src"

Expand Down
8 changes: 4 additions & 4 deletions packaging/build_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if [[ ! -z $1 ]]; then
fi

version=$(header_version "../include/cassandra.h")
base="cassandra-cpp-driver-$version"
base="scylla-cpp-driver-$version"
archive="$base.tar.gz"
files="CMakeLists.txt cmake cmake_uninstall.cmake.in driver_config.hpp.in include src README.md LICENSE.txt"

Expand Down Expand Up @@ -69,15 +69,15 @@ echo "Copying files"
for file in $files; do
cp -r "../$file" "build/SOURCES/$base"
done
cp cassandra.pc.in build/SOURCES
cp cassandra_static.pc.in build/SOURCES
cp scylla-cpp-driver.pc.in build/SOURCES
cp scylla-cpp-driver_static.pc.in build/SOURCES

echo "Archiving $archive"
pushd "build/SOURCES"
tar zcf $archive $base
popd

echo "Building package:"
rpmbuild --target $arch --define "_topdir ${PWD}/build" --define "driver_version $version" --define "libuv_version $libuv_version" -ba cassandra-cpp-driver.spec
rpmbuild --target $arch --define "_topdir ${PWD}/build" --define "driver_version $version" --define "libuv_version $libuv_version" -ba scylla-cpp-driver.spec

exit 0
11 changes: 0 additions & 11 deletions packaging/cassandra.pc.in

This file was deleted.

13 changes: 0 additions & 13 deletions packaging/cassandra_static.pc.in

This file was deleted.

6 changes: 0 additions & 6 deletions packaging/debian/cassandra-cpp-driver-dev.install

This file was deleted.

3 changes: 0 additions & 3 deletions packaging/debian/cassandra-cpp-driver-dev.links

This file was deleted.

11 changes: 0 additions & 11 deletions packaging/debian/cassandra.pc

This file was deleted.

13 changes: 0 additions & 13 deletions packaging/debian/cassandra_static.pc

This file was deleted.

2 changes: 1 addition & 1 deletion packaging/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cassandra-cpp-driver (1.0.0-1) stable; urgency=low
scylla-cpp-driver (1.0.0-1) stable; urgency=low

* Initial release

Expand Down
32 changes: 16 additions & 16 deletions packaging/debian/control
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
Source: cassandra-cpp-driver
Source: scylla-cpp-driver
Priority: extra
Maintainer: Michael Penick <michael.penick@datastax.com>
Maintainer: Juliusz Stasiewicz <juliusz.stasiewicz@scylladb.com>
Build-Depends: debhelper (>= 9.0.0), dh-exec, cmake, make,
libuv1-dev (>= 1.0.0),
libssl-dev
Standards-Version: 3.9.2
Section: libs
Homepage: http://datastax.github.io/cpp-driver/
Vcs-Git: git://github.com/datastax/cpp-driver.git
Vcs-Browser: https://github.com/datastax/cpp-driver
Homepage: https://github.com/scylladb/cpp-driver
Vcs-Git: git://github.com/scylladb/cpp-driver.git
Vcs-Browser: https://github.com/scylladb/cpp-driver

Package: cassandra-cpp-driver
Package: scylla-cpp-driver
Section: libs
Architecture: any
Pre-Depends: multiarch-support, ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: C/C++ client driver for Apache Cassandra and DataStax Products - runtime library
A modern, feature-rich, and highly tunable C/C++ client library for Apache
Description: C/C++ client driver for Scylla, Apache Cassandra and DataStax Products - runtime library
A modern, feature-rich, shard-aware and highly tunable C/C++ client library for Scylla, Apache
Cassandra and DataStax Products using Cassandra's native protocol and Cassandra Query
Language along with extensions for DataStax Products.

Package: cassandra-cpp-driver-dev
Package: scylla-cpp-driver-dev
Section: libdevel
Architecture: any
Depends: cassandra-cpp-driver (= ${binary:Version}), ${misc:Depends}
Description: C/C++ client driver for Apache Cassandra and DataStax Products - development files
A modern, feature-rich, and highly tunable C/C++ client library for Apache
Depends: scylla-cpp-driver (= ${binary:Version}), ${misc:Depends}
Description: C/C++ client driver for Scylla, Apache Cassandra and DataStax Products - development files
A modern, feature-rich, shard-aware and highly tunable C/C++ client library for Scylla, Apache
Cassandra and DataStax Products using Cassandra's native protocol and Cassandra Query
Language along with extensions for DataStax Products.

Package: cassandra-cpp-driver-dbg
Package: scylla-cpp-driver-dbg
Section: debug
Architecture: any
Depends: cassandra-cpp-driver (= ${binary:Version}), ${misc:Depends}
Description: C/C++ client driver for Apache Cassandra and DataStax Products - debugging symbols
A modern, feature-rich, and highly tunable C/C++ client library for Apache
Depends: scylla-cpp-driver (= ${binary:Version}), ${misc:Depends}
Description: C/C++ client driver for Scylla, Apache Cassandra and DataStax Products - debugging symbols
A modern, feature-rich, shard-aware and highly tunable C/C++ client library for Scylla, Apache
Cassandra and DataStax Products using Cassandra's native protocol and Cassandra Query
Language along with extensions for DataStax Products.
11 changes: 8 additions & 3 deletions packaging/debian/copyright
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Format: http://dep.debian.net/deps/dep5
Upstream-Name: cassandra-cpp-driver
Source: https://github.com/datastax/cpp-driver
Upstream-Name: scylla-cpp-driver
Source: https://github.com/scylladb/cpp-driver

Files: *
Copyright: Copyright (c) DataStax, Inc.
License: Apache-2.0
Copyright (c) 2020 ScyllaDB
License: Apache-2.0, AGPL-3
On Debian systems, the complete text of the Apache License Version 2.0
can be found in `/usr/share/common-licenses/Apache-2.0'.

Expand All @@ -25,3 +26,7 @@ License: MIT
Files: src/third_party/curl/*
Copyright: Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, et al.
License: MIT

Files: src/optional/optional_akrzemi.hpp
Copyright: Copyright (C) 2011 - 2012 Andrzej Krzemienski
License: Boost Software License 1.0
8 changes: 4 additions & 4 deletions packaging/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ endif
export SOVER ?= $(shell dpkg-parsechangelog \
| sed -rne 's/^Version: ([0-9.]+)([-+~][[:alpha:]][[:alnum:]]*)?([-+~][[:digit:]])?$$/\1\2/p' \
| sed 's/[+~]/-/')
export SONAME=libcassandra.so.$(SOVER)
export SONAME=libscylla-cpp-driver.so.$(SOVER)

%:
dh $@
Expand All @@ -29,9 +29,9 @@ override_dh_auto_build:
dh_auto_build -- -j$(NUMJOBS)

override_dh_strip:
dh_strip --dbg-package=cassandra-cpp-driver-dbg
sed -i s/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/ debian/cassandra-cpp-driver-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/*.pc
sed -i s/@DEB_VERSION_UPSTREAM@/$(DEB_VERSION_UPSTREAM)/ debian/cassandra-cpp-driver-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/*.pc
dh_strip --dbg-package=scylla-cpp-driver-dbg
sed -i s/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/ debian/scylla-cpp-driver-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/*.pc
sed -i s/@DEB_VERSION_UPSTREAM@/$(DEB_VERSION_UPSTREAM)/ debian/scylla-cpp-driver-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/*.pc

override_dh_makeshlibs:
dh_makeshlibs -V
Expand Down
6 changes: 6 additions & 0 deletions packaging/debian/scylla-cpp-driver-dev.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#! /usr/bin/dh-exec

usr/include/*.h
usr/lib/*.a usr/lib/${DEB_HOST_MULTIARCH}
debian/scylla-cpp-driver.pc usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig
debian/scylla-cpp-driver_static.pc usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig
4 changes: 4 additions & 0 deletions packaging/debian/scylla-cpp-driver.links
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/dh-exec

usr/lib/${DEB_HOST_MULTIARCH}/${SONAME} usr/lib/${DEB_HOST_MULTIARCH}/libscylla-cpp-driver.so
usr/lib/${DEB_HOST_MULTIARCH}/libscylla-cpp-driver.so usr/lib/${DEB_HOST_MULTIARCH}/libcassandra.so
11 changes: 11 additions & 0 deletions packaging/debian/scylla-cpp-driver.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib/@DEB_HOST_MULTIARCH@
includedir=${prefix}/include

Name: scylla-cpp-driver
Description: A C/C++ client driver for Scylla, Apache Cassandra and DataStax Products
Version: @DEB_VERSION_UPSTREAM@
Libs: -L${libdir} -lscylla-cpp-driver
Cflags:
URL: https://github.com/scylladb/cpp-driver/
13 changes: 13 additions & 0 deletions packaging/debian/scylla-cpp-driver_static.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib/@DEB_HOST_MULTIARCH@
includedir=${prefix}/include

Name: scylla-cpp-driver_static
Description: A C/C++ client driver for Scylla, Apache Cassandra and DataStax Products
Version: @DEB_VERSION_UPSTREAM@
Requires: libuv
Requires: openssl
Libs: -L${libdir} -lscylla-cpp-driver_static -lstdc++
Cflags:
URL: https://github.com/scylladb/cpp-driver/
11 changes: 11 additions & 0 deletions packaging/scylla-cpp-driver.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: scylla-cpp-driver
Description: A C/C++ client driver for Scylla, Apache Cassandra and DataStax Products
Version: @version@
Libs: -L${libdir} -lscylla-cpp-driver
Cflags: -I${includedir}
URL: https://github.com/scylladb/cpp-driver/
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
%define distnum %(/usr/lib/rpm/redhat/dist.sh --distnum)
%endif

Name: cassandra-cpp-driver
Name: scylla-cpp-driver
Epoch: 1
Version: %{driver_version}
Release: 1%{?dist}
Summary: DataStax C/C++ Driver for Apache Cassandra and DataStax Products
Summary: C/C++ Driver for Scylla, Apache Cassandra and DataStax Products

Group: Development/Tools
License: Apache 2.0
URL: https://github.com/datastax/cpp-driver
URL: https://github.com/scylladb/cpp-driver
Source0: %{name}-%{version}.tar.gz
Source1: cassandra.pc.in
Source2: cassandra_static.pc.in
Source1: scylla-cpp-driver.pc.in
Source2: scylla-cpp-driver_static.pc.in

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

Expand All @@ -29,9 +29,9 @@ BuildRequires: libuv-devel >= %{libuv_version}
BuildRequires: openssl-devel >= 0.9.8e

%description
A modern, feature-rich, and highly tunable C/C++ client library for Apache
Cassandra and DataStax Products using Cassandra's native protocol and Cassandra
Query Language along with extensions for DataStax Products.
A modern, feature-rich, shard-aware, and highly tunable C/C++ client library for
ScyllaDB, Apache Cassandra and DataStax Products using Cassandra's native protocol and
Cassandra Query Language along with extensions for DataStax Products.

%package devel
Summary: Development libraries for ${name}
Expand All @@ -53,6 +53,8 @@ export CFLAGS='%{optflags}'
export CXXFLAGS='%{optflags}'
%{cmakecmd} -DCMAKE_BUILD_TYPE=RELEASE -DCASS_BUILD_STATIC=ON -DCASS_INSTALL_PKG_CONFIG=OFF -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DCMAKE_INSTALL_LIBDIR=%{_libdir} .
make %{?_smp_mflags}
ln -s libscylla-cpp-driver.so libcassandra.so
ln -s libscylla-cpp-driver_static.a libcassandra_static.a

%install
rm -rf %{buildroot}
Expand All @@ -64,13 +66,13 @@ sed -e "s#@prefix@#%{_prefix}#g" \
-e "s#@libdir@#%{_libdir}#g" \
-e "s#@includedir@#%{_includedir}#g" \
-e "s#@version@#%{version}#g" \
%SOURCE1 > %{buildroot}/%{_libdir}/pkgconfig/cassandra.pc
%SOURCE1 > %{buildroot}/%{_libdir}/pkgconfig/scylla-cpp-driver.pc
sed -e "s#@prefix@#%{_prefix}#g" \
-e "s#@exec_prefix@#%{_exec_prefix}#g" \
-e "s#@libdir@#%{_libdir}#g" \
-e "s#@includedir@#%{_includedir}#g" \
-e "s#@version@#%{version}#g" \
%SOURCE2 > %{buildroot}/%{_libdir}/pkgconfig/cassandra_static.pc
%SOURCE2 > %{buildroot}/%{_libdir}/pkgconfig/scylla-cpp-driver_static.pc

%clean
rm -rf %{buildroot}
Expand Down
13 changes: 13 additions & 0 deletions packaging/scylla-cpp-driver_static.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: scylla-cpp-driver
Description: A C/C++ client driver for Scylla, Apache Cassandra and DataStax Products
Version: @version@
Requires: libuv
Requires: openssl
Libs: -L${libdir} -lscylla-cpp-driver_static -lstdc++
Cflags: -I${includedir}
URL: https://github.com/scylladb/cpp-driver/
Loading