blob: e9992874282efef12b72143346948074ecb9e80d (
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
|
# Maintainer: yum13241 <coolcrew45 at disroot dot org>
pkgname=obsidian-level-maker-unstable
pkgver=21.20250407 # Obsidian v21
pkgrel=1
pkgdesc="Random level generator for classic FPS titles, unstable version."
arch=('x86_64')
url="https://obsidian-level-maker.github.io"
license=('GPL-2.0-only')
groups=()
depends=('libx11' 'fltk')
makedepends=('git' 'cmake')
provides=("oblige-obsidian")
conflicts=("oblige-obsidian")
replaces=()
backup=()
options=()
install=
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/obsidian-level-maker/Obsidian/archive/refs/tags/Obsidian-v21-20250407.tar.gz", "obsidian.desktop")
noextract=("${pkgname}-${pkgver}.tar.gz")
sha256sums=('SKIP' 'SKIP')
prepare()
{
mkdir -p "$srcdir/usr/share/obsidian"
cd "$srcdir"/usr/share/obsidian
}
pkgver()
{
git ls-remote --tags https://github.com/obsidian-level-maker/Obsidian.git | sed 's/^Obsidian-v//;s/\([^-]*-g\)/r\1/;s/-/./g' | sed 's/^[^=:]*[=v]//' | tail -n 1
}
build()
{
tar -xvf "${pkgname}-${pkgver}.tar.gz" -C "$srcdir/usr/share/obsidian" --strip-components=1
cd "$srcdir/usr/share/obsidian"
curl -o CMakePresets.json https://raw.githubusercontent.com/obsidian-level-maker/Obsidian/refs/heads/obsidian/CMakePresets.json -L
# Modern build method, CMakePresets.json is present
cmake --preset dist -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_CXX_FLAGS=-Wno-format-security -DCMAKE_INSTALL_PREFIX="$pkgdir/usr"
cmake --build --preset dist
# Classic build, no CMakePresets.json
#cmake -B build -DCMAKE_INSTALL_PREFIX="$pkgdir/usr" -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_CXX_FLAGS=-Wno-format-security
#cmake --build build
}
package()
{
install -Dm644 obsidian.desktop "${pkgdir}/usr/share/applications/obsidian.desktop"
cp -dr $srcdir/usr/share/obsidian "${pkgdir}/usr/share/obsidian/"
}
|