summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b7a2daed66a9230f364f86e92617c85d02fabfa0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Maintainer: Michal Donat <donny579@gmail.com>

pkgname=supertuxkart-git
pkgver=20687+17942
pkgrel=1
pkgdesc="A kart racing game featuring Tux and his friends - development version"
url="http://supertuxkart.sourceforge.net/"
license=("cc-by-sa-3.0")
arch=('i686' 'x86_64')

makedepends=("git" "subversion" "cmake" "bluez-libs" "libvpx")

depends=("libvorbis" "freealut" "libgl" "glut" "fribidi" "glew" "libopenglrecorder" "libjpeg-turbo" "libpng" "freetype2")

conflicts=("supertuxkart")
replaces=("supertuxkart-cmakesvn" "supertuxkart-svn")

source=(
    "stk-code::git+https://github.com/supertuxkart/stk-code.git"

    # Use this source for the network alpha testing branch
    #"stk-code::git+https://github.com/supertuxkart/stk-code.git#branch=network"

    # assets reside in subversion repository
    "stk-assets::svn+https://svn.code.sf.net/p/supertuxkart/code/stk-assets"
)
md5sums=('SKIP' 'SKIP')

pkgver() {
    cd "${srcdir}/stk-code"
    local _git_rev="$(git rev-list --count HEAD)"

    cd "${srcdir}/stk-assets"
    local _assets_rev="$(svnversion)"

    printf "%s+%s" "${_git_rev}" "${_assets_rev}"
}

build() {
    cd "${srcdir}/stk-code"
    if [ -d "cmake_build" ]; then
        rm -rf cmake_build
    fi
    mkdir cmake_build
    cd cmake_build

    cmake -DCMAKE_INSTALL_PREFIX=/usr ..
    # -DBUILD_RECORDER=off     - disable in-game recorder (then you can remove the dependency `libopenglrecorder`)
    make
}

package() {
    cd "stk-code/cmake_build"
    make DESTDIR=${pkgdir} install

    cd "${pkgdir}/usr/share/pixmaps"
    if [ ! -f supertuxkart.png ]; then
        ln -s supertuxkart{_128,}.png
    fi
    if [ -d "${pkgdir}/usr/lib64" ]; then
      mv "${pkgdir}/usr/lib64" "${pkgdir}/usr/lib"
    fi
}