summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c6d4d6c3a4a8660656b495b12f471297ab8cd42c (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
pkgname=supertuxkart-git
pkgver=17985+17350
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")

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"

    # 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"
    msg "Starting build..."

    [ -d "cmake_build" ] && rm -rf cmake_build
    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
}