openkingdoms-git
LOW
maintainer DoubyCz
0 votes
scanned 2026-09-18 21:28:57.026605
Why flagged
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
Triggered rules
Low
Few votes, recently uploaded
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
PKGBUILD
1
# Maintainer: Jiri Doubravsky (DoubyCz) <douby@douby.cz>
2
#
3
# OpenKingdoms - from-scratch open-source engine for Total Annihilation: Kingdoms
4
# (Cavedog, 1999), written in C11. Native Linux build against the system SDL2,
5
# so nothing is bundled. The engine ships no game content and never will: it
6
# reads the original .hpi archives, which the user supplies from their own copy
7
# (GOG Total Annihilation Commander Pack, or the original CDs).
8
#
9
# Point the engine at your copy with --game-dir, or export TAK_GAME_DIR.
10
# The folder is remembered after the first run.
11
12
pkgname=openkingdoms-git
13
pkgver=0.1.4.r2.gddcfbdb
14
pkgrel=1
15
pkgdesc='Open-source engine for Total Annihilation: Kingdoms (1999). Requires you own the original game.'
16
arch=('x86_64')
17
url='https://github.com/OpenKingdoms/OpenKingdoms'
18
license=('GPL-3.0-or-later')
19
# 'sdl2' is deliberate rather than 'sdl2-compat': Arch currently satisfies it
20
# with sdl2-compat (which provides sdl2=2.32.x), and naming the virtual package
21
# keeps working if a real sdl2 ever returns.
22
# ffmpeg: Bink playback (the main menu door clips and the cut scenes).
23
depends=('sdl2' 'ffmpeg')
24
makedepends=('git' 'cmake' 'ninja') # gcc/make come from base-devel
25
provides=('openkingdoms')
26
conflicts=('openkingdoms')
27
options=('!debug')
28
install="${pkgname}.install"
29
30
# Local checkout name kept separate from $pkgname so a cached VCS clone is not
31
# confused with the package directory.
32
_srcname=OpenKingdoms
33
source=("${_srcname}::git+https://github.com/OpenKingdoms/OpenKingdoms.git")
34
sha256sums=('SKIP')
35
36
pkgver() {
37
cd "${srcdir}/${_srcname}"
38
# Upstream tags are v0.1.4 -> 0.1.4.r<commits since tag>.g<hash>
39
git describe --long --tags --abbrev=7 2>/dev/null \
40
| sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' \
41
|| printf '0.0.0.r%s.g%s' \
42
"$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
43
}
44
45
build() {
46
cd "${srcdir}/${_srcname}"
47
# TAK_GAME_DIR is deliberately left empty: a package must not bake in one
48
# user's path. The engine asks for the folder on first run and remembers it.
49
cmake -B build -G Ninja \
50
-DCMAKE_BUILD_TYPE=Release \
51
-DCMAKE_INSTALL_PREFIX=/usr \
52
-DTAK_GAME_DIR=
53
cmake --build build
54
}
55
56
check() {
57
cd "${srcdir}/${_srcname}"
58
# Tests that load real game data carry the CTest label needs-data and are
59
# excluded here, the same way upstream CI does it: a build host has no game
60
# files and those cases would only skip (and a skip exits nonzero).
61
ctest --test-dir build --output-on-failure --label-exclude needs-data
62
}
63
64
package() {
65
cd "${srcdir}/${_srcname}"
66
DESTDIR="${pkgdir}" cmake --install build
67
68
# Upstream installs the binary as `tak-re`; add the name people know it by.
69
ln -s tak-re "${pkgdir}/usr/bin/openkingdoms"
70
71
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
72
install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
73
install -Dm644 docs/ASSETS.md "${pkgdir}/usr/share/doc/${pkgname}/ASSETS.md"
74
75
# No icon is shipped: the game's own icon lives in the original data, which
76
# is copyrighted and must not be redistributed. A stock category icon is used.
77
install -Dm644 /dev/stdin "${pkgdir}/usr/share/applications/openkingdoms.desktop" <<'EOF'
78
[Desktop Entry]
79
Type=Application
80
Version=1.0
81
Name=OpenKingdoms
82
GenericName=Real-time strategy
83
Comment=Engine for Total Annihilation: Kingdoms (needs your own copy of the game)
84
Exec=openkingdoms
85
Icon=applications-games
86
Terminal=false
87
Categories=Game;StrategyGame;
88
Keywords=kingdoms;total;annihilation;rts;cavedog;
89
EOF
90
}
91
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-09-18 21:28:57 | Low | 1 |