summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5273ce45369a812ec84d0b32b2cb63fd0b43508a (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: Michal Štefáček <493msi@gmail.com>

_basename="jsrclone"
pkgname=jsrclone-git
pkgver=22.2.0.0.alpha.2.r2.g81064b6
pkgrel=3
pkgdesc="A simple multidirectional shoot em up game written in Java."
url="https://github.com/493msi/plutoengine"
license=(MIT)
arch=(x86_64)
makedepends=(git jdk-openjdk)
provides=()
source=("git+${url}.git"
        "git+https://github.com/493msi/libra.git")
sha256sums=("SKIP"
            "SKIP")

prepare() {
    cd plutoengine
    git submodule init
    git config submodule.libra.url "$srcdir/libra"
    git submodule update
}

build() {
    cd plutoengine
    ./gradlew :plutoengine-demos:jsr-clone:distTar

    cd "$srcdir/"
    tar -xf "plutoengine/engine-demo/jsr-clone/build/distributions/"jsr-clone-*.tar

    echo "[Desktop Entry]
    Name=JSRClone $_pkgver
    Comment=A simple multidirectional shoot em up game written in Java.
    Exec=/opt/$_basename/bin/jsr-clone
    Path=/opt/$_basename
    Terminal=false
    Type=Application
    Categories=Games;" > "$srcdir/$_basename.desktop"
}

pkgver() {
    cd "plutoengine"
    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

package() {
    install -d "$pkgdir/opt"
    cp -rf "$srcdir/"jsr-clone* "$pkgdir/opt/$_basename"
    install -dm777 "$pkgdir/opt/$_basename/logs"
    install -Dm644 "$srcdir/$_basename.desktop" "$pkgdir/usr/share/applications/$_basename.desktop"
    install -Dm644 plutoengine/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}