May 12, 2012

Installing QXmpp in ArchLinux

In this post I will show you how to install the lastest version of QXmpp (0.4.0) and enable full support for Speex, Vpx and Theora codecs support.
Create the following files in the same directory:
src.pro.patch
--- src/src.pro 2012-03-23 11:34:49.000000000 -0300
+++ src/src.pro 2012-05-11 23:34:26.664150055 -0300
@@ -12,16 +12,16 @@
 VERSION = $$QXMPP_VERSION

 # To enable support for the Speex audio codec, uncomment the following:
-# DEFINES += QXMPP_USE_SPEEX
-# LIBS += -lspeex
+DEFINES += QXMPP_USE_SPEEX
+LIBS += -lspeex

 # To enable support for the Theora video codec, uncomment the following:
-# DEFINES += QXMPP_USE_THEORA
-# LIBS += -ltheoradec -ltheoraenc
+DEFINES += QXMPP_USE_THEORA
+LIBS += -ltheoradec -ltheoraenc

 # To enable support for the Vpx video codec, uncomment the following:
-# DEFINES += QXMPP_USE_VPX
-# LIBS += -lvpx
+DEFINES += QXMPP_USE_VPX
+LIBS += -lvpx

 # Target definition
 TARGET = $$QXMPP_LIBRARY_NAME
PKGBUILD
pkgname=qxmpp
pkgver=0.4.0
pkgrel=1
pkgdesc="QXmpp is an xmpp client library based on Qt & C++"
arch=('i686' 'x86_64')
url="http://code.google.com/p/qxmpp/"
license=('LGPL2')
depends=('qt' 'speex' 'libvpx' 'libtheora')
source=(http://$pkgname.googlecode.com/files/$pkgname-$pkgver.tar.gz)
md5sums=('17c1d05b1dec3fe8507aae26e05074cb')

build() {
    curdir="$PWD"
    cp -f ../src.pro.patch "$srcdir/$pkgname-$pkgver"
    cd "$srcdir/$pkgname-$pkgver"
    patch -N -p0 < src.pro.patch
    qmake PREFIX=/usr
    make
    make INSTALL_ROOT="$pkgdir" install
}
Then compile and install it with:
makepkg -i
The next post I will show you how to create a simple voip software based in QXmpp.

No comments:

Post a Comment