# Template file for 'passff-host'
pkgname=passff-host
version=1.2.5
revision=1
depends="python3 pass"
short_desc="Host app for the WebExtension PassFF"
maintainer="Colin Reeder <colin@vpzom.click>"
license="GPL-2.0-only"
homepage="https://codeberg.org/PassFF/passff-host"
distfiles="https://codeberg.org/PassFF/passff-host/archive/${version}.tar.gz"
checksum=34ac2c8365d514a10787a29ed880c460728e4f1c72f83f3371d293a993854fc6

do_install() {
	vsed -i src/passff.py -e "s/_VERSIONHOLDER_/${version}/g"
	vinstall src/passff.py 755 usr/libexec

	vsed -i src/passff.json -e 's#PLACEHOLDER#/usr/libexec/passff.py#g'
	for dir in "usr/lib/mozilla/native-messaging-hosts" "etc/opt/chrome/native-messaging-hosts" "etc/chromium/native-messaging-hosts" "etc/vivaldi/native-messaging-hosts"; do
		vinstall src/passff.json 644 "$dir"
	done
}
