%global commit ade7deadc5e6fb07e152ef23a3d10f3566a403f9 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: amazon-kinesis-video-streams-producer-sdk-cpp Version: 3.1.1 # No release since February, so we pull git Release: 1.git%{shortcommit}%{?dist} Summary: C++ SDK for Amazon Kinesis Video Streams URL: https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp Source0: https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/archive/%{commit}/%{name}-%{shortcommit}.tar.gz # Detect (and use) system kvscproducer, if found # This prevents us from downloading git code during build. Patch0: amazon-kinesis-video-streams-producer-sdk-cpp-system-kvscproducer.patch # The test programs fail to link without libkvspicUtils # This probably wasn't explicit before because each static lib just ate everything before it # ... but with shared libs, you must be more explicit. Patch1: amazon-kinesis-video-streams-producer-sdk-cpp-missing-lib.patch # Install files # ... except for the core .h files # Unlike the JNI files, it was not clear which files should be installed (and to where) # Maybe com/amazonaws/kinesis/video/producer ? Patch2: amazon-kinesis-video-streams-producer-sdk-cpp-cmake-fix-install.patch # Add SOVERSION to all shared libs (except gstreamer plugin) Patch3: amazon-kinesis-video-streams-producer-sdk-cpp-cmake-versioned-shared-libs.patch # NOTE: The kvssink plugin has "Proprietary" in its gstreamer metadata License field. This is because # gstreamer checks the license field against these strings (and adds it to a denylist if it does not match) # LGPL GPL QPL GPL/QPL MPL BSD MIT/X11 0BSD Proprietary # https://github.com/GStreamer/gstreamer/blob/master/gst/gstplugin.c suggests that you should file a bug # to request additional licenses. This needs to be done for Apache 2.0. In the meantime, the plugin lies about # what license it has. License: ASL 2.0 %if 0%{?amzn2} BuildRequires: cmake3 %else BuildRequires: cmake %endif BuildRequires: make, gcc-c++, m4, pkgconfig BuildRequires: openssl-devel, libcurl-devel, log4cplus-devel, gstreamer1-devel, gstreamer1-plugins-base-devel BuildRequires: java-devel BuildRequires: amazon-kinesis-video-streams-producer-c-devel %description Amazon Kinesis Video Streams Producer SDK for C/C++ makes it easy to build an on-device application that securely connects to a video stream, and reliably publishes video and other media data to Kinesis Video Streams. It takes care of all the underlying tasks required to package the frames and fragments generated by the device's media pipeline. The SDK also handles stream creation, token rotation for secure and uninterrupted streaming, processing acknowledgments returned by Kinesis Video Streams, and other tasks. %package devel Summary: Development files for amazon-kinesis-video-streams-producer-sdk-cpp Requires: %{name}%{?_isa} = %{version}-%{release} Requires: amazon-kinesis-video-streams-producer-c-devel %description devel Development files for amazon-kinesis-video-streams-producer-sdk-cpp. %package gstreamer Summary: Gstreamer1 plugin for Amazon Kinesis Video Streams Requires: %{name}%{?_isa} = %{version}-%{release} %description gstreamer This package contains a gstreamer1 plugin (kvssink) for Amazon Kinesis Video Streams. %package jni Summary: C++ wrapper for JNI, for Amazon Kinesis Video Streams Requires: %{name}%{?_isa} = %{version}-%{release} %description jni This package contains a C++ wrapper library for JNI to expose the Amazon Kinesis Video Streams Producer SDK for C/C++ to Java/Android. %package jni-devel Summary: Development files for amazon-kinesis-video-streams-producer-sdk-cpp-jni Requires: %{name}-jni%{?_isa} = %{version}-%{release} Requires: %{name}-devel%{?_isa} = %{version}-%{release} %description jni-devel Development files for amazon-kinesis-video-streams-producer-sdk-cpp-jni. %prep %setup -q -n %{name}-%{commit} %patch0 -p1 -b .system-kvscproducer %patch1 -p1 -b .missing-lib %patch2 -p1 -b .fix-install %patch3 -p1 -b .shared-versioning %build %if 0%{?amzn2} %cmake3 \ %else %cmake \ %endif -DBUILD_SHARED_LIBS=ON -DBUILD_GSTREAMER_PLUGIN=ON -DBUILD_JNI=ON -DBUILD_TEST=OFF -DBUILD_DEPENDENCIES=OFF %if 0%{?fedora} >= 33 %cmake_build %else %make_build %endif %install %if 0%{?fedora} >= 33 %cmake_install %else %make_install %endif %check # no unit tests we can run without AWS creds %files %license LICENSE NOTICE %doc README.md %{_libdir}/libKinesisVideoProducer.so.* %files devel %doc docs/* %{_libdir}/libKinesisVideoProducer.so %files gstreamer %{_bindir}/kvs_gstreamer_* %{_libdir}/gstreamer-1.0/libgstkvssink.so %files jni %{_libdir}/libKinesisVideoProducerJNI.so.* %files jni-devel %{_includedir}/com/amazonaws/kinesis/video/producer/jni %{_libdir}/libKinesisVideoProducerJNI.so %changelog * Fri May 21 2021 Tom Callaway - 3.1.1-1.gitade7dea - initial package