In addition to things others have said.
url="httpx://wiringx.org/"
Typo
pkgver() { cd "${srcdir}/$_gitname" echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD) }
This will cause problems if there is ever a release. See https://wiki.archlinux.org/title/VCS_package_guidelines#Git
mv "$pkgdir/usr/local/"* "$pkgdir/usr" rm -r "$pkgdir/usr/local"
Can you not set a prefix? This step should not normally necessary.
$ pacman -Qpl wiringX-git-251.54030cd-1-x86_64.pkg.tar.zst ... wiringX-git /usr/sbin/ wiringX-git /usr/sbin/wiringx-blink wiringX-git /usr/sbin/wiringx-interrupt wiringX-git /usr/sbin/wiringx-read
You cannot install things to /usr/sbin/. This package isn't even installable as-is, pacman will error out.
We may also want to include the static library. Thoughts?
Why?