From 867d29df9a319e72aed3471c61224420f021396e Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Tue, 23 Apr 2019 06:15:27 +0200 Subject: [PATCH 01/10] - updated dependencies, don't assume gcc>=8 --- bzrtp.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bzrtp.spec b/bzrtp.spec index d634a11..e081086 100644 --- a/bzrtp.spec +++ b/bzrtp.spec @@ -1,4 +1,3 @@ -# TODO: switch to mbledtls when 2.x is supported (mbed_ssl_init instead of ssl_init) # # Conditional build: %bcond_without static_libs # static library @@ -19,8 +18,9 @@ BuildRequires: automake BuildRequires: bctoolbox-devel BuildRequires: libtool >= 2:2 BuildRequires: libxml2-devel >= 2.0 -BuildRequires: polarssl-devel BuildRequires: pkgconfig +BuildRequires: sqlite3-devel >= 3.6.0 +Requires: sqlite3 >= 3.6.0 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -66,8 +66,10 @@ Statyczna biblioteka bzrtp. %{__aclocal} -I m4 %{__autoconf} %{__automake} +%if "%{cc_version}" >= "8.0" +CPPFLAGS="%{rpmcppflags} -Wno-error=cast-function-type" +%endif %configure \ - CPPFLAGS="%{rpmcppflags} -Wno-error=cast-function-type" \ --disable-silent-rules \ %{?with_static_libs:--enable-static} -- 2.44.0 From 1e49e9a9595e9cbfba3657218afc6012fbc40760 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sat, 26 Sep 2020 16:35:16 +0200 Subject: [PATCH 02/10] - updated to 4.4.0 (GPL v3+ now) - use _ver_ge macro for gcc version comparison to support gcc 10+ --- bzrtp.spec | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/bzrtp.spec b/bzrtp.spec index e081086..05f8f36 100644 --- a/bzrtp.spec +++ b/bzrtp.spec @@ -5,21 +5,24 @@ Summary: Open source implementation of ZRTP keys exchange protocol Summary(pl.UTF-8): Mająca otwarte źródła implementacja protokołu wymiany kluczy ZRTP Name: bzrtp -Version: 1.0.6 -Release: 3 -License: GPL v2+ +Version: 4.4.0 +Release: 1 +License: GPL v3+ Group: Libraries -Source0: http://linphone.org/releases/sources/bzrtp/%{name}-%{version}.tar.gz -# Source0-md5: e77a6b074bb810a02cc77a1df776fb79 +#Source0Download: https://gitlab.linphone.org/BC/public/bzrtp/tags +Source0: https://gitlab.linphone.org/BC/public/bzrtp/-/archive/%{version}/%{name}-%{version}.tar.bz2 +# Source0-md5: 981738ec9161c2a4c5220605ed4cbb71 URL: http://www.linphone.org/ BuildRequires: CUnit BuildRequires: autoconf >= 2.63 BuildRequires: automake -BuildRequires: bctoolbox-devel +BuildRequires: bctoolbox-devel >= 4.4.0 BuildRequires: libtool >= 2:2 BuildRequires: libxml2-devel >= 2.0 BuildRequires: pkgconfig +BuildRequires: rpmbuild(macros) >= 1.748 BuildRequires: sqlite3-devel >= 3.6.0 +Requires: bctoolbox >= 4.4.0 Requires: sqlite3 >= 3.6.0 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -66,7 +69,7 @@ Statyczna biblioteka bzrtp. %{__aclocal} -I m4 %{__autoconf} %{__automake} -%if "%{cc_version}" >= "8.0" +%if %{_ver_ge "%{cc_version}" "8.0"} CPPFLAGS="%{rpmcppflags} -Wno-error=cast-function-type" %endif %configure \ @@ -92,7 +95,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) -%doc AUTHORS NEWS README.md +%doc CHANGELOG.md README.md %attr(755,root,root) %{_libdir}/libbzrtp.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/libbzrtp.so.0 -- 2.44.0 From 4bb6055f1dfe2aa62bdc595b5de23ccb31e461fe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Mon, 4 Jan 2021 08:54:15 +0100 Subject: [PATCH 03/10] - release 2 (by relup.sh) --- bzrtp.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bzrtp.spec b/bzrtp.spec index 05f8f36..0e3efc0 100644 --- a/bzrtp.spec +++ b/bzrtp.spec @@ -6,7 +6,7 @@ Summary: Open source implementation of ZRTP keys exchange protocol Summary(pl.UTF-8): Mająca otwarte źródła implementacja protokołu wymiany kluczy ZRTP Name: bzrtp Version: 4.4.0 -Release: 1 +Release: 2 License: GPL v3+ Group: Libraries #Source0Download: https://gitlab.linphone.org/BC/public/bzrtp/tags -- 2.44.0 From 04364f58d9cfd662779e92e5e5ba4a38b651e988 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Tue, 15 Jun 2021 18:31:21 +0200 Subject: [PATCH 04/10] - updated to 4.5.15 --- bzrtp.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bzrtp.spec b/bzrtp.spec index 0e3efc0..3049105 100644 --- a/bzrtp.spec +++ b/bzrtp.spec @@ -5,13 +5,13 @@ Summary: Open source implementation of ZRTP keys exchange protocol Summary(pl.UTF-8): Mająca otwarte źródła implementacja protokołu wymiany kluczy ZRTP Name: bzrtp -Version: 4.4.0 -Release: 2 +Version: 4.5.15 +Release: 1 License: GPL v3+ Group: Libraries #Source0Download: https://gitlab.linphone.org/BC/public/bzrtp/tags Source0: https://gitlab.linphone.org/BC/public/bzrtp/-/archive/%{version}/%{name}-%{version}.tar.bz2 -# Source0-md5: 981738ec9161c2a4c5220605ed4cbb71 +# Source0-md5: 67af666eeef27ec7ff6717eb7d0f02c7 URL: http://www.linphone.org/ BuildRequires: CUnit BuildRequires: autoconf >= 2.63 -- 2.44.0 From 0232972c6c419f447008c62baf259a3569721bf3 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Tue, 15 Jun 2021 20:27:18 +0200 Subject: [PATCH 05/10] - switched build to cmake to get cmake target files (but still keep .pc file) - added static patch (allow both shared/static targets in cmake) --- bzrtp-static.patch | 21 +++++++++++++++++++++ bzrtp.spec | 41 ++++++++++++++++++++++------------------- 2 files changed, 43 insertions(+), 19 deletions(-) create mode 100644 bzrtp-static.patch diff --git a/bzrtp-static.patch b/bzrtp-static.patch new file mode 100644 index 0000000..50523e5 --- /dev/null +++ b/bzrtp-static.patch @@ -0,0 +1,21 @@ +--- bzrtp-4.5.15/src/CMakeLists.txt.orig 2021-01-07 21:55:30.000000000 +0100 ++++ bzrtp-4.5.15/src/CMakeLists.txt 2021-06-15 20:01:07.586594468 +0200 +@@ -55,13 +55,13 @@ + endif() + + if(ENABLE_STATIC) +- add_library(bzrtp STATIC ${SOURCE_FILES}) +- set_target_properties(bzrtp PROPERTIES OUTPUT_NAME bzrtp) +- target_include_directories(bzrtp INTERFACE ++ add_library(bzrtp-static STATIC ${SOURCE_FILES}) ++ set_target_properties(bzrtp-static PROPERTIES OUTPUT_NAME bzrtp) ++ target_include_directories(bzrtp-static INTERFACE + $ + PRIVATE ${INCLUDE_DIRS}) +- target_link_libraries(bzrtp PUBLIC bctoolbox ${LIBS}) +- install(TARGETS bzrtp EXPORT ${EXPORT_TARGETS_NAME}Targets ++ target_link_libraries(bzrtp-static PUBLIC bctoolbox ${LIBS}) ++ install(TARGETS bzrtp-static EXPORT ${EXPORT_TARGETS_NAME}Targets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + ) diff --git a/bzrtp.spec b/bzrtp.spec index 3049105..64d646e 100644 --- a/bzrtp.spec +++ b/bzrtp.spec @@ -12,12 +12,11 @@ Group: Libraries #Source0Download: https://gitlab.linphone.org/BC/public/bzrtp/tags Source0: https://gitlab.linphone.org/BC/public/bzrtp/-/archive/%{version}/%{name}-%{version}.tar.bz2 # Source0-md5: 67af666eeef27ec7ff6717eb7d0f02c7 +Patch0: %{name}-static.patch URL: http://www.linphone.org/ BuildRequires: CUnit -BuildRequires: autoconf >= 2.63 -BuildRequires: automake BuildRequires: bctoolbox-devel >= 4.4.0 -BuildRequires: libtool >= 2:2 +BuildRequires: cmake >= 3.1 BuildRequires: libxml2-devel >= 2.0 BuildRequires: pkgconfig BuildRequires: rpmbuild(macros) >= 1.748 @@ -62,30 +61,33 @@ Statyczna biblioteka bzrtp. %prep %setup -q +%patch0 -p1 %build -# rebuild ac/am/lt for as-needed to work -%{__libtoolize} -%{__aclocal} -I m4 -%{__autoconf} -%{__automake} -%if %{_ver_ge "%{cc_version}" "8.0"} -CPPFLAGS="%{rpmcppflags} -Wno-error=cast-function-type" -%endif -%configure \ - --disable-silent-rules \ - %{?with_static_libs:--enable-static} +install -d build +cd build +%cmake .. \ + %{!?with_static_libs:-DENABLE_STATIC=OFF} %{__make} %install rm -rf $RPM_BUILD_ROOT -%{__make} install \ +%{__make} -C build install \ DESTDIR=$RPM_BUILD_ROOT -# obsoleted by pkg-config -%{__rm} $RPM_BUILD_ROOT%{_libdir}/libbzrtp.la +# disable completeness check incompatible with split packaging +%{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d; /^unset(_IMPORT_CHECK_TARGETS)/d' $RPM_BUILD_ROOT%{_datadir}/bzrtp/cmake/bzrtpTargets.cmake + +# missing from cmake +test ! -f $RPM_BUILD_ROOT%{_pkgconfigdir}/libbzrtp.pc +install -d $RPM_BUILD_ROOT%{_pkgconfigdir} +%{__sed} -e 's,@prefix@,%{_prefix},' \ + -e 's,@exec_prefix@,%{_exec_prefix},' \ + -e 's,@includedir@,%{_includedir},' \ + -e 's,@PACKAGE_VERSION@,%{version},' \ + -e 's,@libdir@,%{_libdir},' libbzrtp.pc.in >$RPM_BUILD_ROOT%{_pkgconfigdir}/libbzrtp.pc %clean rm -rf $RPM_BUILD_ROOT @@ -96,14 +98,15 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %doc CHANGELOG.md README.md -%attr(755,root,root) %{_libdir}/libbzrtp.so.*.*.* -%attr(755,root,root) %ghost %{_libdir}/libbzrtp.so.0 +%attr(755,root,root) %{_libdir}/libbzrtp.so.0 %files devel %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/libbzrtp.so %{_includedir}/bzrtp %{_pkgconfigdir}/libbzrtp.pc +%dir %{_datadir}/bzrtp +%{_datadir}/bzrtp/cmake %if %{with static_libs} %files static -- 2.44.0 From 2ff4942c70a4894521335af72f412bb78cf5de36 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Thu, 17 Jun 2021 22:37:14 +0200 Subject: [PATCH 06/10] - updated to 4.5.20 - use build dir separate from "build" directory included in sources --- bzrtp.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bzrtp.spec b/bzrtp.spec index 64d646e..eca8987 100644 --- a/bzrtp.spec +++ b/bzrtp.spec @@ -5,13 +5,13 @@ Summary: Open source implementation of ZRTP keys exchange protocol Summary(pl.UTF-8): Mająca otwarte źródła implementacja protokołu wymiany kluczy ZRTP Name: bzrtp -Version: 4.5.15 +Version: 4.5.20 Release: 1 License: GPL v3+ Group: Libraries #Source0Download: https://gitlab.linphone.org/BC/public/bzrtp/tags Source0: https://gitlab.linphone.org/BC/public/bzrtp/-/archive/%{version}/%{name}-%{version}.tar.bz2 -# Source0-md5: 67af666eeef27ec7ff6717eb7d0f02c7 +# Source0-md5: a702edc1182579acb82d9456f6e35e88 Patch0: %{name}-static.patch URL: http://www.linphone.org/ BuildRequires: CUnit @@ -64,8 +64,8 @@ Statyczna biblioteka bzrtp. %patch0 -p1 %build -install -d build -cd build +install -d builddir +cd builddir %cmake .. \ %{!?with_static_libs:-DENABLE_STATIC=OFF} @@ -74,7 +74,7 @@ cd build %install rm -rf $RPM_BUILD_ROOT -%{__make} -C build install \ +%{__make} -C builddir install \ DESTDIR=$RPM_BUILD_ROOT # disable completeness check incompatible with split packaging -- 2.44.0 From 2f90c89e7d91cdd99f8a144b7da87cf78441c139 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sun, 9 Apr 2023 20:52:25 +0200 Subject: [PATCH 07/10] - updated to 5.2.49 --- bzrtp-static.patch | 18 +++++++++++------- bzrtp.spec | 4 ++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/bzrtp-static.patch b/bzrtp-static.patch index 50523e5..305c469 100644 --- a/bzrtp-static.patch +++ b/bzrtp-static.patch @@ -1,20 +1,24 @@ ---- bzrtp-4.5.15/src/CMakeLists.txt.orig 2021-01-07 21:55:30.000000000 +0100 -+++ bzrtp-4.5.15/src/CMakeLists.txt 2021-06-15 20:01:07.586594468 +0200 -@@ -55,13 +55,13 @@ +--- bzrtp-5.2.49/src/CMakeLists.txt.orig 2023-04-09 20:47:59.297007234 +0200 ++++ bzrtp-5.2.49/src/CMakeLists.txt 2023-04-09 20:50:27.739536385 +0200 +@@ -54,16 +54,16 @@ if(XML2_FOUND) endif() if(ENABLE_STATIC) -- add_library(bzrtp STATIC ${SOURCE_FILES}) +- add_library(bzrtp STATIC ${BZRTP_SOURCE_FILES}) - set_target_properties(bzrtp PROPERTIES OUTPUT_NAME bzrtp) - target_include_directories(bzrtp INTERFACE -+ add_library(bzrtp-static STATIC ${SOURCE_FILES}) ++ add_library(bzrtp-static STATIC ${BZRTP_SOURCE_FILES}) + set_target_properties(bzrtp-static PROPERTIES OUTPUT_NAME bzrtp) + target_include_directories(bzrtp-static INTERFACE $ PRIVATE ${INCLUDE_DIRS}) -- target_link_libraries(bzrtp PUBLIC bctoolbox ${LIBS}) +- target_link_libraries(bzrtp PRIVATE bctoolbox ${LIBS}) ++ target_link_libraries(bzrtp-static PRIVATE bctoolbox ${LIBS}) + if (postquantumcryptoengine_FOUND) +- target_link_libraries(bzrtp PRIVATE postquantumcryptoengine) ++ target_link_libraries(bzrtp-static PRIVATE postquantumcryptoengine) + endif() - install(TARGETS bzrtp EXPORT ${EXPORT_TARGETS_NAME}Targets -+ target_link_libraries(bzrtp-static PUBLIC bctoolbox ${LIBS}) + install(TARGETS bzrtp-static EXPORT ${EXPORT_TARGETS_NAME}Targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE diff --git a/bzrtp.spec b/bzrtp.spec index eca8987..476c1c5 100644 --- a/bzrtp.spec +++ b/bzrtp.spec @@ -5,13 +5,13 @@ Summary: Open source implementation of ZRTP keys exchange protocol Summary(pl.UTF-8): Mająca otwarte źródła implementacja protokołu wymiany kluczy ZRTP Name: bzrtp -Version: 4.5.20 +Version: 5.2.49 Release: 1 License: GPL v3+ Group: Libraries #Source0Download: https://gitlab.linphone.org/BC/public/bzrtp/tags Source0: https://gitlab.linphone.org/BC/public/bzrtp/-/archive/%{version}/%{name}-%{version}.tar.bz2 -# Source0-md5: a702edc1182579acb82d9456f6e35e88 +# Source0-md5: 30ed3cd6347609129eb71a3b7246eee0 Patch0: %{name}-static.patch URL: http://www.linphone.org/ BuildRequires: CUnit -- 2.44.0 From bc85e8c24bc17231b707f613d812ad54b83a18c6 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Wed, 19 Apr 2023 06:33:10 +0200 Subject: [PATCH 08/10] - updated to 5.2.51 - added patch to restore resetBzrtpContext function (used by linphone 5.1.x suite) --- bzrtp-resetBzrtpContext.patch | 31 +++++++++++++++++++++++++++++++ bzrtp.spec | 6 ++++-- 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 bzrtp-resetBzrtpContext.patch diff --git a/bzrtp-resetBzrtpContext.patch b/bzrtp-resetBzrtpContext.patch new file mode 100644 index 0000000..505a988 --- /dev/null +++ b/bzrtp-resetBzrtpContext.patch @@ -0,0 +1,31 @@ +--- bzrtp-5.2.51/include/bzrtp/bzrtp.h.orig 2023-02-22 10:01:18.000000000 +0100 ++++ bzrtp-5.2.51/include/bzrtp/bzrtp.h 2023-04-18 21:56:42.215384029 +0200 +@@ -272,6 +272,8 @@ BZRTP_EXPORT bzrtpContext_t *bzrtp_creat + */ + BZRTP_EXPORT int bzrtp_initBzrtpContext(bzrtpContext_t *context, uint32_t selfSSRC); + ++BZRTP_EXPORT void bzrtp_resetBzrtpContext(bzrtpContext_t *context); ++ + /** + * Free memory of context structure to a channel, if all channels are freed, free the global zrtp context + * @param[in] context Context hosting the channel to be destroyed.(note: the context zrtp context itself is destroyed with the last channel) +--- bzrtp-5.2.51/src/bzrtp.c.orig 2023-02-22 10:01:18.000000000 +0100 ++++ bzrtp-5.2.51/src/bzrtp.c 2023-04-18 21:59:34.831115556 +0200 +@@ -181,6 +181,17 @@ int bzrtp_setZIDCache_lock(bzrtpContext_ + #endif /* ZIDCACHE_ENABLED */ + } + ++void bzrtp_resetBzrtpContext(bzrtpContext_t *context) { ++ int i; ++ for (i=0; ichannelContext[i]) { ++ void * clientData = context->channelContext[i]->clientData; ++ bzrtp_initChannelContext(context, context->channelContext[i], context->channelContext[i]->selfSSRC, context->channelContext[i]->isMainChannel); ++ context->channelContext[i]->clientData = clientData; ++ } ++ } ++} ++ + /** + * @brief Perform some initialisation which can't be done without some callback functions: + * This function is called once per session when the first channel is created. diff --git a/bzrtp.spec b/bzrtp.spec index 476c1c5..b3edc99 100644 --- a/bzrtp.spec +++ b/bzrtp.spec @@ -5,14 +5,15 @@ Summary: Open source implementation of ZRTP keys exchange protocol Summary(pl.UTF-8): Mająca otwarte źródła implementacja protokołu wymiany kluczy ZRTP Name: bzrtp -Version: 5.2.49 +Version: 5.2.51 Release: 1 License: GPL v3+ Group: Libraries #Source0Download: https://gitlab.linphone.org/BC/public/bzrtp/tags Source0: https://gitlab.linphone.org/BC/public/bzrtp/-/archive/%{version}/%{name}-%{version}.tar.bz2 -# Source0-md5: 30ed3cd6347609129eb71a3b7246eee0 +# Source0-md5: 6b6957011c7f82a37af2407645a204e5 Patch0: %{name}-static.patch +Patch1: %{name}-resetBzrtpContext.patch URL: http://www.linphone.org/ BuildRequires: CUnit BuildRequires: bctoolbox-devel >= 4.4.0 @@ -62,6 +63,7 @@ Statyczna biblioteka bzrtp. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build install -d builddir -- 2.44.0 From c0ca59d31da92e1879f8304d2e9139314ca703bf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Sun, 22 Oct 2023 22:53:39 +0200 Subject: [PATCH 09/10] - up to 5.2.109 --- bzrtp.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bzrtp.spec b/bzrtp.spec index b3edc99..ad251df 100644 --- a/bzrtp.spec +++ b/bzrtp.spec @@ -5,13 +5,13 @@ Summary: Open source implementation of ZRTP keys exchange protocol Summary(pl.UTF-8): Mająca otwarte źródła implementacja protokołu wymiany kluczy ZRTP Name: bzrtp -Version: 5.2.51 +Version: 5.2.109 Release: 1 License: GPL v3+ Group: Libraries #Source0Download: https://gitlab.linphone.org/BC/public/bzrtp/tags Source0: https://gitlab.linphone.org/BC/public/bzrtp/-/archive/%{version}/%{name}-%{version}.tar.bz2 -# Source0-md5: 6b6957011c7f82a37af2407645a204e5 +# Source0-md5: 0f0cc76288315f7d100c2d5b6efa38f5 Patch0: %{name}-static.patch Patch1: %{name}-resetBzrtpContext.patch URL: http://www.linphone.org/ -- 2.44.0 From af1193ec4e20a56e12770336d39e8851b4a05bb2 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Tue, 5 Mar 2024 22:17:39 +0100 Subject: [PATCH 10/10] - updated to 5.3.26 --- bzrtp-static.patch | 25 ------------------------- bzrtp.spec | 44 ++++++++++++++++++++++++-------------------- 2 files changed, 24 insertions(+), 45 deletions(-) delete mode 100644 bzrtp-static.patch diff --git a/bzrtp-static.patch b/bzrtp-static.patch deleted file mode 100644 index 305c469..0000000 --- a/bzrtp-static.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- bzrtp-5.2.49/src/CMakeLists.txt.orig 2023-04-09 20:47:59.297007234 +0200 -+++ bzrtp-5.2.49/src/CMakeLists.txt 2023-04-09 20:50:27.739536385 +0200 -@@ -54,16 +54,16 @@ if(XML2_FOUND) - endif() - - if(ENABLE_STATIC) -- add_library(bzrtp STATIC ${BZRTP_SOURCE_FILES}) -- set_target_properties(bzrtp PROPERTIES OUTPUT_NAME bzrtp) -- target_include_directories(bzrtp INTERFACE -+ add_library(bzrtp-static STATIC ${BZRTP_SOURCE_FILES}) -+ set_target_properties(bzrtp-static PROPERTIES OUTPUT_NAME bzrtp) -+ target_include_directories(bzrtp-static INTERFACE - $ - PRIVATE ${INCLUDE_DIRS}) -- target_link_libraries(bzrtp PRIVATE bctoolbox ${LIBS}) -+ target_link_libraries(bzrtp-static PRIVATE bctoolbox ${LIBS}) - if (postquantumcryptoengine_FOUND) -- target_link_libraries(bzrtp PRIVATE postquantumcryptoengine) -+ target_link_libraries(bzrtp-static PRIVATE postquantumcryptoengine) - endif() -- install(TARGETS bzrtp EXPORT ${EXPORT_TARGETS_NAME}Targets -+ install(TARGETS bzrtp-static EXPORT ${EXPORT_TARGETS_NAME}Targets - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE - ) diff --git a/bzrtp.spec b/bzrtp.spec index ad251df..410e7b2 100644 --- a/bzrtp.spec +++ b/bzrtp.spec @@ -5,24 +5,22 @@ Summary: Open source implementation of ZRTP keys exchange protocol Summary(pl.UTF-8): Mająca otwarte źródła implementacja protokołu wymiany kluczy ZRTP Name: bzrtp -Version: 5.2.109 +Version: 5.3.26 Release: 1 License: GPL v3+ Group: Libraries #Source0Download: https://gitlab.linphone.org/BC/public/bzrtp/tags Source0: https://gitlab.linphone.org/BC/public/bzrtp/-/archive/%{version}/%{name}-%{version}.tar.bz2 -# Source0-md5: 0f0cc76288315f7d100c2d5b6efa38f5 -Patch0: %{name}-static.patch -Patch1: %{name}-resetBzrtpContext.patch +# Source0-md5: 22a3fd39362fce8ebf595a581bd633b6 +Patch0: %{name}-resetBzrtpContext.patch URL: http://www.linphone.org/ -BuildRequires: CUnit -BuildRequires: bctoolbox-devel >= 4.4.0 -BuildRequires: cmake >= 3.1 -BuildRequires: libxml2-devel >= 2.0 +BuildRequires: bctoolbox-devel >= 5.3.0 +BuildRequires: cmake >= 3.22 +BuildRequires: libstdc++-devel >= 6:4.7 BuildRequires: pkgconfig BuildRequires: rpmbuild(macros) >= 1.748 BuildRequires: sqlite3-devel >= 3.6.0 -Requires: bctoolbox >= 4.4.0 +Requires: bctoolbox >= 5.3.0 Requires: sqlite3 >= 3.6.0 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -41,6 +39,7 @@ Summary: Header file for bzrtp library Summary(pl.UTF-8): Plik nagłówkowy biblioteki bzrtp Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: bctoolbox-devel >= 5.3.0 %description devel Header file for bzrtp library. @@ -63,24 +62,29 @@ Statyczna biblioteka bzrtp. %prep %setup -q %patch0 -p1 -%patch1 -p1 %build -install -d builddir -cd builddir -%cmake .. \ - %{!?with_static_libs:-DENABLE_STATIC=OFF} +%if %{with static_libs} +%cmake -B builddir-static \ + -DBUILD_SHARED_LIBS=OFF + +%{__make} -C builddir-static +%endif -%{__make} +%cmake -B builddir + +%{__make} -C builddir %install rm -rf $RPM_BUILD_ROOT -%{__make} -C builddir install \ +%if %{with static_libs} +%{__make} -C builddir-static install \ DESTDIR=$RPM_BUILD_ROOT +%endif -# disable completeness check incompatible with split packaging -%{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d; /^unset(_IMPORT_CHECK_TARGETS)/d' $RPM_BUILD_ROOT%{_datadir}/bzrtp/cmake/bzrtpTargets.cmake +%{__make} -C builddir install \ + DESTDIR=$RPM_BUILD_ROOT # missing from cmake test ! -f $RPM_BUILD_ROOT%{_pkgconfigdir}/libbzrtp.pc @@ -107,8 +111,8 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_libdir}/libbzrtp.so %{_includedir}/bzrtp %{_pkgconfigdir}/libbzrtp.pc -%dir %{_datadir}/bzrtp -%{_datadir}/bzrtp/cmake +%dir %{_datadir}/BZRTP +%{_datadir}/BZRTP/cmake %if %{with static_libs} %files static -- 2.44.0