# Template file for 'playonlinux'
pkgname=playonlinux
version=4.4
revision=5
# contains pre-compiled binaries linked against glibc
archs="i686 x86_64"
pycompile_dirs="usr/share/$pkgname/python"
depends="icoutils netcat ImageMagick xterm wxPython cabextract unzip glxinfo
 gnupg xdg-user-dirs libXmu wget p7zip curl jq python3-natsort xrdb gettext
 perl python3-pyasyncore"
short_desc="GUI for managing Windows programs under linux"
maintainer="Helmut Pozimski <helmut@pozimski.eu>"
license="GPL-2.0-or-later"
homepage="https://www.playonlinux.com"
distfiles="https://repository.playonlinux.com/PlayOnLinux/${version}/PlayOnLinux_${version}.tar.gz"
checksum=aaeedec5249df3ffd56cd8b3e3e06ea7117828ffc868eb2653d232c48e488058
python_version=3

do_install() {
	vmkdir usr/share/$pkgname
	vmkdir usr/bin
	vcopy bash /usr/share/$pkgname
	vcopy bin /usr/share/$pkgname
	vcopy doc /usr/share/$pkgname
	vcopy etc /usr/share/$pkgname
	vcopy lang /usr/share/$pkgname
	vcopy lib /usr/share/$pkgname
	vcopy plugins /usr/share/$pkgname
	vcopy python /usr/share/$pkgname
	vcopy resources /usr/share/$pkgname
	vcopy src /usr/share/$pkgname
	vcopy tests /usr/share/$pkgname
	vcopy playonlinux /usr/share/$pkgname

	vdoc README.md
	vdoc CHANGELOG.md
	vdoc TRANSLATORS

	echo "#!/bin/bash" > $DESTDIR/usr/bin/$pkgname
	echo "/usr/share/$pkgname/$pkgname \"\$@\"" >> $DESTDIR/usr/bin/$pkgname
	chmod +x  $DESTDIR/usr/bin/$pkgname

	vinstall etc/PlayOnLinux.desktop 644 usr/share/applications playonlinux.desktop
	vsed -i "s/ %F//g" $DESTDIR/usr/share/applications/playonlinux.desktop
}