to make packages on solaris:

0. Make sure the path includes /usr/local/bin for the GNU tools.

1. Check out the code and build it with:

./build.sh -Dopennms.home=/opt/opennms install assembly:attached

2. mkdir -p /tmp/opennms/opt/opennms

3. cd /tmp/opennms/opt/opennms

4.

/usr/local/bin/tar zxvf ~/svn/1.6-testing/target/opennms-1.5.94-testing-SNAPSHOT.tar.gz

(Modify it to point to your svn path and make sure to use GNU tar)

5. cd /tmp/opennms/opt/

6. cp ~/svn/1.6-testing/tools/packages/solaris/opennms/p* .

This will move the pkginfo and postinstall files to the proper place.

7. Edit pkginfo and postinstall as needed.

8. generate the file list from /opt

   # cd /tmp/opennms/opt
   # find . -print | pkgproto > prototype

9. Edit the prototype file and add the following at the top:

i pkginfo=./pkginfo
i postinstall=./postinstall

10. Edit the prototype file, go to the bottom and remove the references 
    to postinstall, pkginfo and prototype.

11. fix permissions -- it's best to change your username stuff to "bin bin"

   # perl -pi -e 's,root root,bin bin,' prototype

12. put the package into the system package archive

   # pkgmk -r `pwd`

13. generate a package file from the system archive

   # cd /var/spool/pkg
   # pkgtrans -s `pwd` /tmp/opennms-1.6.0-1-sol10-sparc-opt
