Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions srcpkgs/shattered-pixel-dungeon/files/shattered-pixel-dungeon
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
java -jar /usr/share/shattered-pixel-dungeon/desktop-@VERSION@.jar $@
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Desktop Entry]
Type=Application
Version=1.0
Name=Shattered Pixel Dungeon
Comment=Open-source roguelike dungeon crawler
Exec=/usr/bin/shattered-pixel-dungeon
Icon=shattered-pixel-dungeon
Terminal=false
Categories=Game;
42 changes: 42 additions & 0 deletions srcpkgs/shattered-pixel-dungeon/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Template file for 'shattered-pixel-dungeon'
pkgname=shattered-pixel-dungeon
version=3.3.1
revision=1
hostmakedepends="openjdk17 gradle"
depends="virtual?java-runtime desktop-file-utils hicolor-icon-theme"
short_desc="Open-source roguelike dungeon crawler with randomized levels and enemies"
maintainer="Mihail Ivanchev <contact@ivanchev.net>"
license="GPL-3.0-only"
homepage="https://github.com/00-Evan/shattered-pixel-dungeon"
distfiles="https://github.com/00-Evan/shattered-pixel-dungeon/archive/v${version}.tar.gz"
checksum=5e22c79654865bb85ff7f44c60553641185d26cc660ffbb730b50965314952f3

do_build() {
vsed -i settings.gradle -e 's|include.*:android.*|//&|'
vsed -i settings.gradle -e 's|include.*:ios.*|//&|'

# The heap size is causing problems for the i686 CI build.
case "${XBPS_TARGET_MACHINE}" in
i686*) vsed -i gradle.properties -e 's|-Xmx2048m ||'
;;
esac

gradle --no-daemon --warning-mode all desktop:release
}

do_install() {
vmkdir usr/share/${pkgname}
vcopy desktop/build/libs/desktop-$version.jar usr/share/${pkgname}

vmkdir usr/bin
sed "s|@VERSION@|${version}|" "${FILESDIR}/${pkgname}" > "${DESTDIR}/usr/bin/${pkgname}"
chmod 0755 "${DESTDIR}/usr/bin/${pkgname}"

vinstall "${FILESDIR}/${pkgname}.desktop" 0644 usr/share/applications

for icon in desktop/src/main/assets/icons/icon_*.png; do
local size=${icon##*_}
size=${size%.png}
vinstall $icon 0644 usr/share/icons/hicolor/${size}x${size}/apps ${pkgname}.png
done
}