Skip to content
Open
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
65 changes: 65 additions & 0 deletions srcpkgs/pixelorama/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Template file for 'pixelorama'
pkgname=pixelorama
version=1.1.10
revision=1
archs="x86_64* i686* aarch64* armv7*"
hostmakedepends="godot"
short_desc="Powerful and accessible open-source pixel art multitool"
maintainer="Naiko <glclaritas@gmail.com>"
license="MIT"
homepage="https://orama-interactive.itch.io/pixelorama"

distfiles="https://github.com/Orama-Interactive/Pixelorama/archive/refs/tags/v${version}.tar.gz"
checksum=b1937afba5882a423f836ba7f99b790a90fef64652deb7c7984d242dfc193add

case "$XBPS_TARGET_MACHINE" in
i686*)
_preset_name="Linux 32-bit"
hostmakedepends+=" godot-export-templates"
;;
x86_64*)
_preset_name="Linux 64-bit"
hostmakedepends+=" godot-export-templates"
;;
aarch64*) _preset_name="Linux ARM64" ;;
armv7*) _preset_name="Linux ARM32" ;;
esac

if [[ "$CROSS_BUILD" ]] then
_godot_ver="$(xbps-query -R -p pkgver godot | awk -F'[-_]' '{print $(NF-1)}')"
distfiles+=" https://github.com/godotengine/godot/releases/download/${_godot_ver}-stable/Godot_v${_godot_ver}-stable_export_templates.tpz>templates.zip"
checksum+=" 942366dc4e27e7686a99da4d3cfb1b8ae8d3eb9444f6d8217eef16245b599ef2"
skip_extraction="templates.zip"
nopie=yes
fi

post_extract() {
mkdir -p "$HOME/.local/share/godot"
if [[ "$CROSS_BUILD" ]] then
vsrcextract -C $HOME/.local/share/godot/export_templates/${_godot_ver}.stable templates.zip
else
ln -s "/usr/lib/godot/export_templates" "$HOME/.local/share/godot"
fi
}

do_build() {
mkdir build
godot --headless -v --import
godot --headless -v --export-release "$_preset_name" build/${pkgname}
}

do_install() {
vinstall build/${pkgname} 755 usr/lib/${pkgname}
vinstall build/${pkgname}.pck 644 usr/lib/${pkgname}
mv pixelorama_data ${DESTDIR}/usr/lib/${pkgname}
vinstall Misc/Linux/com.orama_interactive.Pixelorama.desktop 644 usr/share/applications
vinstall Misc/Linux/com.orama_interactive.Pixelorama.xml 644 usr/share/mime/packages
vinstall Misc/Linux/com.orama_interactive.Pixelorama.appdata.xml 644 usr/share/metainfo
vinstall Misc/Clickable/click/icon.png 644 usr/share/icons/hicolor/256x256/apps pixelorama.png
vlicense LICENSE
cat > ${pkgname} <<-_EOF
#!/bin/sh
exec /usr/lib/${pkgname}/${pkgname} $@
_EOF
vbin ${pkgname}
}