ekiga.spec
author dc144907
Tue, 05 Sep 2006 10:18:11 +0000
changeset 8067 3133412e660f
parent 8066 e5e699ddd38a
child 8071 8e0b9f2f5c8f
permissions -rw-r--r--
Bump back to 2.0.3 as source tarball is on ftp.gnome.org.

#
# spec file for package ekiga
#
# Copyright (c) 2005 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
Name:		ekiga
License:	GPL
Group:		X11/GNOME/Applications
Version:        2.0.3
%define libsdl_version 1.2.11
%define pwlib_version 1.10.1
%define opal_version 2.2.2
Release:	1
Vendor:		Sun Microsystems, Inc.
Distribution:	Java Desktop System
Summary:	A GNOME based H.323/SIP video conferencing application
Source0:        http://www.ekiga.org/admin/downloads/latest/sources/sources/ekiga-%{version}.tar.gz
Source1:        http://www.ekiga.org/admin/downloads/latest/sources/sources/opal-%{opal_version}.tar.gz
Source2:        http://www.ekiga.org/admin/downloads/latest/sources/sources/pwlib-%{pwlib_version}.tar.gz
Source3:        http://www.libsdl.org/release/SDL-%{libsdl_version}.tar.gz
Patch1:         ekiga-01-pwlib-cxxflags.diff
Patch2:         ekiga-02-pwlib-name.diff
Patch3:         ekiga-03-pwlib-plugindir.diff
Patch4:         ekiga-04-opal-name.diff
Patch6:         ekiga-06-menu-entry.diff
Patch7:         ekiga-07-autogen.diff

URL:		http://www.gnomemeeting.org
BuildRoot:	%{_tmppath}/%{name}-root
Docdir:       	%{_docdir}/%{name}
Autoreqprov:  	on

# The following version definitions probably are out of date, need update
%define GConf_version 2.4.0.1
%define gtk2_version 2.3.1
%define openldap2_devel_version 2.1.4
%define intltool_version 0.27
%define libgnomeui_version 2.4.0.1
%define des_version 4.04
%define heimdal_version 0.4
%define cyrus_sasl_version 1.5.27
%define openssl_version 0.9.6
%define flex_version 2.5.4
%define slang_version 1.4.5
%define pam_version 0.76
%define db_version 4.0.14
%define gdbm_version 1.8.0
%define howl_version 1.0.0

Requires: libsdl >= %{libsdl_version}
Requires: pwlib >= %{pwlib_version}
Requires: opal >= %{opal_version}
Requires: GConf >= %{GConf_version}
Requires: libgnomeui >= %{libgnomeui_version}
Requires: howl >= %{howl_version}
Requires: evolution-data-server
BuildRequires: gtk2-devel >= %{gtk2_version}
BuildRequires: GConf-devel >= %{GConf_version}
BuildRequires: openh323-devel >= %{openh323_version}
BuildRequires: pwlib-devel >= %{pwlib_version}
BuildRequires: intltool >= %{intltool_version}
BuildRequires: libgnomeui-devel >= %{libgnomeui_version}
BuildRequires: des >= %{des_version}
BuildRequires: heimdal-devel >= %{heimdal_version}
BuildRequires: cyrus-sasl-devel >= %{cyrus_sasl_version}
BuildRequires: openssl-devel >= %{openssl_version}
BuildRequires: openldap2-devel >= %{openldap2_devel_version}
BuildRequires: flex >= %{flex_version}
BuildRequires: slang-devel >= %{slang_version}
BuildRequires: pam-devel >= %{pam_version}
BuildRequires: db-devel >= %{db_version}
BuildRequires: gdbm-devel >= %{gdbm_version}
BuildRequires: howl-devel >= %{howl_version}
BuildRequires: evolution-data-server-devel
Prereq:        GConf

%description
Ekiga is a free Voice over IP phone allowing you to do free calls over   
the Internet. Ekiga is the first Open Source application to support 
both H.323 and SIP, as well as audio and video. Ekiga was formerly known 
as GnomeMeeting. 

%prep
%setup -q -b 1 -b 2 -b 3 -n %{name}*
# patch for pwlib
cd ../pwlib-%{pwlib_version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
# patch for opal
cd ../opal-%{opal_version}
%patch4 -p1
# patch for ekiga
cd ../ekiga-%{version}
%patch6 -p1
%patch7 -p1
chmod +x autogen.sh

%build
%ifos linux
if [ -x /usr/bin/getconf ]; then
  CPUS=`getconf _NPROCESSORS_ONLN`
fi
%else
  CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
%endif
if test "x$CPUS" = "x" -o $CPUS = 0; then
  CPUS=1
fi
export PKG_CONFIG=/usr/bin/pkg-config

# build libsdl
export CFLAGS="$RPM_OPT_FLAGS"
cd ../SDL-%{libsdl_version}
./configure --prefix=%{_prefix} \
            --libdir=%{_libdir}/%{name} \
            --bindir=%{_bindir} \
            --datadir=%{_datadir} \
            --includedir=%{_includedir} \
            --mandir=%{_mandir} 
make -j $CPUS

cd include
# so that SDL/*.h can be found
rm -f SDL; ln -s . SDL
cd ../..
export MYDIR=`pwd`

# build pwlib
cd pwlib*
# symlink the make dir to bin so that ptlib-config is found by ekiga
ln -s make bin
#FIXME
# set RPM_OPT_FLAGS to null since pwlib messly uses
# STDCCFLAGS for both CC and CXX, which picks up the
# value of RPM_OPT_FLAGS
RPM_OPT_FLAGS_SAVE=$RPM_OPT_FLAGS
RPM_OPT_FLAGS=""
PWLIBDIR=`pwd`
export RPM_OPT_FLAGS PWLIBDIR
autoconf
export CFLAGS="$CFLAGS -I${MYDIR}/SDL-%{libsdl_version}/include"
export CXXFLAGS="$CXXFLAGS -I${MYDIR}/SDL-%{libsdl_version}/include"
export LDFLAGS="$LDFLAGS -L${MYDIR}/SDL-%{libsdl_version}/src/.libs"
./configure --prefix=%{_prefix} \
            --libdir=%{_libdir}/%{name} \
            --bindir=%{_bindir} \
            --datadir=%{_datadir} \
            --includedir=%{_includedir} \
            --mandir=%{_mandir} \
            --enable-plugins \
            --enable-resolver \
            --enable-opal \
            --enable-sunaudio
make -j $CPUS
# set original RPM_OPT_FLAGS back
RPM_OPT_FLAGS=$RPM_OPT_FLAGS_SAVE
export RPM_OPT_FLAGS

# build opal
cd ../opal*
./configure --prefix=%{_prefix} \
            --libdir=%{_libdir}/%{name} \
            --bindir=%{_bindir} \
            --datadir=%{_datadir} \
            --includedir=%{_includedir} \
            --mandir=%{_mandir} \
	    --enable-localspeex
make -j $CPUS

# build ekiga
cd ../%{name}*
# so that SDL/include can be found
rm -f SDL; ln -s ../SDL-%{libsdl_version} SDL
ACLOCAL_FLAGS="$ACLOCAL_FLAG -I SDL"
SDL_CONFIG=${MYDIR}/SDL-%{libsdl_version}/sdl-config
export SDL_CONFIG ACLOCAL_FLAGS
./autogen.sh --prefix=%{_prefix} \
             --libdir=%{_libdir}/%{name} \
             --bindir=%{_bindir} \
             --datadir=%{_datadir} \
             --includedir=%{_includedir} \
             --mandir=%{_mandir} \
	     --sysconfdir=%{_sysconfdir} \
	     --with-pwlib-dir=${MYDIR}/pwlib-%{pwlib_version} \
	     --with-opal-dir=${MYDIR}/opal-%{opal_version} \
	     --with-sdl-prefix=${MYDIR}/SDL-%{libsdl_version} \
	     --disable-avahi \
	     --disable-scrollkeeper

make -j $CPUS LIBS=-lX11

%install
cd ../SDL-%{libsdl_version}
make install DESTDIR=$RPM_BUILD_ROOT

cd ../pwlib*
make install DESTDIR=$RPM_BUILD_ROOT

cd ../opal*
make install DESTDIR=$RPM_BUILD_ROOT

rm -rf $RPM_BUILD_ROOT%{_bindir}
rm -rf $RPM_BUILD_ROOT%{_datadir}
rm -rf $RPM_BUILD_ROOT%{_mandir}

cd ../%{name}*
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
make install DESTDIR=$RPM_BUILD_ROOT

rm -f  $RPM_BUILD_ROOT%{_bindir}/*config*
rm -f  $RPM_BUILD_ROOT%{_libdir}/%{name}/lib*a
rm -rf $RPM_BUILD_ROOT%{_includedir}
mv $RPM_BUILD_ROOT%{_libdir}/%{name}/bonobo $RPM_BUILD_ROOT%{_libdir}

%clean
rm -rf $RPM_BUILD_ROOT

%post 
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
SCHEMAS="ekiga.schemas"
for S in $SCHEMAS; do
        gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/$S >/dev/null
done

%files
%defattr(-,root,root)
%doc FAQ AUTHORS NEWS
%dir %{_datadir}/ekiga/xdap
%dir %{_datadir}/sounds/ekiga
#%{_datadir}/man/man1/ekiga.1.gz
%{_bindir}/ekiga*
%{_datadir}/locale/*/LC_MESSAGES/ekiga.mo
%{_datadir}/applications/ekiga.desktop
%{_datadir}/sounds/ekiga/*
%{_datadir}/pixmaps/ekiga*
%{_libdir}/bonobo/servers/ekiga.server
%{_datadir}/ekiga/xdap/*
%{_sysconfdir}/gconf/schemas/ekiga.schemas
%{_datadir}/gnome/*
%{_datadir}/omf/*
%{_mandir}/man1/*


%changelog
* Mon Sep 04 2006 - [email protected]
- Bump to 2.0.3.

* Mon Sep 04 2006 - [email protected]
- Bump libsdl to 1.2.11.

* Tue Aug 08 2006 - [email protected]
- Change 'cd dir*' to use '%{version}'.

* Mon Jul 10 2006 - [email protected]
- change to use Ekiga 2.0.2 release

* Fri Jun 16 2006 - [email protected]
- add GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 to make sure not
  install the directory based %gconf.xml files based on the 
  instruction in gconf.txt

* Wed Jun 07 2006 - [email protected]
- chdir into ekiga dir before applying ekiga patches.

* Fri Jun 02 2006 - [email protected]
- Add patch for change the menu entry according to the UI spec.

* Mon May 15 2006 - [email protected]
- Add patch ekiga-08-multi-decla.diff to fix multiple declaration
  error.

* Fri Apr 14 2006 - <[email protected]>
- Initial release for ekiga