upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / shattered-pixel-dungeon / trunk / PKGBUILD
blob36ed41302dd916973d2a35f238e82a4d55831fd5
1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
2 # Maintainer: Peter Cai <peter at typeblog dot net>
3 # Thanks: Kevin MacMartin <prurigro at gmail dot com>
5 pkgname=shattered-pixel-dungeon
6 pkgver=2.0.2
7 pkgrel=1
8 pkgdesc='A roguelike dungeon crawler with randomized levels and enemies, and hundreds of items'
9 arch=('any')
10 url='https://shatteredpixel.com/shatteredpd/'
11 license=('GPL3')
12 depends=('bash' 'xorg-xrandr' 'java-runtime>=11' 'hicolor-icon-theme')
13 makedepends=('git' 'jdk11-openjdk' 'gradle')
14 _commit='ff40272da050f5fc446d16c6ff6b9496fe21d908'
15 source=(
16   "$pkgname::git+https://github.com/00-Evan/shattered-pixel-dungeon#commit=$_commit"
17   "$pkgname.desktop"
18   'wrapper.sh'
19   'gradle-repro.patch'
21 b2sums=('SKIP'
22         '94e110340bddcdf64d74922e9ddf4c0f37e72466ea61edcde61f903680f57b10d81ff804b95f2467e4364a577f7c845d66137fedfc700d11638defe6a3359a93'
23         'c0b0d7d7319159716f1e49620c3c9a0bea9dea149cb1b88da0294a343341075557fe86bd45965a23aa34054ee6c454dd9a0b73273e6cafaf75de3d3fa3ef0ab1'
24         '194480092028d1ab10b7bdb036233ba11984bd994346f9f6b925b7516da80f7214f8dff86e27054a5f9b792d1192732938d88f2121fd5207ad0a93aa5d571e0a')
26 pkgver() {
27   cd "$pkgname"
29   git describe --tags | sed 's/^v//'
32 prepare() {
33   cd "$pkgname"
35   patch -p1 -i "$srcdir/gradle-repro.patch"
38 build() {
39   cd "$pkgname"
41   # Force the system to build the package using JDK 11
42   export PATH="/usr/lib/jvm/java-11-openjdk/bin/:$PATH"
43   export JAVA_HOME="/usr/lib/jvm/java-11-openjdk"
45   gradle desktop:release
48 package() {
49   cd "$pkgname"
51   # wrapper script
52   install -vDm755 "$srcdir/wrapper.sh" "$pkgdir/usr/bin/$pkgname"
54   # jar file
55   install -vDm644 "desktop/build/libs/desktop-$pkgver.jar" "$pkgdir/usr/share/$pkgname/$pkgname.jar"
57   # desktop file
58   install -vDm644 -t "$pkgdir/usr/share/applications" "$srcdir/$pkgname.desktop"
60   # application icons
61   for i in 16 32 48 64 128 256; do
62     install -vDm644 "desktop/src/main/assets/icons/icon_${i}.png" "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/$pkgname.png"
63   done
64   install -vDm644 android/src/main/res/mipmap-xxxhdpi/ic_launcher.png "$pkgdir/usr/share/icons/hicolor/192x192/apps/$pkgname.png"