blob: d88c2905a837543f53cb4a58c099c3854c1b1af7 (
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
|
# Maintainer: Tulpenkiste <tulpenkiste at the amogus email domain which is .cloud>
_pkgname=brux-gdk
pkgname=brux-gdk-git
pkgver=0.2.11.r210.g70ce705
pkgrel=1
pkgdesc="A free runtime and development kit using SDL and Squirrel"
arch=(any)
url="https://github.com/KelvinShadewing/brux-gdk"
license=('AGPL-v3')
depends=(
'sdl2'
'sdl2_gfx'
'sdl2_image'
'sdl2_net'
)
makedepends=(
'base-devel'
'git'
'cmake'
)
provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname" "supertux-advance") # TODO: remove if supertux-advance AUR package begins depending on brux-gdk(-git)
source=("$_pkgname::git+$url.git#branch=unstable")
sha256sums=('SKIP')
pkgver() {
cd "$_pkgname/rte"
local tag
tag=$(git describe --tags --abbrev=0)
# Get the number of commits since the last tag
local commits
commits=$(git rev-list "${tag}..HEAD" --count)
# Get the current commit hash (abbreviated)
local commit_hash
commit_hash=$(git rev-parse --short HEAD)
# Remove the 'v' prefix if it exists
tag=${tag#v}
# Construct the version string
echo "${tag}.r${commits}.g${commit_hash}"
}
prepare() {
cd "$_pkgname/rte"
git submodule update --init --recursive
}
build() {
cmake -B build -S $_pkgname/rte -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
cmake --build build
}
package() {
cmake --install build
if [ "$pkgdir" != "" ]; then
rm -rf "$pkgdir/home"
fi
install -Dm755 build/brux "$pkgdir/usr/bin/brux"
}
|