From: Jakub Bogusz Date: Sun, 10 Mar 2024 08:33:23 +0000 (+0100) Subject: - updated to 5.3.29 X-Git-Tag: auto/th/belr-5.3.29-1 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fbelr.git;a=commitdiff_plain;h=HEAD;hp=f0670c688b67a3b56cb62e22bd599b127a022cf2 - updated to 5.3.29 --- diff --git a/belr-static.patch b/belr-static.patch deleted file mode 100644 index 178ba70..0000000 --- a/belr-static.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- belr-4.5.15/src/CMakeLists.txt.orig 2020-10-22 16:31:51.000000000 +0200 -+++ belr-4.5.15/src/CMakeLists.txt 2021-06-15 21:41:34.307278254 +0200 -@@ -44,13 +44,20 @@ - endif() - - if(ENABLE_STATIC) -- add_library(belr STATIC ${BELR_HEADER_FILES} ${BELR_SOURCE_FILES_C} ${BELR_SOURCE_FILES_CXX}) -- set_target_properties(belr PROPERTIES OUTPUT_NAME belr) -- target_link_libraries(belr PUBLIC ${LIBS}) -- target_include_directories(belr INTERFACE -+ add_library(belr-static STATIC ${BELR_HEADER_FILES} ${BELR_SOURCE_FILES_C} ${BELR_SOURCE_FILES_CXX}) -+ set_target_properties(belr-static PROPERTIES OUTPUT_NAME belr) -+ target_link_libraries(belr-static PUBLIC ${LIBS}) -+ target_include_directories(belr-static INTERFACE - $ - $ - ) -+install(TARGETS belr-static EXPORT ${EXPORT_TARGET_NAME}Targets -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ FRAMEWORK DESTINATION Frameworks -+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE -+) - endif() - if(ENABLE_SHARED) - add_library(belr SHARED ${BELR_HEADER_FILES} ${BELR_SOURCE_FILES_C} ${BELR_SOURCE_FILES_CXX}) diff --git a/belr.spec b/belr.spec index e67b5f7..f6d56a3 100644 --- a/belr.spec +++ b/belr.spec @@ -5,21 +5,20 @@ Summary: Belledonne Communications' language recognition library Summary(pl.UTF-8): Biblioteka rozpoznawania języków Belledonne Communications Name: belr -Version: 4.5.15 +Version: 5.3.29 Release: 1 License: GPL v3+ Group: Libraries #Source0Download: https://gitlab.linphone.org/BC/public/belr/-/tags Source0: https://gitlab.linphone.org/BC/public/belr/-/archive/%{version}/%{name}-%{version}.tar.bz2 -# Source0-md5: 2535ccc46f621226d3bc44d7e2dd7f02 -Patch0: %{name}-static.patch +# Source0-md5: 8fa28394bab7c78c5821ceb0caac95d8 URL: https://linphone.org/ -BuildRequires: bctoolbox-devel >= 0.0.5 -BuildRequires: cmake >= 3.1 -BuildRequires: libstdc++-devel >= 6:4.7 +BuildRequires: bctoolbox-devel >= 5.3.0 +BuildRequires: cmake >= 3.22 +BuildRequires: libstdc++-devel >= 6:7 BuildRequires: pkgconfig BuildRequires: udev-devel -Requires: bctoolbox >= 0.0.5 +Requires: bctoolbox >= 5.3.0 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -44,8 +43,8 @@ Summary: Header files for belr library Summary(pl.UTF-8): Pliki nagłówkowe biblioteki belr Group: Development/Libraries Requires: %{name} = %{version}-%{release} -Requires: bctoolbox-devel >= 0.0.5 -Requires: libstdc++-devel >= 6:4.7 +Requires: bctoolbox-devel >= 5.3.0 +Requires: libstdc++-devel >= 6:7 %description devel Header files for belr library. @@ -67,25 +66,37 @@ Statyczna biblioteka belr. %prep %setup -q -%patch0 -p1 %build -install -d build -cd build -%cmake .. \ - %{!?with_static_libs:-DENABLE_STATIC=OFF} \ - -DENABLE_TESTS=OFF +%if %{with static_libs} +%cmake -B builddir-static \ + -DBUILD_SHARED_LIBS=OFF \ + -DCMAKE_INSTALL_DATADIR=share \ + -DENABLE_UNIT_TESTS=OFF + +%{__make} -C builddir-static +%endif + +# cmake build relies on relative CMAKE_INSTALL_DATADIR +%cmake -B builddir \ + -DCMAKE_INSTALL_DATADIR=share \ + -DENABLE_UNIT_TESTS=OFF -%{__make} +%{__make} -C builddir %install rm -rf $RPM_BUILD_ROOT -%{__make} -C build install \ +%if %{with static_libs} +%{__make} -C builddir-static install \ + DESTDIR=$RPM_BUILD_ROOT +%endif + +%{__make} -C builddir install \ DESTDIR=$RPM_BUILD_ROOT -# 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%{_libdir}/cmake/belr/belrTargets.cmake +# dir for grammars (see CMakeLists.txt) +install -d $RPM_BUILD_ROOT%{_datadir}/belr/grammars # missing from cmake test ! -f $RPM_BUILD_ROOT%{_pkgconfigdir}/belr.pc @@ -110,13 +121,15 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_bindir}/belr-compiler %attr(755,root,root) %{_bindir}/belr-parse %attr(755,root,root) %{_libdir}/libbelr.so.1 +%dir %{_datadir}/belr +%dir %{_datadir}/belr/grammars %files devel %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/libbelr.so %{_includedir}/belr %{_pkgconfigdir}/belr.pc -%{_libdir}/cmake/belr +%{_libdir}/cmake/Belr %if %{with static_libs} %files static