Skip to content

Commit

Permalink
modern-cpp-kafka: new recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
kenneth-jia committed Jun 29, 2022
1 parent 8dd8e43 commit e08d25e
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
5 changes: 5 additions & 0 deletions recipes/modern-cpp-kafka/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sources:
"v2022.06.15":
url: https://github.com/morganstanley/modern-cpp-kafka/archive/refs/tags/v2022.06.15.tar.gz
sha256: 478fcf560057b7cf7b4be851838ebf0520806d057b172de23261606fce088d27

30 changes: 30 additions & 0 deletions recipes/modern-cpp-kafka/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from conans import ConanFile, tools
import os

required_conan_version = ">=1.33.0"


class ModernCppKafkaConan(ConanFile):
name = "modern-cpp-kafka"
description = "A C++ API for Kafka clients (i.e. KafkaProducer, KafkaConsumer, AdminClient)"
license = "Apache License 2.0"
topics = ("conan", "modern-cpp-kafka", "kafka", "librdkafka", "kafkaproducer", "kafkaconsumer")
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/morganstanley/modern-cpp-kafka"
exports_sources = "include/*"
no_copy_source = True

@property
def _source_subfolder(self):
return "source_subfolder"

def source(self):
tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder)

def package(self):
self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder)
self.copy(pattern="*", dst="include", src=os.path.join(self._source_subfolder, "include"))

def package_id(self):
self.info.header_only()

3 changes: 3 additions & 0 deletions recipes/modern-cpp-kafka/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
versions:
"v2022.06.15":
folder: all

0 comments on commit e08d25e

Please sign in to comment.