Those are very time consuming and might not be stable enough.
Not tested whether it works at runtime, though
Adjustments compared to the AUR version: * Add support for more architectures * Shorten description * Fix formatting (standard for PKGBUILDs is 2 spaces) * Use makeflags * Build as shared library