File linphone.spec of Package linphone

#
# spec file for package linphone
#
# Copyright (c) 2011 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.4.3
Release:        1
License:        GPLv2+
Summary:        Web Phone
Url:            http://www.linphone.org
Group:          Productivity/Networking/Other
Source0:        %{name}-%{version}.tar.gz
Source1:        %{name}-manual.tar.bz2
Patch2:         linphone-v4l-2.6.38.patch
BuildRequires:  gcc-c++
BuildRequires:  gnome-panel-devel
BuildRequires:  gnutls-devel
BuildRequires:  intltool
BuildRequires:  libeXosip2-devel
BuildRequires:  libosip2-devel
%if 0%{?suse_version} >= 1210
BuildRequires:  libv4l-devel >= 0.8.4
%else
BuildRequires:  libv4l-devel
%endif
BuildRequires:  perl-XML-Parser
BuildRequires:  pkgconfig(libglade-2.0)
BuildRequires:  readline-devel
BuildRequires:  speex-devel
BuildRequires:  alsa-devel
BuildRequires:  libgsm-devel
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
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 applet
License:        GPLv2+
Summary:        Web Phone
Group:          Productivity/Networking/Other
Requires:       %{name} = %{version}

%description applet
Linphone is a Web phone with a GNOME interface. It let 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
License:        GPLv2+
Summary:        Web Phone
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}
Requires:       alsa-devel
Requires:       glibc-devel
Requires:       libeXosip2-devel
Requires:       libosip2-devel
Requires:       pkgconfig(glib-2.0)
Requires:       speex-devel

%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
%patch2
%endif
translation-update-upstream
find -name "CVS" -type d | xargs rm -rfv

%build
%if 0%{?suse_version} >= 1140
autoreconf -fi
%endif
# needed for linphone-1.3.0:
export CFLAGS="%{optflags} -fno-strict-aliasing"
%configure\
	--libexecdir="%{_prefix}/lib/gnome-panel" \
	--enable-console_ui=yes \
	--enable-ipv6 \
	--enable-nonstandard-gsm \
	--enable-rsvp \
	--enable-ssl \
	--enable-alsa \
	--disable-date \
	--disable-relativeprefix \
	--disable-rpath \
	--disable-silent-rules \
	--disable-static \
	--disable-video \
	--disable-strict

make %{?_smp_mflags}

%install
%make_install
# install manual
tar xj -C %{buildroot}%{_datadir}/gnome/help/ -f %{S:1}
#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}
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}/usr/share/tutorials

%clean
rm -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

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

%files applet
%defattr(-,root,root)
#%%{_libdir}/bonobo/servers/*.server
%{_prefix}/lib/gnome-panel

%files devel
%defattr(-,root,root)
%{_includedir}/linphone
%{_includedir}/ortp
%{_includedir}/mediastreamer2
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc

%changelog
openSUSE Build Service is sponsored by