LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File linphone.spec of Package linphone (Project network:telephony)

#
# spec file for package linphone
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           linphone
Version:        3.5.2
Release:        1
Summary:        Web Phone
License:        GPL-2.0+
Group:          Productivity/Networking/Other
Url:            http://www.linphone.org
Source0:        %{name}-%{version}.tar.gz
Source1:        %{name}-manual.tar.bz2
#FIX-FOR-UPSTREAM port linux/videodev.h to libv4l-videodev.h
Patch1:         linphone-v4l.patch
Patch2:         linphone-ffmpeg.patch
BuildRequires:  gcc-c++
%if 0%{?suse_version} >= 1130
BuildRequires:  pkgconfig(gnutls)
%else
BuildRequires:  gnutls-devel
%endif
BuildRequires:  intltool
BuildRequires:  libeXosip2-devel
BuildRequires:  libosip2-devel
BuildRequires:  libtool
BuildRequires:  pkgconfig(libnotify)
%if 0%{?suse_version} >= 1210
BuildRequires:  libv4l-devel >= 0.8.4
%else
BuildRequires:  libv4l-devel
%endif
BuildRequires:  alsa-devel
BuildRequires:  fdupes
BuildRequires:  libgsm-devel
BuildRequires:  libpulse-devel
BuildRequires:  libsoup-devel
%if 0%{?suse_version} > 1220
BuildRequires:  libortp-devel
BuildRequires:  mediastreamer2-devel
BuildRequires:  srtp-devel 
BuildRequires:  libzrtpcpp-devel
%endif
BuildRequires:  perl-XML-Parser
BuildRequires:  readline-devel
BuildRequires:  speex-devel
%if 0%{?suse_version}
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
%endif
BuildRequires:  pkgconfig(libglade-2.0)
# Video support - disabled by default due to patent issues
%bcond_with video
%if %{with video}
BuildRequires:  libXv-devel
BuildRequires:  libffmpeg-devel
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
#NoSource:       0

%description
Linphone is a Web phone with a GNOME interface. It lets you make
two-party calls over IP networks such as the Internet. It uses the IETF
protocols SIP (Session Initiation Protocol) and RTP (Realtime TransporT
Protocol) to make calls, so it should be able to communicate with other
SIP-based Web phones. With several codecs available, it can be used
with high speed connections as well as 28k modems.

%package devel
Summary:        Web Phone
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}
Requires:       alsa-devel
Requires:       glibc-devel
Requires:       libeXosip2-devel
Requires:       libosip2-devel
Requires:       speex-devel
Requires:       pkgconfig(glib-2.0)
%if %{with video}
Requires:       libXv-devel
Requires:       libffmpeg-devel
%endif

%description devel
Linphone is a Web phone with a GNOME interface. It lets you make
two-party calls over IP networks such as the Internet. It uses the IETF
protocols SIP (Session Initiation Protocol) and RTP (Realtime TransporT
Protocol) to make calls, so it should be able to communicate with other
SIP-based Web phones. With several codecs available, it can be used
with high speed connections as well as 28k modems.

%prep
%setup -q
%if 0%{?suse_version} >= 1210
%patch1 -p1
%patch2 -p1
%endif
translation-update-upstream
find -name "CVS" -type d -exec rm -Rfv "{}" "+"

%build
%if 0%{?suse_version} >= 1140
./autogen.sh
%endif
# needed for linphone-1.3.0:
export CFLAGS="%{optflags} -fno-strict-aliasing"
%configure \
	--enable-console_ui=yes \
	--enable-ipv6 \
	--enable-nonstandard-gsm \
	--enable-rsvp \
	--enable-ssl \
	--enable-alsa \
    --enable-portaudio \
%if 0%{?suse_version} >= 1230
    --enable-external-ortp \
    --enable-external-mediastreamer \
    --enable-zrtp \
%endif
	--disable-date \
	--disable-relativeprefix \
	--disable-rpath \
	--disable-silent-rules \
%if !%{with video}
    --disable-video \
%endif
	--disable-strict \
	--disable-static

make %{?_smp_mflags}

%install
%make_install
# install manual
tar -xjC %{buildroot}%{_datadir}/gnome/help/ -f %{SOURCE1}
#cleanup
rm -fv %{buildroot}%{_includedir}/speex*
rm -fv %{buildroot}%{_datadir}/doc/speex-1.1.4/manual.pdf
# FIXME: Upstream bug: Use GNOME2-style desktop files instead of GNOME1-style.
# install desktop file
%suse_update_desktop_file -D "linphone/index.xml.html" -G "SIP Phone" %{name} Network Telephony
%find_lang %{name}
%if 0%{?suse_version} < 1230
%find_lang mediastreamer
%endif
cat %{name}.lang
# delete unused man pages
rm -rf %{buildroot}%{_mandir}/cs/
# no need to package la files
rm -f %{buildroot}%{_libdir}/*.*a
cp -a ./pixmaps/linphone-3.png %{buildroot}%{_datadir}/linphone/linphone2.png
# too lazy to fix up tutorial packaging...
rm -rf %{buildroot}%{_datadir}/tutorials
# remove duplicate COPYING
rm -rf %{buildroot}%{_datadir}/%{name}/COPYING

%fdupes %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%if 0%{?suse_version} < 1230
%files -f %{name}.lang -f mediastreamer.lang
%else
%files -f %{name}.lang
%endif
%defattr(-,root,root)
%{_bindir}/*
%{_datadir}/sounds/linphone
%{_libdir}/*.so.*
%if 0%{?suse_version} < 1230
%dir %{_datadir}/images
%{_datadir}/images/nowebcamCIF.jpg
%endif
%{_datadir}/linphone
%{_datadir}/pixmaps/linphone
%doc %{_mandir}/man1/*.*
%{_datadir}/applications/linphone.desktop
%dir %{_datadir}/gnome
%dir %{_datadir}/gnome/help
%doc NEWS AUTHORS COPYING

%files devel
%defattr(-,root,root)
%{_includedir}/linphone
%if 0%{?suse_version} < 1230
%{_includedir}/ortp
%{_includedir}/mediastreamer2
%endif
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc

%changelog