Creating IPS packages for Opensolaris consists of four important steps :
  1. Building the package using common method like, make, make install and figure out the dependencies.
  2. We need to have a build environment (CBE) [ one time step ]
  3. We need to write a spec file
  4. We will use pkgtool to generate IPS
  5. Building the environment for development
Prerequisites: Install sunstudio compiler using the command pfexec pkg install ss-dev Install the following required packages similarly
  • SUNWgnome-common-devel
  • SUNWperl-xml-parser
  • SUNWgnome-xml-root
  • SUNWgnome-xml
  • SUNWgnome-xml-share
  • SUNWdoxygen (optional)
Installing the Common Build Environment Download the CBE(Common Build Environment) from : http://dlc.sun.com/osol/jds/downloads/cbe/test/ Ensure you select the correct architecture. Once downloaded, extract the contents from the tarball. To install run cbe-install. This needs to be run by a user with Primary Administrator privileges. Users wishing to run and CBE once installed successfully should have at least Software Installation privileges. Privilages are easy enough to add, by either manually editing the /etc/user_attr file or using usermod(1) with the -P CLI option. Download latest pkgbuild from here : http://pkgbuild.sourceforge.net/download.php (version >= 1.3.98, for generating IPS packages) CBE 1.7+ includes a version of pkgbuild which at the moment does not generate IPS packages. If you just want to compile packages and generate SVR4 packages then there is no need to perform this step. Use the installed CBE to build the downloaded latest pkgbuild package $ cd pkgbuild-1.3.98 $ ./configure --prefix=/opt/dtbld/ $ make $ pfexec make install Set the build environment $ . /opt/dtbld/bin/env.sh Get existing spec files to play around with: svn co svn+ssh://anon-AT-svn.opensolaris-DOT-org/svn/jds/spec-files/trunk spec-files-trunk set the build environment by sunning the following script.
$ . /opt/dtbld/bin/env.sh Building the package and Generating IPS pkgtool --download --ips build-only SFEjoe.spec Before executing the above command the local repository must be setup to run at localhost:80 using svcadm enable pkg/server for IPS repo on http://localhost:80 )
Creating Spec files
How to write a spec file: http://jucr.opensolaris.org/help/spec_file Base spec file: http://jucr.opensolaris.org/help/base.spec

Source Juicer:
http://jucr.opensolaris.org/home



More...