Name:                farstream02
Version:             0.2.8
Release:             6
Summary:             Audio/Video Communications Framework
License:             LGPLv2+ and GPLv2+
URL:                 http://www.freedesktop.org/wiki/Software/Farstream
Source0:             http://freedesktop.org/software/farstream/releases/farstream/farstream-%{version}.tar.gz

Patch0001:           build-Adapt-to-backwards-incompatible-change-in-GNU-Make-4.3.patch

BuildRequires:       libnice-devel >= 0.1.3 gstreamer1-devel >= 1.0.0 python3-devel autoconf
BuildRequires:       gstreamer1-plugins-base-devel >= 1.0.0  gupnp-igd-devel gobject-introspection-devel
BuildRequires:       gtk-doc
Requires:            gstreamer1-plugins-good >= 1.0.0 gstreamer1-plugins-bad-free >= 1.0.0 libnice-gstreamer1

%description
The Farstream (formerly Farsight) project is an effort to create a framework to
deal with all known audio/video conferencing protocols.

%package        devel
Summary:             Development files of farstream
Requires:            farstream02 = %{version}-%{release} gstreamer1-devel >= 1.0.0
Requires:            gstreamer1-plugins-base-devel >= 1.0.0 pkgconfig

%description    devel
Development files of farstream.

%prep
%autosetup -n farstream-%{version} -p1
sed -i 's/-lgstrtp-@GST_API_VERSION@/-lgstrtp-@GST_API_VERSION@ -lm/g' ./tests/rtp/Makefile.am

%build
autoreconf --force --install
%configure
%make_build

%install
%make_install
%delete_la

%check

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%files
%doc COPYING NEWS AUTHORS
%{_libdir}/*.so.*
%dir %{_libdir}/farstream-0.2
%{_libdir}/farstream-0.2/*.so
%{_libdir}/gstreamer-1.0/*.so
%{_libdir}/girepository-1.0/Farstream-0.2.typelib
%dir %{_datadir}/farstream
%dir %{_datadir}/farstream/0.2
%dir %{_datadir}/farstream/0.2/fsrtpconference
%dir %{_datadir}/farstream/0.2/fsrawconference
%{_datadir}/farstream/0.2/fsrawconference/default-element-properties
%{_datadir}/farstream/0.2/fsrtpconference/default-*

%files devel
%{_libdir}/libfarstream-0.2.so
%{_libdir}/pkgconfig/farstream-0.2.pc
%{_includedir}/farstream-0.2/farstream/
%{_datadir}/gir-1.0/Farstream-0.2.gir
%{_datadir}/gtk-doc/html/farstream-libs-0.2/
%{_datadir}/gtk-doc/html/farstream-plugins-0.2/

%changelog
* Tue Jan 11 2022 Ge Wang <wangge20@huawei.com> - 0.2.8-6
- Fix build fail due to GNU make version mismatch

* Tue Oct 27 2020 jialei <jialei17@huawei.com> - 0.2.8-5
- change python2 to python3

* Fri Jul 31 2020 lingsheng <lingsheng@huawei.com> - 0.2.8-4
- Fix build fail with make 4.3

* Thu Apr 23 2020 leiju <leiju4@huawei.com> - 0.2.8-3
- Package init

