Here's the mindeless proceedure to make a larger job easier.
For well-written software, you can look in the Makefile for something like DESTDIR, or INSTALL_DIR, etc. Once you find the magic var, you can usually do "make DESTDIR=/tmp/pkg-staging install"
(echo 'i pkginfo'; pkgproto /tmp/pkg-staging=/ ) >prototype
PKG=$PKGNAME NAME=purpose of package (255 chars max, ideally less than 40) VERSION=X.y.z CATEGORY=(normally either 'system' or 'application')Optional additional entries:
DESC=extra info beyond NAME (255 chars max) ARCH=i386 or sparc. Gets automatically filled to current arch otherwise. VENDOR=http://where.you.got.it EMAIL=maybe your email address?
This looks at pkginfo and prototype in current directory, and then 'spools' all files mentioned into a directory based package, in /var/spool/pkg/$PKGNAME
pkgadd -d $PKGNAME.pkgin Solaris.
Dont forget to clean up;
rm -r /var/spool/pkg/$PKGNAME /tmp/pkg-staging
The only gotcha with this method is that you have to be 100% sure it doesnt install stuff to any other funny location, or you'll miss stuff in your package.# (As root!) touch /tmp/proto.timestamp echo 'i pkginfo' >prototype sleep 5 #(paranoia about making the timestamp clear to the system) make ginstall # Then, assuming you are installing to /usr/local find /usr/local -newer /tmp/proto.timestamp |pkgproto >> prototype
Step 3, above, then becomes,
(echo 'i pkginfo'; pkgproto /tmp/pkg-staging/usr/local= ) >prototype
pkgadd will now always ask the user where they want the 'package base
directory' to be.
If you wish to provide a default, add a line to pkginfo before running pkgmk: