File belle-sip.spec of Package belle-sip
#
# spec file for package belle-sip
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2014 Mariusz Fik <fisiu@opensuse.org>.
#
# 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 soname libbellesip
%define soname libbelle-sip
%define sover 1
Name: belle-sip
Version: 5.3.5
# Fedora release look standard from OpenSUSE build service:
# Release: <CI_CNT>.<B_CNT>
# Release: %%{?release_prefix}.<CI_CNT>.<B_CNT>
# where rpm macro %%{release_prefix} is defined in spec file
# Normally it looks like:
# Release: 63.fc38 for Fedora packages which is scripted as:
# Release: 0%%{?dist}
# OpenSUSE build service allows for this variant:
# Release: 63.1.fc38
# Release: <CI_CNT>.<B_CNT>%%{?dist}
#
# Add this to Project Config to tag Fedora packages with fcXX:
# ------------------------------
# # reset release name
# onepercentage%%if 0onepercentage%%{?fedora_version}
# Release: <CI_CNT>.<B_CNT> spec:<CI_CNT>.<B_CNT>twopercentage%%{?dist}
# onepercentage%%endif
# ------------------------------
Release: 0
Summary: C object-oriented SIP Stack
License: GPL-3.0-or-later
Group: Productivity/Telephony/SIP/Utilities
URL: https://linphone.org/technical-corner/belle-sip/
Source: https://gitlab.linphone.org/BC/public/belle-sip/-/archive/%{version}/%{name}-%{version}.tar.bz2
Source2: baselibs.conf
BuildRequires: chrpath
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: belr-devel >= 5.3.5
BuildRequires: bctoolbox-devel >= 5.3.5
BuildRequires: pkgconfig(bctoolbox) >= 5.3.0
BuildRequires: pkgconfig(zlib)
%description
Belle-sip is a SIP (RFC3261) implementation written in C, with an
object-oriented API.
%package -n %{soname}%{sover}
Summary: C object-oriented SIP Stack
Group: Productivity/Telephony/SIP/Utilities
Requires: %{name}-data >= %{version}
%description -n %{soname}%{sover}
Belle-sip is a SIP (RFC3261) implementation written in C, with an
object-oriented API.
%package data
Summary: Belle-sip data files
Group: Productivity/Telephony/SIP/Utilities
Requires: %{soname}%{sover} = %{version}
BuildArch: noarch
%description data
Belle-sip is a SIP (RFC3261) implementation written in C, with an
object-oriented API.
This package contains data files such as belr grammar.
%package devel
Summary: Headers and libraries for the belle-sip library
Group: Development/Libraries/C and C++
Requires: %{soname}%{sover} = %{version}
Requires: pkgconfig(bctoolbox)
Requires: pkgconfig(zlib)
%description devel
Belle-sip is a SIP (RFC3261) implementation written in C, with an
object-oriented API.
This package contains header files and development libraries needed
to develop applications using the belle-sip library.
%prep
%autosetup -p1
%build
%cmake \
-DENABLE_STRICT=OFF \
-DENABLE_UNIT_TESTS=OFF \
-DENABLE_STATIC=OFF
%cmake_build
%install
%cmake_install
#chrpath -d %%{buildroot}%%{_bindir}/belle-sip-tester
chrpath -d %{buildroot}%{_libdir}/%{soname}.so.%{sover}*
%post -n %{soname}%{sover} -p /sbin/ldconfig
%postun -n %{soname}%{sover} -p /sbin/ldconfig
%files -n %{soname}%{sover}
%license LICENSE.txt
%{_libdir}/%{soname}.so.%{sover}*
%files data
%dir %{_datadir}/belr/
%{_datadir}/belr/grammars/
%files devel
%license LICENSE.txt
%doc AUTHORS.md CHANGELOG.md README.md
#%%{_bindir}/belle-sip-tester
%{_includedir}/%{name}/
%{_libdir}/%{soname}.so
%{_libdir}/cmake/BelleSIP/
#%%{_datadir}/belle_sip_tester/
%{_libdir}/pkgconfig/%{name}.pc
%changelog