View Single Post

MacsWork's Avatar
Member Since: May 22, 2005
Location: Closer than you think.
Posts: 2,159
MacsWork is just really niceMacsWork is just really niceMacsWork is just really niceMacsWork is just really niceMacsWork is just really nice
Mac Specs: Performa 6116 2GBSCSI 8MB OS 7.5.3

MacsWork is offline
How to Programmatically Create a Mac OS X Package (from the command-line or a shell script).

Note that any lines ending with a backslash should be one line; they've been broken here for a narrower display width.
Set up the files you want to package in a folder called dstroot:
% mkdir ./dstroot
% mkdir -p ./dstroot/usr/local/bin/ \
% install -m 755 myprog ./dstroot/usr/local/bin/
% install -m 644 myprog.1 \
Create a package info file (this has nothing to do with Fink info files). Either copy one from another .pkg to use as a template, or see this pkg info file from osxutils.

Make the package:
% find dstroot -name .DS_Store -delete
% sudo chown -R root:staff dstroot
% package dstroot -d . -ignoreDSStore
% rm -f 1
% install -m 644 README.txt \
% install -m 644 LICENSE.txt \
% sudo chown -R root:staff \
% tar -h mypackage-0.1.pkg -cf mypackage-0.1.pkg.tar
% gzip -9 mypackage-0.1.pkg.tar
See an example Makefile from the osxutils package which builds a .pkg from the command line at SourceForge.
QUOTE Thanks