]> git.pld-linux.org Git - packages/ortp.git/blobdiff - ortp.spec
- updated to 4.5.15, switched to cmake (note: new soname)
[packages/ortp.git] / ortp.spec
index 6edd8a965f583b9f5b98b8a3b50f02ad0605edcb..9931751c5036383808863cbfe29995b969cdfcee 100644 (file)
--- a/ortp.spec
+++ b/ortp.spec
@@ -1,35 +1,47 @@
+#
+# Conditional build:
+%bcond_without static_libs     # Static library
+#
 Summary:       RTP/RTCP protocol library
 Summary(pl.UTF-8):     Biblioteka obsługująca protokół RTP/RTCP
 Name:          ortp
-Version:       0.16.1
+Version:       4.5.15
 Release:       1
-License:       LGPL v2.1+
+License:       GPL v3+
 Group:         Libraries
-Source0:       http://download.savannah.nongnu.org/releases/linphone/ortp/sources/%{name}-%{version}.tar.gz
-# Source0-md5: bc96cdcb9c139d366a720a94200f92dd
-Patch0:                %{name}-i486.patch
-Patch1:                %{name}-Werror.patch
-URL:           http://www.linphone.org/index.php/eng/code_review/ortp
-BuildRequires: autoconf >= 2.50
-BuildRequires: automake
-BuildRequires: libtool
+#Source0Download: https://gitlab.linphone.org/BC/public/ortp/tags
+Source0:       https://gitlab.linphone.org/BC/public/ortp/-/archive/%{version}/%{name}-%{version}.tar.bz2
+# Source0-md5: e03716372f79b5fdcd1c5e9c3918fcde
+Patch0:                %{name}-am.patch
+Patch1:                %{name}-pc.patch
+URL:           http://www.linphone.org/technical-corner/ortp
+BuildRequires: bctoolbox-devel >= 0.2.0
+BuildRequires: cmake >= 3.1
+BuildRequires: doxygen
+BuildRequires: libstdc++-devel
+BuildRequires: openssl-devel
+BuildRequires: pkgconfig
+BuildRequires: rpm-build >= 4.6
+BuildRequires: rpmbuild(macros) >= 1.605
+Requires:      bctoolbox >= 0.2.0
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                specflags       -fno-strict-aliasing
 
 %description
-ortp is a library for handling RTP/RTCP packets. (See RFC 1889 and
-1890 for more information about the protocol)
+ortp is a library for handling RTP protocol (RFC 3550).
 
 %description -l pl.UTF-8
-ortp to biblioteka obsługująca pakiety RTP/RTCP. Więcej informacji o
-protokole znajduje się w RFC 1889 i 1890.
+ortp to biblioteka obsługująca protokół RTP (RFC 3550).
 
 %package devel
 Summary:       Header files to develop applications using ortp
 Summary(pl.UTF-8):     Pliki nagłówkowe do tworzenia aplikacji używających ortp
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
+Requires:      bctoolbox-devel >= 0.2.0
+Requires:      libstdc++-devel
+Requires:      openssl-devel
 
 %description devel
 Header files for the ortp library.
@@ -49,50 +61,72 @@ Static ortp library.
 %description static -l pl.UTF-8
 Statyczna biblioteka ortp.
 
+%package apidocs
+Summary:       API documentation for ortp library
+Summary(pl.UTF-8):     Dokumentacja API biblioteki ortp
+Group:         Documentation
+BuildArch:     noarch
+
+%description apidocs
+API documentation for ortp library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki ortp.
+
 %prep
 %setup -q
 %patch0 -p1
 %patch1 -p1
 
 %build
-%{__libtoolize}
-%{__aclocal}
-%{__autoconf}
-%{__automake}
-%configure \
-%if "%{_lib}" == "lib64"
-       --enable-mode64bit=yes \
-%else
-       --enable-mode64bit=no \
-%endif
-       --enable-ipv6
+# use cmake instead of autotools:
+# - to get cmake target files for other linphone projects
+# - configure.ac seems outdated (version 1.0.1, soname 13)
+install -d build
+cd build
+%cmake .. \
+       %{!?with_static_libs:-DENABLE_STATIC=NO} \
+       -DENABLE_STRICT=NO
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
+%{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT
 
+# packaged as %doc
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/ortp-.
+# packaged as %doc in -apidocs
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/ortp-4.5.0
+
+# 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/ortp/ortpTargets.cmake
+
 %clean
-rm -fr $RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_ROOT
 
 %post  -p /sbin/ldconfig
 %postun        -p /sbin/ldconfig
 
 %files
 %defattr(644,root,root,755)
-%doc README NEWS AUTHORS ChangeLog doc/html
-%attr(755,root,root) %{_libdir}/libortp.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libortp.so.8
+%doc AUTHORS.md CHANGELOG.md README.md
+%attr(755,root,root) %{_libdir}/libortp.so.15
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libortp.so
-%{_libdir}/libortp.la
 %{_includedir}/ortp
 %{_pkgconfigdir}/ortp.pc
+%{_libdir}/cmake/ortp
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libortp.a
+%endif
+
+%files apidocs
+%defattr(644,root,root,755)
+%doc build/doc/html/*.{css,html,js,png}
This page took 0.169634 seconds and 4 git commands to generate.