= General Purpose Packaging = <> == Overview == From time to time, you may find it necessary to create a general purpose package, which installs files to arbitrary places on disk. For instance, if you have a piece of software that can be licensed with the addition of a licence file to the file system, then you would create a recipe to pkg the file and make it require the parent software (so that the parent software is always installed first). Then when both are added to a manifest, the software will install and then become licensed. These types of pkgs will not be added to the autobuild, and should only be built if the contents need to change. == Requirements == * You should have set up your build system in accordance with the page on [[https://docs.orchard.ox.ac.uk/AutoPkg/Contributing|how to contribute]]. * You should also familiarise yourself with the use of autopkg as a general purpose packaging tool on [[https://managingosx.wordpress.com/2015/07/30/using-autopkg-for-general-purpose-packaging/|Greg Neagle's blog]] and corresponding [[https://github.com/gregneagle/autopkg-packaging-demo|Github repo]]. * You must be allowed to contribute to the [[https://github.com/ox-it/orchard-recipes-private|private Orchard recipe repo]]. If you are not, contact the Orchard team with your request. == Guidelines == * You probably don't need a `build` dir like Greg mentions. This is because all of our pkgs will be imported into munki and we can just use the regular autopkg cache dir as our build directory. * Create a pkg structure in the payload directory of your recipe. For instance if your file needed to go into `/Applications/Amazing_Widgets.app/Contents/licence.lic` you would create `payload/Applications/Amazing Widgets/Contents` and then place your licence file in the `Contents` dir. * You may do this for as many locations/files as you need. *