# Template file for 'megatools'
pkgname=megatools
version=1.11.5
revision=1
_release_date=20250706
build_style=meson
hostmakedepends="pkg-config asciidoc docbook2x"
makedepends="glib-networking gobject-introspection openssl-devel libcurl-devel fuse-devel libsodium-devel glib-devel"
short_desc="Command line client for Mega.nz file sharing service"
maintainer="RunningDroid <runningdroid@zoho.com>"
license="GPL-2.0-or-later"
homepage="https://xff.cz/megatools/"
changelog="https://xff.cz/megatools/builds/NEWS"
distfiles="https://xff.cz/megatools/builds/megatools-${version}.${_release_date}.tar.gz"
checksum=51f78a03748a64b1066ce28a2ca75d98dbef5f00fe9789dc894827f9a913b362

post_install() {
	vinstall contrib/bash-completion/megatools 644 usr/share/bash-completion/completions

	for i in megadl megadf megamkdir megaget megareg megarm megaput megals megacopy megaexport megatest; do
		ln -sf megatools "${DESTDIR}/usr/share/bash-completion/completions/${i}"
	done
}
