[packages/belle-sip] - updated to 4.5.20, now uses cmake (new soname) - removed obsolete build patch - added pc patch (fi

qboosh qboosh at pld-linux.org
Fri Jun 18 19:10:52 CEST 2021


commit e90cc7b8c0d8bcc318047fc397478b70a22bcdcc
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Jun 18 19:13:21 2021 +0200

    - updated to 4.5.20, now uses cmake (new soname)
    - removed obsolete build patch
    - added pc patch (fix exec_prefix and libdir in .pc file)

 belle-sip-pc.patch | 13 +++++++++++++
 belle-sip.spec     | 46 +++++++++++++++++++---------------------------
 build.patch        | 20 --------------------
 3 files changed, 32 insertions(+), 47 deletions(-)
---
diff --git a/belle-sip.spec b/belle-sip.spec
index d87a086..5d6bbba 100644
--- a/belle-sip.spec
+++ b/belle-sip.spec
@@ -1,31 +1,32 @@
 # TODO: tunnel? (BR: pkgconfig(tunnel) or TunnelConfig.cmake)
 #
 # Conditional build:
+%bcond_without	dnssd		# MDNS/DNSSD support
 %bcond_without	static_libs	# static library
 %bcond_with	tests		# enable tests
 #
 Summary:	SIP (RFC3261) object-oriented implementation in C
 Summary(pl.UTF-8):	Implementacja SIP (RFC3261) w C
 Name:		belle-sip
-Version:	1.6.3
+Version:	4.5.20
 Release:	1
 License:	GPL v2+
 Group:		Libraries
-Source0:	https://linphone.org/releases/sources/belle-sip/%{name}-%{version}.tar.gz
-# Source0-md5:	90c40812d98671ad2f40621542500bc6
+#Source0Download: https://gitlab.linphone.org/BC/public/belle-sip/-/tags
+Source0:	https://gitlab.linphone.org/BC/public/belle-sip/-/archive/%{version}/%{name}-%{version}.tar.bz2
+# Source0-md5:	57b680975c7c78955bc06b5331f651bf
 Patch0:		antlr_jar.patch
-Patch1:		build.patch
+Patch1:		%{name}-pc.patch
 URL:		http://www.linphone.org/
 %{?with_tests:BuildRequires:	CUnit >= 2.0}
-BuildRequires:	autoconf >= 2.63
-BuildRequires:	automake >= 1:1.11
 BuildRequires:	bctoolbox-devel >= 0.5.0
+BuildRequires:	cmake >= 3.1
 BuildRequires:	java-antlr3 >= 3.2
 BuildRequires:	jre
 BuildRequires:	libantlr3c-devel >= 3.4
 BuildRequires:	libstdc++-devel
-BuildRequires:	libtool >= 2:2
 BuildRequires:	pkgconfig
+BuildRequires:	rpmbuild(macros) >= 1.605
 BuildRequires:	zlib-devel >= 1.2.3
 Requires:	bctoolbox >= 0.5.0
 Requires:	libantlr3c >= 3.4
@@ -67,24 +68,17 @@ Static %{name} library.
 Statyczna biblioteka %{name}.
 
 %prep
-%setup -q -n %{name}-%{version}-0
+%setup -q
 %patch0 -p1
 %patch1 -p1
 
 %build
-%{__libtoolize}
-%{__aclocal} -I m4
-%{__autoconf}
-%{__autoheader}
-%{__automake}
-WARNFLAGS="-Wno-error=pragmas -Wno-error=array-bounds"
-%if "%{cc_version}" >= "7"
-WARNFLAGS="$WARNFLAGS -Wno-implicit-fallthrough -Wno-error=cast-function-type"
-%endif
-%configure \
-	CFLAGS="%{rpmcflags} $WARNFLAGS" \
-	--disable-silent-rules \
-	%{!?with_static_libs:--disable-static}
+install -d builddir
+cd builddir
+%cmake .. \
+	%{?with_dnssd:-DENABLE_MDNS=ON} \
+	%{!?with_static_libs:-DENABLE_STATIC=OFF} \
+	%{!?with_tests:-DENABLE_TESTS=OFF}
 
 %{__make}
 
@@ -93,11 +87,9 @@ WARNFLAGS="$WARNFLAGS -Wno-implicit-fallthrough -Wno-error=cast-function-type"
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
+%{__make} -C builddir install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/libbellesip.la
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -106,15 +98,15 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS NEWS README.md
-%attr(755,root,root) %{_libdir}/libbellesip.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libbellesip.so.0
+%doc AUTHORS.md CHANGELOG.md README.md
+%attr(755,root,root) %{_libdir}/libbellesip.so.1
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libbellesip.so
 %{_includedir}/belle-sip
 %{_pkgconfigdir}/belle-sip.pc
+%{_libdir}/cmake/BelleSIP
 
 %if %{with static_libs}
 %files static
diff --git a/belle-sip-pc.patch b/belle-sip-pc.patch
new file mode 100644
index 0000000..b009abb
--- /dev/null
+++ b/belle-sip-pc.patch
@@ -0,0 +1,13 @@
+--- belle-sip-4.5.20/CMakeLists.txt.orig	2021-06-10 15:00:24.000000000 +0200
++++ belle-sip-4.5.20/CMakeLists.txt	2021-06-18 06:37:40.200216048 +0200
+@@ -131,8 +131,8 @@
+ 
+ 
+ set(prefix ${CMAKE_INSTALL_PREFIX})
+-set(exec_prefix ${prefix}/${CMAKE_INSTALL_BINDIR})
+-set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR})
++set(exec_prefix ${prefix})
++set(libdir ${prefix}/lib${LIB_SUFFIX})
+ set(includedir ${prefix}/include)
+ 
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/belle-sip.pc.in ${CMAKE_CURRENT_BINARY_DIR}/belle-sip.pc)
diff --git a/build.patch b/build.patch
deleted file mode 100644
index e42fc46..0000000
--- a/build.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- belle-sip-1.6.3-0/src/belle_sdp_impl.c~	2016-12-06 15:34:34.000000000 +0100
-+++ belle-sip-1.6.3-0/src/belle_sdp_impl.c	2018-09-26 15:32:00.385709065 +0200
-@@ -1053,7 +1053,7 @@ void belle_sdp_media_description_append_
- 		current_ptime=belle_sdp_mime_parameter_get_ptime(mime_parameter);
- 	}
- 	if (current_ptime>0){
--		char  ptime[10];
-+		char  ptime[11];
- 		snprintf(ptime,sizeof(ptime),"%i",current_ptime);
- 		belle_sdp_media_description_set_attribute_value(media_description,"ptime",ptime);
- 	}
-@@ -1062,7 +1062,7 @@ void belle_sdp_media_description_append_
- 		current_max_ptime=belle_sdp_mime_parameter_get_max_ptime(mime_parameter);
- 	}
- 	if (current_max_ptime>0){
--		char  max_ptime[10];
-+		char  max_ptime[11];
- 		snprintf(max_ptime,sizeof(max_ptime),"%i",current_max_ptime);
- 		belle_sdp_media_description_set_attribute_value(media_description,"maxptime",max_ptime);
- 	}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/belle-sip.git/commitdiff/e90cc7b8c0d8bcc318047fc397478b70a22bcdcc



More information about the pld-cvs-commit mailing list