updated on Tue Jan 17 16:10:12 UTC 2012
[aur-mirror.git] / tomahawk-git / PKGBUILD
blobf9fca06a93d0146652f2f89ab428032708bafbc5
1 # Maintainer: Kuba Serafinowski <zizzfizzix(at)gmail(dot)com>
3 ##############################################################
4 #### The section below can be adjusted to suit your needs ####
5 ##############################################################
7 # What type of build do you want?
8 # See http://techbase.kde.org/Development/CMake/Addons_for_KDE#Buildtypes to check what is supported.
9 # Default is DebugFull to help with debugging.
11 _buildtype="DebugFull"
13 # Which branch do you want to build from?
14 # Default is "master".
16 _gitbranch="master"
18 ##############################################################
20 pkgname=tomahawk-git
21 pkgver=20120117
22 pkgrel=1
23 pkgdesc="A Music Player App written in C++/Qt - development version"
24 arch=('i686' 'x86_64')
25 url="http://tomahawk-player.org/"
26 license=('GPL3')
27 depends=('phonon' 'taglib' 'boost' 'clucene' 'libechonest' 'jreen' 'qtweetlib' 'quazip' 'attica' 'qtwebkit')
28 makedepends=('git' 'cmake')
29 optdepends=('tomahawk-spotify-git: spotify resolver')
30 provides=('tomahawk')
31 conflicts=('tomahawk')
32 options=(!strip)
33 install=tomahawk.install
35 # Clean options array to strip pkg if release buildtype is chosen
36 if [[ ${_buildtype} == "Release" ]] || [[ ${_buildtype} == "release" ]]; then
37   options=()
40 _gitroot="git://github.com/tomahawk-player/tomahawk.git"
41 _gitname="tomahawk"
43 build() {
44   cd ${srcdir}
45   msg "Connecting to GIT server..."
47   if [ -d ${_gitname} ]; then
48     cd ${_gitname} && git checkout ${_gitbranch} && git pull origin ${_gitbranch}
49   else
50     git clone --depth 1 ${_gitroot} -b ${_gitbranch}
51   fi
53   msg "GIT checkout done or server timeout"
54   msg "Starting build..."
56   if [[ -e ${srcdir}/${_gitname}-build ]]; then rm -rf ${srcdir}/${_gitname}-build; fi
57   mkdir ${srcdir}/${_gitname}-build
58   cd ${srcdir}/${_gitname}-build
60   cmake -DCMAKE_INSTALL_PREFIX=/usr \
61         -DCMAKE_INSTALL_LIBDIR=lib \
62         -DCMAKE_INSTALL_LIBEXECDIR=lib/${_gitname} \
63         -DCMAKE_BUILD_TYPE=${_buildtype} \
64         ../${_gitname}
65   make
68 package() {
69   cd ${srcdir}/${_gitname}-build
70   make DESTDIR=${pkgdir} install