# tests disabled by default # to enable, pass "--with tests" to rpmbuild %bcond_with tests %global commit 9ef93e5a41465ec0c847b8e1ee30ac9ba29fdb7f %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: amazon-kinesis-video-streams-pic Version: 0.1 # No releases at all. :P Release: 0.1.git%{shortcommit}%{?dist} Summary: Platform Independent Code for Amazon Kinesis Video Streams URL: https://github.com/awslabs/amazon-kinesis-video-streams-pic Source0: https://github.com/awslabs/amazon-kinesis-video-streams-pic/archive/%{commit}/%{name}-%{shortcommit}.tar.gz # Install files in correct paths Patch0: amazon-kinesis-video-streams-pic-cmake-correct-lib-dir.patch # Enable support (via option) for shared libraries Patch1: amazon-kinesis-video-streams-pic-cmake-shared-libs.patch License: ASL 2.0 %if 0%{?amzn2} BuildRequires: cmake3 %else BuildRequires: cmake %endif BuildRequires: make, gcc-c++, m4, pkgconfig %if %{with tests} BuildRequires: gtest-devel %endif %description Platform Independent Code for Amazon Kinesis Video Streams. %package devel Summary: Development files for amazon-kinesis-video-streams-pic Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Development files for amazon-kinesis-video-streams-pic. %prep %setup -q -n %{name}-%{commit} %patch0 -p1 -b .cmake-correct-lib-dir %patch1 -p1 -b .cmake-shared-libs %build %if 0%{?amzn2} %cmake3 \ %else %cmake \ %endif -DBUILD_SHARED_LIBS=ON \ %if %{with tests} -DBUILD_TEST=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 %if %{with tests} ./kvspic_test %endif %files %license LICENSE NOTICE %doc README.md %{_libdir}/libkvspic*.so.* %files devel %{_includedir}/com/amazonaws/kinesis/video/ %{_libdir}/libkvspic*.so %{_libdir}/pkgconfig/libkvspic* %changelog * Fri May 21 2021 Tom Callaway - 0.1-0.1.git9ef93e5 - initial package