File libftl.spec of Package libftl

#
# spec file for package libftl
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%define sover 0
Name:           libftl
Version:        0.10.1
Release:        0
Summary:        Software Development Kit for Mixer's FTL Protocol
License:        MIT
URL:            https://github.com/Scrumplex/ftl-sdk
Source0:        https://github.com/Scrumplex/ftl-sdk/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires:  cmake >= 3.0
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig(jansson) >= 2.9
BuildRequires:  pkgconfig(libcurl) >= 7.52.1

%description
FTL-SDK is a cross platform SDK written in C to enable sending audio/video to mixer using our FTL service

%package -n     %{name}%{sover}
Summary:        Software Development Kit for Mixer's FTL Protocol

%description -n %{name}%{sover}
FTL-SDK is a cross platform SDK written in C to enable sending audio/video to mixer using our FTL service

%package        devel
Summary:        Development files for %{name}
Requires:       %{name}%{sover} = %{version}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%prep
%autosetup -n ftl-sdk-%{version}

%build
%if 0%{?suse_version} <= 1500
export CFLAGS="%{optflags} -pthread"
export CXXFLAGS="%{optflags} -pthread"
%endif
%cmake -DCMAKE_BUILD_TYPE='Release' \
       -Wno-dev
%cmake_build

%install
%make_install -C build
find %{buildroot} -type f -name "*.la" -delete -print

%post -n %{name}%{sover} -p /sbin/ldconfig
%postun -n %{name}%{sover} -p /sbin/ldconfig

%files -n %{name}%{sover}
%license LICENSE
%doc README.md
%{_libdir}/%{name}.so.*

%files devel
%doc README.md
%{_includedir}/libftl/
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/libftl.pc

%changelog
openSUSE Build Service is sponsored by