Put the stuff that builds and installs the package into a function.