updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / phonon-xine-git / PKGBUILD
blobd3d7f83d6c869d93b295f0c7cd72b8f360fc1ec3
1 # Maintainer:  Jekyll Wu <adaptee at gmail dot com>
2 # Contributor: Xavion <Xavion (dot) 0 (at) Gmail (dot) com>
3 # Contributor: Rick W. Chen <stuffcorpse@archlinux.us>
4 # Contributor: Pierre Schmitz <pierre@archlinux.de>
5 # Contributor: Marek Kubica <marek@xivilization.net>
7 realname=phonon
8 bename=xine
9 pkgname=${realname}-${bename}-git
10 pkgver=20110311
11 pkgrel=1
12 pkgdesc="GStreamer backend for phonon, the multimedia API of KDE."
13 arch=("i686" "x86_64")
14 url="http://projects.kde.org/projects/kdesupport/${realname}/${realname}-${bename}"
15 license=("LGPL")
16 depends=("${realname}" "xine-lib")
17 makedepends=("pkg-config" "cmake" "automoc4" "git")
18 provides=("${realname}-${bename}" "${realname}-backend")
19 conflicts=("${realname}-${bename}" )
21 _gitroot="git://anongit.kde.org/${realname}-${bename}.git"
22 _gitname="${realname}-${bename}"
24 build() {
26     # Config
27     [ ${CARCH} = 'x86_64' ] && CXXFLAGS="$CXXFLAGS -fPIC"
29     cd ${srcdir}
31     # Repository
32     msg "Connecting to GIT server...."
33     if [ -d ${_gitname} ] ; then
34         cd ${_gitname} && git pull origin
35         msg "The local files are updated."
36     else
37         git clone ${_gitroot} ${_gitname}
38         msg "GIT checkout done"
39     fi
42     if [ -d ${srcdir}/build ]; then
43         rm ${srcdir}/build/* -rf
44     else
45         mkdir ${srcdir}/build/
46     fi
48     # Build
49     cd ${srcdir}/build
50     msg "Starting make..."
52     { type -P kde4-config &>/dev/null && _prefix=$(kde4-config --prefix) ; } || _prefix=/usr
53     cmake \
54             -DCMAKE_BUILD_TYPE=Release \
55             -DCMAKE_INSTALL_PREFIX=$_prefix \
56             -DPLUGIN_INSTALL_DIR=$_prefix/lib/kde4 \
57             -DSERVICES_INSTALL_DIR=$_prefix/share/kde4/services \
58             ../${_gitname}
60     make || return 1
64 package () {
65     cd ${srcdir}/build
66     make DESTDIR=${pkgdir} install || return 1