#!/usr/bin/bash
# JOBoRun		: Jwm OpenBox Obarun RUNit
# Maintainer	: Joe Bo Run <joborun@disroot.org>
# PkgSource		: url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website		: https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=jave
pkgver=5
pkgrel=010
pkgdesc="Java Ascii Versatile Editor - graphics editor for editing texts instead of images."
url="http://www.jave.de/"
depends=("java-environment" "sh")
optdepends=('figlet: provide base figlet fonts'
'figlet-fonts: provide additional asciiart fonts')
arch=('any')
source=("${url}download/${pkgname}${pkgver}.zip"
        "${url}download/license.txt"
        "jave.sh")

package() {
	mkdir -p $pkgdir/usr/share/java/$pkgname
    install -Dm755 $srcdir/jave.sh $pkgdir/usr/bin/jave
    install -Dm644 $srcdir/license.txt $pkgdir/usr/share/licenses/jave/license.txt

	mv $srcdir/* $pkgdir/usr/share/java/$pkgname
	rm $pkgdir/usr/share/java/$pkgname/$pkgname.sh
	rm $pkgdir/usr/share/java/$pkgname/license.txt
	rm $pkgdir/usr/share/java/$pkgname/$pkgname*.zip
	rm $pkgdir/usr/share/java/$pkgname/fonts -r

	cd  $pkgdir/usr/share/java/$pkgname/
	ln -s  /usr/share/figlet/ fonts
}

#---- license gpg-key sha256sums ----

license=("custom")

sha256sums=(2b01458c861e2f8ed7d023344674c96424782246f96e9442844229e5a9eb0ef9 # jave5.zip
	bb3891b097464d4e438b921da130de86b72932f15b18a8ce53822ce85eebe8f3 # license.txt
	8b9b387e9eb9ec88137e9c048736796ff0cd5a26f465a1569177d87185ee82da) #  jave.sh
