blob: cd96aeef67cbb2c054698906e2cd468dca1ac5df (
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
# Maintainer:
# Contributor: Michal Donat <donny579@gmail.com>
_pkgname="supertuxkart"
pkgname="$_pkgname-git"
pkgver=1.4.r384.ge2b2a1c
pkgrel=1
pkgdesc="A kart racing game featuring Tux and his friends"
url="https://github.com/supertuxkart/stk-code"
license=('GPL-3.0-or-later')
arch=('i686' 'x86_64')
depends=(
'bluez-libs'
'freetype2'
'hicolor-icon-theme'
'libgl'
'libjpeg-turbo'
'libopenglrecorder' # AUR
'libpng'
'libvorbis'
'openal'
'sdl2'
'shaderc'
)
makedepends=(
'bluez-libs'
'cmake'
'git'
'libvpx'
'ninja'
'python'
)
options=('!emptydirs')
_pkgsrc="stk-code"
source=("$_pkgsrc"::"git+https://github.com/supertuxkart/stk-code.git")
sha256sums=('SKIP')
pkgver() {
cd "$_pkgsrc"
_tag=$(git tag -l '[0-9]*' | grep -Ev '[a-z][a-z]' | sort -rV | head -1)
_version="${_tag:?}"
_revision=$(git rev-list --count --cherry-pick "$_tag"...HEAD)
_hash=$(git rev-parse --short=7 HEAD)
printf '%s.r%s.g%s' "${_version:?}" "${_revision:?}" "${_hash:?}"
}
build() {
local _cmake_options=(
-B build
-S "$_pkgsrc"
-G Ninja
-DCMAKE_BUILD_TYPE=None
-DCMAKE_INSTALL_PREFIX='/usr'
-DBUILD_RECORDER=ON
-DCHECK_ASSETS=OFF
-Wno-dev
)
cmake "${_cmake_options[@]}"
cmake --build build
}
package() {
depends+=('supertuxkart-assets')
DESTDIR="$pkgdir" cmake --install build
install -Dm644 "$_pkgsrc/COPYING" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
local _unwanted=(
'optimize_data.sh'
'po/update_translation.py'
'po/update_desktop_file_appdata.py'
)
local _f
for _f in ${_unwanted[@]}; do
rm -f "$pkgdir/usr/share/supertuxkart/data/$_f"
done
rm -rf "$pkgdir"/usr/lib
rm -rf "$pkgdir"/usr/include
}
|