%global realname rtplib %global upstream lemenkov %global git_tag 58bbc1e %global patchnumber 0 Name: erlang-%{realname} Version: 0.5.18 Release: 1%{?dist} Summary: Erlang RTP/RTCP codec library Group: Development/Languages License: BSD URL: http://github.com/lemenkov/rtplib # wget --no-check-certificate --content-disposition http://github.com/lemenkov/rtplib/tarball/%VSN% Source0: %{upstream}-%{realname}-%{version}-%{patchnumber}-g%{git_tag}.tar.gz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: autoconf BuildRequires: automake BuildRequires: erlang-erlando BuildRequires: erlang-eunit BuildRequires: erlang-skerl BuildRequires: erlang-rebar BuildRequires: ilbc-devel BuildRequires: libsamplerate-devel BuildRequires: libtool # FIXME Opus available only in Fedora for now BuildRequires: opus-devel >= 0.9.9 BuildRequires: spandsp-devel %if 0%{?el6}%{?fedora} # speex on EL-5 is too old and unreliable BuildRequires: speex-devel # In fact that's not required for operation and it will be ignored by rpmbuild. # Unfortunately a speex-devel package in RHEL 5 has an issue - it explicitly requires # libogg-devel to work: # https://bugzilla.redhat.com/804674 # FIXME remove it as soon as RH folks will fix the bug above. BuildRequires: libogg-devel %endif #BuildRequires: webrtc-devel Requires: erlang Requires: erlang-skerl %description Erlang RTP/RTCP codec library. %prep %setup -q -n %{upstream}-%{realname}-%{git_tag} %if 0%{?el5} # Remove Opus- and SPEEX-related stuff if building for RHEL5 rm -rf test/codec_opus_test.erl test/codec_speex_test.erl %endif sh ./autogen.sh %build %configure %{?el5:--with-audiocodec-speex=no} make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT %check make check %clean rm -rf $RPM_BUILD_ROOT %files %dir %{_libdir}/erlang/lib/%{realname}-%{version} %dir %{_libdir}/erlang/lib/%{realname}-%{version}/ebin %dir %{_libdir}/erlang/lib/%{realname}-%{version}/include %dir %{_libdir}/erlang/lib/%{realname}-%{version}/priv %{_libdir}/erlang/lib/%{realname}-%{version}/ebin/*.app %{_libdir}/erlang/lib/%{realname}-%{version}/ebin/*.beam %{_libdir}/erlang/lib/%{realname}-%{version}/include/*.hrl %{_libdir}/erlang/lib/%{realname}-%{version}/priv/*.so %changelog * Wed Aug 15 2012 Peter Lemenkov - 0.5.18-1 - Ver. 0.5.18