%global commit a8091d1a140fbdcb260ba3c8302aa2e4712d2d91 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: amazon-kinesis-video-streams-producer-c Version: 1.1.1 # No release since February, so we pull git Release: 1.git%{shortcommit}%{?dist} Summary: Amazon Kinesis Video Streams C Producer URL: https://github.com/awslabs/amazon-kinesis-video-streams-producer-c Source0: https://github.com/awslabs/amazon-kinesis-video-streams-producer-c/archive/%{commit}/%{name}-%{shortcommit}.tar.gz # Detect (and use) system kvspic, if found # This prevents us from downloading git code during build. Patch0: amazon-kinesis-video-streams-producer-c-system-kvspic.patch # Install files in correct paths Patch1: amazon-kinesis-video-streams-producer-c-cmake-correct-lib-dir.patch # Properly build versioned shared libraries when BUILD_STATIC is OFF # Also fix hardcoded version in pkgconfig files Patch2: amazon-kinesis-video-streams-producer-c-cmake-shared-libs.patch License: ASL 2.0 %if 0%{?amzn2} BuildRequires: cmake3 %else BuildRequires: cmake %endif BuildRequires: make, gcc-c++, m4, pkgconfig BuildRequires: openssl-devel, libcurl-devel # Not on AL2 %if 0%{?fedora} BuildRequires: libwebsockets-devel %endif BuildRequires: amazon-kinesis-video-streams-pic-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-c Requires: %{name}%{?_isa} = %{version}-%{release} Requires: amazon-kinesis-video-streams-pic-devel%{?_isa} %description devel Development files for amazon-kinesis-video-streams-producer-c. %prep %autosetup -n %{name}-%{commit} %build %if 0%{?amzn2} %cmake3 \ %else %cmake \ %endif -DBUILD_STATIC=OFF \ -DBUILD_TEST=OFF \ %if 0%{?fedora} -DBUILD_COMMON_LWS=ON \ %endif -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 # cannot run tests without AWS credentials %files %license LICENSE NOTICE %doc README.md %{_libdir}/libcproducer.so.* %{_libdir}/libkvsCommonCurl.so.* %if 0%{?fedora} %{_libdir}/libkvsCommonLws.so.* %endif %files devel # common dir is owned by amazon-kinesis-video-streams-pic-devel %{_includedir}/com/amazonaws/kinesis/video/common/Include.h %{_includedir}/com/amazonaws/kinesis/video/common/jsmn.h %{_includedir}/com/amazonaws/kinesis/video/cproducer/ %{_libdir}/libcproducer.so %{_libdir}/libkvsCommonCurl.so %if 0%{?fedora} %{_libdir}/libkvsCommonLws.so %endif %{_libdir}/pkgconfig/libcproducer.pc %{_libdir}/pkgconfig/libkvsCommonCurl.pc %if 0%{?fedora} %{_libdir}/pkgconfig/libkvsCommonLws.pc %endif %changelog * Fri May 21 2021 Tom Callaway - 1.1.1-1.gita8091d1 - initial package