# Template file for 'cudatext-gtk2-bin'
pkgname=cudatext-gtk2-bin
version=1.109.2.0
revision=1
archs="x86_64"
build_style=meta
hostmakedepends="tar xz"
makedepends=""
depends="gtk+ python3"
short_desc="Cross-platform, heavily customizable text editor"
maintainer="reback00 <reback00@protonmail.com>"
license="MPL-2.0"
homepage="http://www.uvviewsoft.com/cudatext/"
conflicts="cudatext-qt5-bin"
nopie=yes
python_version=3

# NOTE: Due to being that the author selected distribution site 
# fosshub.com does not support downloading through any tool, the package
# source files will need to be manually updated by hand inside "files"
# directory.

do_install() {
	# Extract the main binary archive
	tar xvf "${FILESDIR}/cudatext-linux-gtk2-amd64-${version}.tar.xz" -C "${wrksrc}/"
	
	# Move files/dirs to appropriate places
	mkdir -p "${DESTDIR}/usr/bin"
	cp "${wrksrc}/cudatext" "${DESTDIR}/usr/bin/"
	
	mkdir -p "${DESTDIR}/usr/share/applications"
	cp "${FILESDIR}/cudatext.desktop" "${DESTDIR}/usr/share/applications"
	
	mkdir -p "${DESTDIR}/usr/share/cudatext"
	cp -r "${wrksrc}/data" "${DESTDIR}/usr/share/cudatext/"
	cp -r "${wrksrc}/py" "${DESTDIR}/usr/share/cudatext/"
	cp -r "${wrksrc}/settings_default" "${DESTDIR}/usr/share/cudatext/"
	
	mkdir -p "${DESTDIR}/usr/share/pixmaps"
	cp "${wrksrc}/cudatext-512.png" "${DESTDIR}/usr/share/pixmaps/"
}
