Skip to content

Commit 1b2957f

Browse files
authored
Merge pull request datastax#17 from jul-stas/release-scripts
Release as `scylla-cpp-driver`
2 parents 5183cf0 + 1b22d0c commit 1b2957f

24 files changed

+160
-121
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*.0
66

77
# Compiled Dynamic libraries
8-
libcassandra.so*
8+
libscylla-cpp-driver.so*
99
*.dylib
1010

1111
# Compiled Static libraries

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.1)
2-
project(cassandra C CXX)
2+
project(scylla-cpp C CXX)
33

44
set(CASS_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
55
set(CASS_SRC_DIR "${CASS_ROOT_DIR}/src")
@@ -62,12 +62,12 @@ if(CASS_BUILD_INTEGRATION_TESTS OR CASS_BUILD_UNIT_TESTS)
6262
endif()
6363

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

7373
# Ensure the driver is configured to build

packaging/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## On a clean CentOS 7
2+
3+
Set up the EPEL, install the toolchain and `libuv`:
4+
```
5+
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-13.noarch.rpm
6+
sudo rpm -Uvh epel-release*rpm
7+
sudo yum install -y libuv-devel openssl-devel cmake3 make g++ git
8+
```
9+
10+
Now clone the source code, checkout particular revision if needed:
11+
```
12+
git clone https://github.com/scylladb/cpp-driver.git
13+
cd cpp-driver/
14+
```
15+
16+
Packaging:
17+
```
18+
cat licenses/* > LICENSE.txt
19+
cd packaging/
20+
./build_rpm.sh
21+
```
22+
23+
## On a clean Ubuntu 18
24+
25+
```
26+
sudo apt-get update
27+
sudo apt-get install -y libuv1-dev openssl cmake make g++ git devscripts debhelper dh-exec libssl-dev zlib1g-dev
28+
git clone https://github.com/scylladb/cpp-driver.git
29+
cd cpp-driver/packaging
30+
./build_deb.sh
31+
```

packaging/build_deb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ check_command "lsb_release" "lsb-release"
3737
version=$(header_version "../include/cassandra.h")
3838
release=1
3939
dist=$(lsb_release -s -c)
40-
base="cassandra-cpp-driver-$version"
40+
base="scylla-cpp-driver-$version"
4141
archive="$base.tar.gz"
4242
files="CMakeLists.txt cmake cmake_uninstall.cmake.in driver_config.hpp.in include src"
4343

packaging/build_rpm.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if [[ ! -z $1 ]]; then
4040
fi
4141

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

@@ -69,15 +69,15 @@ echo "Copying files"
6969
for file in $files; do
7070
cp -r "../$file" "build/SOURCES/$base"
7171
done
72-
cp cassandra.pc.in build/SOURCES
73-
cp cassandra_static.pc.in build/SOURCES
72+
cp scylla-cpp-driver.pc.in build/SOURCES
73+
cp scylla-cpp-driver_static.pc.in build/SOURCES
7474

7575
echo "Archiving $archive"
7676
pushd "build/SOURCES"
7777
tar zcf $archive $base
7878
popd
7979

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

8383
exit 0

packaging/cassandra.pc.in

Lines changed: 0 additions & 11 deletions
This file was deleted.

packaging/cassandra_static.pc.in

Lines changed: 0 additions & 13 deletions
This file was deleted.

packaging/debian/cassandra-cpp-driver-dev.install

Lines changed: 0 additions & 6 deletions
This file was deleted.

packaging/debian/cassandra-cpp-driver-dev.links

Lines changed: 0 additions & 3 deletions
This file was deleted.

packaging/debian/cassandra.pc

Lines changed: 0 additions & 11 deletions
This file was deleted.

packaging/debian/cassandra_static.pc

Lines changed: 0 additions & 13 deletions
This file was deleted.

packaging/debian/changelog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cassandra-cpp-driver (1.0.0-1) stable; urgency=low
1+
scylla-cpp-driver (1.0.0-1) stable; urgency=low
22

33
* Initial release
44

packaging/debian/control

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1-
Source: cassandra-cpp-driver
1+
Source: scylla-cpp-driver
22
Priority: extra
3-
Maintainer: Michael Penick <michael.penick@datastax.com>
3+
Maintainer: Juliusz Stasiewicz <juliusz.stasiewicz@scylladb.com>
44
Build-Depends: debhelper (>= 9.0.0), dh-exec, cmake, make,
55
libuv1-dev (>= 1.0.0),
66
libssl-dev
77
Standards-Version: 3.9.2
88
Section: libs
9-
Homepage: http://datastax.github.io/cpp-driver/
10-
Vcs-Git: git://github.com/datastax/cpp-driver.git
11-
Vcs-Browser: https://github.com/datastax/cpp-driver
9+
Homepage: https://github.com/scylladb/cpp-driver
10+
Vcs-Git: git://github.com/scylladb/cpp-driver.git
11+
Vcs-Browser: https://github.com/scylladb/cpp-driver
1212

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

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

32-
Package: cassandra-cpp-driver-dbg
32+
Package: scylla-cpp-driver-dbg
3333
Section: debug
3434
Architecture: any
35-
Depends: cassandra-cpp-driver (= ${binary:Version}), ${misc:Depends}
36-
Description: C/C++ client driver for Apache Cassandra and DataStax Products - debugging symbols
37-
A modern, feature-rich, and highly tunable C/C++ client library for Apache
35+
Depends: scylla-cpp-driver (= ${binary:Version}), ${misc:Depends}
36+
Description: C/C++ client driver for Scylla, Apache Cassandra and DataStax Products - debugging symbols
37+
A modern, feature-rich, shard-aware and highly tunable C/C++ client library for Scylla, Apache
3838
Cassandra and DataStax Products using Cassandra's native protocol and Cassandra Query
3939
Language along with extensions for DataStax Products.

packaging/debian/copyright

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
Format: http://dep.debian.net/deps/dep5
2-
Upstream-Name: cassandra-cpp-driver
3-
Source: https://github.com/datastax/cpp-driver
2+
Upstream-Name: scylla-cpp-driver
3+
Source: https://github.com/scylladb/cpp-driver
44

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

@@ -25,3 +26,7 @@ License: MIT
2526
Files: src/third_party/curl/*
2627
Copyright: Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
2728
License: MIT
29+
30+
Files: src/optional/optional_akrzemi.hpp
31+
Copyright: Copyright (C) 2011 - 2012 Andrzej Krzemienski
32+
License: Boost Software License 1.0

packaging/debian/rules

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ endif
1414
export SOVER ?= $(shell dpkg-parsechangelog \
1515
| sed -rne 's/^Version: ([0-9.]+)([-+~][[:alpha:]][[:alnum:]]*)?([-+~][[:digit:]])?$$/\1\2/p' \
1616
| sed 's/[+~]/-/')
17-
export SONAME=libcassandra.so.$(SOVER)
17+
export SONAME=libscylla-cpp-driver.so.$(SOVER)
1818

1919
%:
2020
dh $@
@@ -29,9 +29,9 @@ override_dh_auto_build:
2929
dh_auto_build -- -j$(NUMJOBS)
3030

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

3636
override_dh_makeshlibs:
3737
dh_makeshlibs -V
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#! /usr/bin/dh-exec
2+
3+
usr/include/*.h
4+
usr/lib/*.a usr/lib/${DEB_HOST_MULTIARCH}
5+
debian/scylla-cpp-driver.pc usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig
6+
debian/scylla-cpp-driver_static.pc usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/dh-exec
2+
3+
usr/lib/${DEB_HOST_MULTIARCH}/${SONAME} usr/lib/${DEB_HOST_MULTIARCH}/libscylla-cpp-driver.so
4+
usr/lib/${DEB_HOST_MULTIARCH}/libscylla-cpp-driver.so usr/lib/${DEB_HOST_MULTIARCH}/libcassandra.so

packaging/debian/scylla-cpp-driver.pc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
prefix=/usr
2+
exec_prefix=${prefix}
3+
libdir=${prefix}/lib/@DEB_HOST_MULTIARCH@
4+
includedir=${prefix}/include
5+
6+
Name: scylla-cpp-driver
7+
Description: A C/C++ client driver for Scylla, Apache Cassandra and DataStax Products
8+
Version: @DEB_VERSION_UPSTREAM@
9+
Libs: -L${libdir} -lscylla-cpp-driver
10+
Cflags:
11+
URL: https://github.com/scylladb/cpp-driver/
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
prefix=/usr
2+
exec_prefix=${prefix}
3+
libdir=${prefix}/lib/@DEB_HOST_MULTIARCH@
4+
includedir=${prefix}/include
5+
6+
Name: scylla-cpp-driver_static
7+
Description: A C/C++ client driver for Scylla, Apache Cassandra and DataStax Products
8+
Version: @DEB_VERSION_UPSTREAM@
9+
Requires: libuv
10+
Requires: openssl
11+
Libs: -L${libdir} -lscylla-cpp-driver_static -lstdc++
12+
Cflags:
13+
URL: https://github.com/scylladb/cpp-driver/

packaging/scylla-cpp-driver.pc.in

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
prefix=@prefix@
2+
exec_prefix=@exec_prefix@
3+
libdir=@libdir@
4+
includedir=@includedir@
5+
6+
Name: scylla-cpp-driver
7+
Description: A C/C++ client driver for Scylla, Apache Cassandra and DataStax Products
8+
Version: @version@
9+
Libs: -L${libdir} -lscylla-cpp-driver
10+
Cflags: -I${includedir}
11+
URL: https://github.com/scylladb/cpp-driver/

packaging/cassandra-cpp-driver.spec renamed to packaging/scylla-cpp-driver.spec

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
%define distnum %(/usr/lib/rpm/redhat/dist.sh --distnum)
33
%endif
44

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

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

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

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

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

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

5759
%install
5860
rm -rf %{buildroot}
@@ -64,13 +66,13 @@ sed -e "s#@prefix@#%{_prefix}#g" \
6466
-e "s#@libdir@#%{_libdir}#g" \
6567
-e "s#@includedir@#%{_includedir}#g" \
6668
-e "s#@version@#%{version}#g" \
67-
%SOURCE1 > %{buildroot}/%{_libdir}/pkgconfig/cassandra.pc
69+
%SOURCE1 > %{buildroot}/%{_libdir}/pkgconfig/scylla-cpp-driver.pc
6870
sed -e "s#@prefix@#%{_prefix}#g" \
6971
-e "s#@exec_prefix@#%{_exec_prefix}#g" \
7072
-e "s#@libdir@#%{_libdir}#g" \
7173
-e "s#@includedir@#%{_includedir}#g" \
7274
-e "s#@version@#%{version}#g" \
73-
%SOURCE2 > %{buildroot}/%{_libdir}/pkgconfig/cassandra_static.pc
75+
%SOURCE2 > %{buildroot}/%{_libdir}/pkgconfig/scylla-cpp-driver_static.pc
7476

7577
%clean
7678
rm -rf %{buildroot}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
prefix=@prefix@
2+
exec_prefix=@exec_prefix@
3+
libdir=@libdir@
4+
includedir=@includedir@
5+
6+
Name: scylla-cpp-driver
7+
Description: A C/C++ client driver for Scylla, Apache Cassandra and DataStax Products
8+
Version: @version@
9+
Requires: libuv
10+
Requires: openssl
11+
Libs: -L${libdir} -lscylla-cpp-driver_static -lstdc++
12+
Cflags: -I${includedir}
13+
URL: https://github.com/scylladb/cpp-driver/

0 commit comments

Comments
 (0)