How do I create a package

Joined
Aug 5, 2008
Messages
38
Reaction score
0
Points
6
Location
Beaumont, TX
First of all, let me say I'm aware of PackageManager. But as best as I can tell that app is for creating an application. The type of package I want to create will simply hold files. VMWare uses these as do some DVD creators.
 
Joined
May 22, 2005
Messages
2,159
Reaction score
67
Points
48
Location
Closer than you think.
Your Mac's Specs
Performa 6116 2GBSCSI 8MB OS 7.5.3
You may have heard of PackageManager, but have you heard of Google?

Google
 
OP
A
Joined
Aug 5, 2008
Messages
38
Reaction score
0
Points
6
Location
Beaumont, TX
OF COURSE! Most of the results referred to PackageManager. No Help.
 

Slydude

Well-known member
Staff member
Moderator
Joined
Nov 15, 2009
Messages
17,609
Reaction score
1,076
Points
113
Location
North Louisiana, USA
Your Mac's Specs
M1 MacMini 16 GB - Ventura, iPhone 14 Pro Max, 2015 iMac 16 GB Monterey
What are you trying to distribute? Could you do it as a zip archive?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
You'll need to be more specific especially if a zip archive is insufficient. What are you trying to accomplish? What kind of files are you working with? There are some other compression formats available to you beyond zip (tar, gunzip, bunzip2) if an archive is needed and zip doesn't work.
 
Joined
May 22, 2005
Messages
2,159
Reaction score
67
Points
48
Location
Closer than you think.
Your Mac's Specs
Performa 6116 2GBSCSI 8MB OS 7.5.3
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/ \
dstroot/usr/local/share/man/man1/
% install -m 755 myprog ./dstroot/usr/local/bin/
% install -m 644 myprog.1 \
./dstroot/usr/local/share/man/man1/
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 mypackage-0.1.info -d . -ignoreDSStore
% rm -f 1
% install -m 644 README.txt \
mypackage-0.1.pkg/Contents/Resources/ReadMe.txt
% install -m 644 LICENSE.txt \
mypackage-0.1.pkg/Contents/Resources/License.txt
% sudo chown -R root:staff \
mypackage-0.1.pkg/Contents/Resource
% 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.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top