Fixed the pkgbuild script and added a patch.