# Template file for 'drawio-desktop'
pkgname=drawio-desktop
version=27.0.2
revision=1
only_for_archs="x86_64"
hostmakedepends="tar xz"
short_desc="Official electron build of draw.io, a client-side JavaScript editor for general diagramming."
maintainer="ndpm13 <ndpm13@ch-naseem.com>"
license="Apache-2.0"
homepage="https://www.diagrams.net/"
distfiles="https://github.com/jgraph/drawio-desktop/releases/download/v${version}/drawio-amd64-${version}.deb"
checksum=723abf660a496713772971392c5f504dfc9f3976c39aa7d91c7592347b632b8b
nostrip=yes

do_extract() {
  mkdir -p ${DESTDIR}
  ar x ${XBPS_SRCDISTDIR}/${pkgname}-${version}/drawio-amd64-${version}.deb
  tar xf data.tar.xz -C ${DESTDIR}
}

do_install() {
	vmkdir usr/bin
  ln -sf /opt/drawio/drawio ${DESTDIR}/usr/bin/drawio
  # Cleanup up
  rm -rf ${DESTDIR}/etc
}
