%define upstream_release nightly.build.4051 %define jdic jdic-r1736 %define portaudio portaudio-hotplug-r1838 Name: jitsi Version: 1.1 Release: 1.%{upstream_release}%{?dist} Summary: Open Source Video Calls and Chat License: LGPLv2+ URL: https://jitsi.org Source0: https://download.jitsi.org/jitsi/nightly/src/%{name}-src-%{version}-%{upstream_release}.zip Source1: %{name}-run.sh Source2: %{name}.desktop Source3: %{jdic}.tar.gz Source4: %{portaudio}.tar.gz Patch0: %{name}-native-build.xml.patch Group: Applications/Internet BuildRequires: desktop-file-utils BuildRequires: jpackage-utils BuildRequires: java-devel >= 1:1.5.0 BuildRequires: ant BuildRequires: speex-devel BuildRequires: ffmpeg-devel BuildRequires: lame-devel BuildRequires: x264-devel BuildRequires: dbus-devel BuildRequires: libX11-devel BuildRequires: libXtst-devel BuildRequires: libXt-devel BuildRequires: libXv-devel BuildRequires: libXScrnSaver-devel BuildRequires: gtk2-devel BuildRequires: glib2-devel BuildRequires: unbound-devel BuildRequires: ldns-devel BuildRequires: expat-devel BuildRequires: libgcj-devel BuildRequires: libv4l-devel # Needed by portaudio-hotplug BuildRequires: alsa-lib-devel BuildRequires: jack-audio-connection-kit-devel # Needed by jdic BuildRequires: libgnome-devel BuildRequires: gnome-vfs2-devel BuildRequires: libbonobo-devel BuildRequires: ORBit-devel BuildRequires: GConf2-devel Requires: libmatthew-java %description Jitsi (previously SIP Communicator) is an audio/video and chat communicator that supports protocols such as SIP, XMPP/Jabber, AIM/ICQ, Windows Live, Yahoo! and many other useful features. %package javadoc Group: Development/Tools Summary: API Documentation for %{name} Requires: %{name} = %{version}-%{release} %description javadoc JavaDoc documentation for %{name} %prep # jitsi prep code %setup -q -n %{name} %patch0 -p1 sed -i 's|@scdir@|%{_libdir}/%{name}|' %{SOURCE1} sed -i 's|@javadir@|%{_javadir}|' %{SOURCE1} # jdic source package tar -xf %{SOURCE3} # portaudio-hotplug source package tar -xf %{SOURCE4} cd %{portaudio}/ patch -p0 < %{_builddir}/%{name}/src/native/portaudio/portaudio-hotplug-os.patch cd %{_builddir}/%{name} # Apply patch to native/portaudio jitsi code cd %{_builddir}/%{name}/src/native/portaudio patch -p1 pa_linux_alsa.c-by-Werner.patch patch -p1 pa_linux_alsa.c-fix-blocked-renderer.patch cd %{_builddir}/%{name} %build export CFLAGS="%{optflags}" export CXXFLAGS="%{optflags}" export JAVA_HOME=%{java_home} export CPATH="$CPATH:%{_libdir}/dbus-1.0/include:%{_libdir}/glib-2.0/include:%{_libdir}/gtk-2.0/include" # Build portaudio-hotplug cd %{portaudio} ./configure --disable-shared --enable-static --host=%{_host} --build=%{_build} --libdir=%{_libdir}/%{portaudio} --includedir=%{_includedir}/%{portaudio} --with-pic --with-jack=no make %{?_smp_mflags} cd %{_builddir}/%{name} # Build jdic cd %{jdic}/src/jdic %ant buildunixjni # Build libjdic_misc.so gcc -c -fPIC -I%{java_home}/include/linux -I%{java_home}/include -o alerter.o ../incubator/misc/src/linux/native/jni/alerter.c gcc -shared -o dist/linux/libjdic_misc.so alerter.o %ifarch i386 i586 i686 cp -p dist/linux/*.so %{_builddir}/%{name}/lib/native/linux %else cp -p dist/linux/*.so %{_builddir}/%{name}/lib/native/linux-64 %endif cd %{_builddir}/%{name} # Build libjunbound cd src/native/libjunbound out=`pwd`/build/linux prefix=$out/libs mkdir -p $out mkdir -p $prefix cd $out gcc $out/../../src/net_java_sip_communicator_util_dns_UnboundApi.cpp -O2 -Wall -Wreturn-type -fpic -DJNI_IMPLEMENTATION -shared -I%{java_home}/include/linux -I%{java_home}/include -L$prefix/lib -I$prefix/include -o libjunbound.so -lcrypto -lunbound -lldns strip libjunbound.so %ifarch i386 i586 i686 cp -p libjunbound.so %{_builddir}/%{name}/lib/native/linux %else cp -p libjunbound.so %{_builddir}/%{name}/lib/native/linux-64 %endif cd %{_builddir}/%{name} %ant -v -Dlabel=%{version}-%{release} \ portaudio -Dportaudio=%{_builddir}/%{name}/%{portaudio} -Dspeex=%{_includedir}/speex \ speex -Dspeex=%{_includedir}/speex \ ffmpeg -Dffmpeg=%{_includedir}/ffmpeg -Dlame=%{_includedir}/lame -Dx264=%{_includedir} \ g722 \ galagonotification \ globalshortcut \ hid \ hwaddressretriever \ jawtrenderer \ localhostretriever \ screencapture \ sysactivity \ video4linux2 \ rebuild \ javadoc %install mkdir -vp %{buildroot}%{_bindir} mkdir -vp %{buildroot}%{_libdir}/%{name}/lib/{bundle,native} mkdir -vp %{buildroot}%{_libdir}/%{name}/sc-bundles mkdir -vp %{buildroot}%{_datadir}/%{name} mkdir -vp %{buildroot}%{_datadir}/applications mkdir -vp %{buildroot}%{_javadocdir}/%{name}-%{version} # install portaudio-hotplug cd %{portaudio} make install DESTDIR=%{buildroot} cd %{_builddir}/%{name} # copy the sc-bundles cp -p sc-bundles/*.jar %{buildroot}%{_libdir}/%{name}/sc-bundles/ # remove all slicks rm -rf %{buildroot}%{_libdir}/%{name}/sc-bundles/*-slick.jar # copy the os-specific sc-bundles cp -p sc-bundles/os-specific/linux/*.jar %{buildroot}%{_libdir}/%{name}/sc-bundles/ # copy the lib jars cp -p lib/*.jar %{buildroot}%{_libdir}/%{name}/lib/ cp -p lib/bundle/* %{buildroot}%{_libdir}/%{name}/lib/bundle/ rm %{buildroot}%{_libdir}/%{name}/lib/bundle/junit.jar cp -p lib/os-specific/linux/*.jar %{buildroot}%{_libdir}/%{name}/lib/ # copy the resources cp -p resources/install/logging.properties %{buildroot}%{_libdir}/%{name}/lib/ cp -p lib/felix.client.run.properties %{buildroot}%{_libdir}/%{name}/lib/ # copy the native libs %ifarch i386 i586 i686 cp -p lib/native/linux/* %{buildroot}%{_libdir}/%{name}/lib/native/ %else cp -p lib/native/linux-64/* %{buildroot}%{_libdir}/%{name}/lib/native/ %endif # remove not builded native library rm -rf %{buildroot}%{_libdir}/%{name}/lib/native/libunix-java.so # set correct permission chmod 0755 %{buildroot}%{_libdir}/%{name}/lib/native/*.so ln -s %{_libdir}/libmatthew-java/libunix-java.so %{buildroot}%{_libdir}/%{name}/lib/native/libunix-java.so # copy the launcher script cp -p %{SOURCE1} %{buildroot}%{_bindir}/%{name} chmod a+x %{buildroot}%{_bindir}/%{name} # install the menu entry desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE2} # copy the menu icons cp -p resources/install/debian/sip-communicator-32.xpm %{buildroot}%{_datadir}/%{name}/%{name}-32.xpm cp -p resources/install/debian/sip-communicator-16.xpm %{buildroot}%{_datadir}/%{name}/%{name}-16.xpm cp -p resources/install/debian/sip-communicator.svg %{buildroot}%{_datadir}/%{name}/%{name}.svg # Copy javadoc cp -rp doc/api/ %{buildroot}%{_javadocdir}/%{name}-%{version}/ # docs cp -p resources/install/doc/readme.txt README cp -p resources/install/doc/License.txt LICENSE %files %doc README LICENSE %{_bindir}/%{name} %{_libdir}/%{name} %{_datadir}/%{name} %{_datadir}/applications/%{name}.desktop # portaudio-hotplug %{_libdir}/%{portaudio} %{_includedir}/%{portaudio} %files javadoc %{_javadocdir}/%{name}-%{version} %changelog * Tue Jun 05 2012 Mario Santagiuliana - 1.1-1.nightly.build.4051 - Update to new snapshot version 1.1 build 4051 - Update spec file for Review Request - Update Description and Summary - Create new launcher for Fedora - Add packages to build all native libraries(jdic and portaudio-hotplug) * Sun Oct 23 2011 Richard Shaw - 1.0_beta1-0.1.build.3689 - Update to new stable version. * Mon Apr 19 2010 Pavel Tankov - Now depends on java >= 1:1.5.0. * Wed Mar 31 2010 Pavel Tankov - Handled the manpages. * Tue Mar 30 2010 Pavel Tankov - Migrated the build process on a Fedora 12 x86_64 machine. It used to be a Debian which, after a distupgrade, couldn't run rpmbuild properly anymore. - Took out the svn update and ant rebuild actions and put them in the external script that calls rpmbuild with this spec. - Updated the description section. * Tue Dec 18 2007 Pavel Tankov - Put SC bundles and libraries under /usr/lib instead of /usr/share - Changed BuildPrereq to subversion instead of cvs - Changed the "Source:" tag to reflect the new location of the last nightly build - Patched the launcher script so that LD_PRELOAD points to /usr/lib/libaoss.so.0 instead of /usr/lib/libaoss.so * Fri Feb 23 2007 Pavel Tankov - Fixed to reflect the new guidelines for the layout on http://www.sip-communicator.org/index.php/Documentation/HowToBuildAnInstaller - Removed the folder /usr/share/sip-communicator/lib/os-cpecific because it was not needed. - Added stuff from sc-bundles/os-specific/linux/ because it was missing. - This fix resulted in the systray icon showing now. * Thu Feb 15 2007 Pavel Tankov - Fixed to reflect the new images in %%{buildroot}/usr/share/pixmaps/ - TODO: incorporate the systray icon. * Sat Jan 27 2007 Pavel Tankov - Removed /usr/share/menu because it was not needed. - Fixed to reflect the new directory structure with the "os-specific" and "installer-exclude" folders in mind. - TODO: handle manpages. - TODO: check whether user has java installed. * Mon Jan 08 2007 Pavel Tankov - Initial RPM release.