]> git.pld-linux.org Git - packages/belr.git/blobdiff - belr.spec
- updated to 5.3.29
[packages/belr.git] / belr.spec
index 9222d8eab9de3ee0952c5b94c59ea99cbebfbf53..f6d56a3ba1eddcc6cdd1e805927a09144e608c75 100644 (file)
--- 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:       0.1.3
+Version:       5.3.29
 Release:       1
-License:       GPL v2+
+License:       GPL v3+
 Group:         Libraries
-Source0:       https://linphone.org/releases/sources/belr/%{name}-%{version}.tar.gz
-# Source0-md5: 91dc921d48db2b8337bab56996fe8800
-Patch0:                %{name}-pc.patch
+#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: 8fa28394bab7c78c5821ceb0caac95d8
 URL:           https://linphone.org/
-BuildRequires: autoconf >= 2.63
-BuildRequires: automake
-BuildRequires: bctoolbox-devel >= 0.0.3
-BuildRequires: libstdc++-devel >= 6:4.7
-BuildRequires: libtool >= 2:2
+BuildRequires: bctoolbox-devel >= 5.3.0
+BuildRequires: cmake >= 3.22
+BuildRequires: libstdc++-devel >= 6:7
 BuildRequires: pkgconfig
-Requires:      bctoolbox >= 0.0.3
+BuildRequires: udev-devel
+Requires:      bctoolbox >= 5.3.0
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -44,7 +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:      libstdc++-devel >= 6:4.7
+Requires:      bctoolbox-devel >= 5.3.0
+Requires:      libstdc++-devel >= 6:7
 
 %description devel
 Header files for belr library.
@@ -65,28 +65,49 @@ Static belr library.
 Statyczna biblioteka belr.
 
 %prep
-%setup -q -n %{name}-%{version}-0
-%patch0 -p1
+%setup -q
 
 %build
-%{__libtoolize}
-%{__aclocal} -I m4
-%{__autoconf}
-%{__autoheader}
-%{__automake}
-%configure \
-       --disable-silent-rules \
-       %{?with_static_libs:--enable-static}
+%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
 
-%{__make}
+# cmake build relies on relative CMAKE_INSTALL_DATADIR
+%cmake -B builddir \
+       -DCMAKE_INSTALL_DATADIR=share \
+       -DENABLE_UNIT_TESTS=OFF
+
+%{__make} -C builddir
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
+%if %{with static_libs}
+%{__make} -C builddir-static install \
        DESTDIR=$RPM_BUILD_ROOT
+%endif
+
+%{__make} -C builddir install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+# dir for grammars (see CMakeLists.txt)
+install -d $RPM_BUILD_ROOT%{_datadir}/belr/grammars
 
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/libbelr.la
+# missing from cmake
+test ! -f $RPM_BUILD_ROOT%{_pkgconfigdir}/belr.pc
+install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
+%{__sed} -e 's,@CMAKE_INSTALL_PREFIX@,%{_prefix},' \
+       -e 's,@PROJECT_NAME@,belr,' \
+       -e 's,@PROJECT_VERSION@,%{version},' \
+       -e 's,@CMAKE_INSTALL_FULL_LIBDIR@,%{_libdir},' \
+       -e 's,@LIBS_PRIVATE@,-lbctoolbox,' \
+       -e 's,@CMAKE_INSTALL_FULL_INCLUDEDIR@,%{_includedir},' \
+       belr.pc.in >$RPM_BUILD_ROOT%{_pkgconfigdir}/belr.pc
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -96,16 +117,19 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc NEWS README.md
+%doc CHANGELOG.md README.md
+%attr(755,root,root) %{_bindir}/belr-compiler
 %attr(755,root,root) %{_bindir}/belr-parse
-%attr(755,root,root) %{_libdir}/libbelr.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libbelr.so.0
+%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
 
 %if %{with static_libs}
 %files static
This page took 0.156778 seconds and 4 git commands to generate.