Adopted and imported dpkg PKGBUILD from joschi.