openkingdoms
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
# This is the stable package, built from the latest released tag. For the
13
# development version built from git HEAD, use openkingdoms-git.
14
15
pkgname=openkingdoms
16
pkgver=0.1.4
17
pkgrel=1
18
pkgdesc='Open-source engine for Total Annihilation: Kingdoms (1999). Requires you own the original game.'
19
arch=('x86_64')
20
url='https://github.com/OpenKingdoms/OpenKingdoms'
21
license=('GPL-3.0-or-later')
22
# 'sdl2' is deliberate rather than 'sdl2-compat': Arch currently satisfies it
23
# with sdl2-compat (which provides sdl2=2.32.x), and naming the virtual package
24
# keeps working if a real sdl2 ever returns.
25
# ffmpeg: Bink playback (the main menu door clips and the cut scenes).
26
depends=('sdl2' 'ffmpeg')
27
makedepends=('git' 'cmake' 'ninja') # gcc/make come from base-devel
28
conflicts=('openkingdoms-git')
29
options=('!debug')
30
install="${pkgname}.install"
31
32
# Built from the tag rather than a source tarball on purpose: CMake stamps the
33
# engine version from `git describe`, and without a .git directory the version
34
# shown on the main menu would read "unknown" -- which is exactly what upstream's
35
# bug template asks reporters to quote.
36
_srcname=OpenKingdoms
37
source=("${_srcname}::git+https://github.com/OpenKingdoms/OpenKingdoms.git#tag=v${pkgver}")
38
sha256sums=('SKIP')
39
40
build() {
41
cd "${srcdir}/${_srcname}"
42
# TAK_GAME_DIR is deliberately left empty: a package must not bake in one
43
# user's path. The engine asks for the folder on first run and remembers it.
44
cmake -B build -G Ninja \
45
-DCMAKE_BUILD_TYPE=Release \
46
-DCMAKE_INSTALL_PREFIX=/usr \
47
-DTAK_GAME_DIR=
48
cmake --build build
49
}
50
51
check() {
52
cd "${srcdir}/${_srcname}"
53
# Tests that load real game data carry the CTest label needs-data and are
54
# excluded here, the same way upstream CI does it: a build host has no game
55
# files and those cases would only skip (and a skip exits nonzero).
56
ctest --test-dir build --output-on-failure --label-exclude needs-data
57
}
58
59
package() {
60
cd "${srcdir}/${_srcname}"
61
DESTDIR="${pkgdir}" cmake --install build
62
63
# Upstream installs the binary as `tak-re`; add the name people know it by.
64
ln -s tak-re "${pkgdir}/usr/bin/openkingdoms"
65
66
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
67
install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
68
install -Dm644 docs/ASSETS.md "${pkgdir}/usr/share/doc/${pkgname}/ASSETS.md"
69
70
# No icon is shipped: the game's own icon lives in the original data, which
71
# is copyrighted and must not be redistributed. A stock category icon is used.
72
install -Dm644 /dev/stdin "${pkgdir}/usr/share/applications/openkingdoms.desktop" <<'EOF'
73
[Desktop Entry]
74
Type=Application
75
Version=1.0
76
Name=OpenKingdoms
77
GenericName=Real-time strategy
78
Comment=Engine for Total Annihilation: Kingdoms (needs your own copy of the game)
79
Exec=openkingdoms
80
Icon=applications-games
81
Terminal=false
82
Categories=Game;StrategyGame;
83
Keywords=kingdoms;total;annihilation;rts;cavedog;
84
EOF
85
}
86
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-09-18 21:28:57 | Low | 1 |