openkingdoms-git

LOW
maintainer DoubyCz 0 votes scanned 2026-09-18 21:28:57.026605
View on AUR
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
12pkgname=openkingdoms-git
13pkgver=0.1.4.r2.gddcfbdb
14pkgrel=1
15pkgdesc='Open-source engine for Total Annihilation: Kingdoms (1999). Requires you own the original game.'
16arch=('x86_64')
17url='https://github.com/OpenKingdoms/OpenKingdoms'
18license=('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).
23depends=('sdl2' 'ffmpeg')
24makedepends=('git' 'cmake' 'ninja') # gcc/make come from base-devel
25provides=('openkingdoms')
26conflicts=('openkingdoms')
27options=('!debug')
28install="${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
33source=("${_srcname}::git+https://github.com/OpenKingdoms/OpenKingdoms.git")
34sha256sums=('SKIP')
35
36pkgver() {
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
45build() {
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
56check() {
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
64package() {
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]
79Type=Application
80Version=1.0
81Name=OpenKingdoms
82GenericName=Real-time strategy
83Comment=Engine for Total Annihilation: Kingdoms (needs your own copy of the game)
84Exec=openkingdoms
85Icon=applications-games
86Terminal=false
87Categories=Game;StrategyGame;
88Keywords=kingdoms;total;annihilation;rts;cavedog;
89EOF
90}
91

Scan history

Scanned at (UTC)SeverityRules
2026-09-18 21:28:57 Low 1

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion