### this file is sourced not run
PKGVER=1.5
PKGBUILD=1
PKGARCH=x86_64

# source: step
TARBALL=dotool_${PKGVER}_src.tar.gz
MD5SUM=47b3e47f7e3a182b88f09eb5f27e43af
SRC_URL=https://git.sr.ht/~geb/dotool/archive/7c0a53ef94ac330b4c71c0c5f48f9f4e53db4c67.tar.gz #tag 1.5

BUNDLE=

SLACKREQ='libxkbdcommon' # lfs-cacert, golang and scdoc - build time only
SLACKDESC="dotool: dotool $PKGVER (input automation tool)
dotool:
dotool: User-space command to simulate input anywhere (X11, Wayland, TTYs).
dotool: dotool reads actions from stdin and simulates keyboard/mouse input using
dotool: Linux's uinput module. It works systemwide and supports keyboard layouts.
dotool:
dotool: Note: dotool: requires that the kernel module uinput be loaded prior to use.
dotool: \"modprobe uinput\" should do the trick.
dotool:
dotool: https://git.sr.ht/~geb/dotool
dotool:
"

### default pkg_download
### default pkg_prepare
### package
pkg_package() {
	rm -r root # for whatever reason this gets touched by go, so remove it
}

### build
pkg_build() {
	export GOPATH=/tmp/go         # don't clutter our home directory
	PATH=/opt/go/bin:$PATH
	export DOTOOL_BINDIR=usr/bin

	cd /tmp/dotool* &&
	echo nameserver 9.9.9.9 > /etc/resolv.conf && # for go to download its dependencies
	./build.sh &&
	./build.sh install &&
	pkg_build_slackdesc &&
	rm -f /etc/resolv.conf
}

# vim: set ft=sh:
