Based on Arch PKGBUILD