Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[main] Add Cassandra CPP Driver RPM to Mariner 2.0 #1895

Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"Signatures": {
"cassandra-cpp-driver-2.16.0.tar.gz": "35b0f4bac3d17fef47e28611dbeb51e07639395e957f23f4a3cc60770db1ab9c"
}
}
61 changes: 61 additions & 0 deletions SPECS/cassandra-cpp-driver/cassandra-cpp-driver.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Summary: DataStax C/C++ Driver for Apache Cassandra and DataStax Products
Name: cassandra-cpp-driver
Version: 2.16.0
Release: 1%{?dist}
Epoch: 1
andrew-lee-1089 marked this conversation as resolved.
Show resolved Hide resolved
License: Apache 2.0
andrew-lee-1089 marked this conversation as resolved.
Show resolved Hide resolved
Vendor: Microsoft Corporation
Distribution: Mariner
Group: Development/Tools
URL: https://github.com/datastax/cpp-driver
Source0: https://github.com/datastax/cpp-driver/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: libuv-devel
BuildRequires: openssl-devel
Requires: libuv

%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.

%package devel
Summary: Development libraries for ${name}
Group: Development/Tools
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: libuv-devel

%description devel
Development libraries for %{name}

%prep
%setup -q -n cpp-driver-%{version}

%build
mkdir -p build
cd build
%cmake ..\
-DCMAKE_BUILD_TYPE=RELEASE
%make_build

%install
cd build
%make_install

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
andrew-lee-1089 marked this conversation as resolved.
Show resolved Hide resolved

%files
%license LICENSE.txt
%{_libdir}/*.so.2
%{_libdir}/*.so.2.*

%files devel
%{_includedir}/*.h
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc

%changelog
* Wed Sep 1 2021 Andy Caldwell <[email protected]> - 2.16.0-1
- Original version for CBL-Mariner
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we 100% sure it's our original spec and not one taken from a different distribution or from the project owners? The fact we've had the Epoch: 1 line for a while made me suspicious.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a question for @bossmc who wrote the spec file for the 1.0 branch.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did write this from scratch, I read the maintainer's version, but that was way over-complicated for Mariner's needs so I just wrote the fairly standard version we're using now. I couldn't say why I added the Epoch: 1 maybe I read some best practice somewhere that you should start with one for a first-party package? If you prefer to start without one and add one as needed I'm happy too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, let's remove Epoch from the spec. We actually did a reset of these for 2.0.

- License verified