As always there are some assumptions from my side. You read the part I article, you know the standard solaris pkgadd, pkginfo and pkgrm tools, you have at least heard of the subversion revision control system, environment variables do not scare you and a PATH is not a road through the woods. Oh yes and ‘jdsuser’ is the user I assume you setup correctly according o part I.
This part actually does not make much difference between Solaris 10 and SXCE and I think Indiana neither, but what the heck, I will describe the latter two scenarios in part III and IV, sicne especialy for Indiana you will want to know how we can help you with creating IPS packages. Anyway, lets the games begin.
First lets get into the right environment, so lets do:
. /opt/jdsbld/bin/env.sh
feels much better now that we have the right VARS and PATH set.
Now lets get the SFE repository. Create a nice directory where you want to keep all your project files. Change into it and do:
svn co https://pkgbuild.svn.sourceforge.net/svnroot/pkgbuild/spec-files-extra/trunk SFE
after a while of downloading you should now have a complete copy of the SFE repository. A a first example we will build a package of VIM.
Change into the freshly created SFE repo directory, and build the package. Since we want to build a package that can be transferred to other machines we have, lets make the package a one file package in datastream format. Since vim depends on cscope and ctags and pkgtool will not let us build packages whose dependencies haven’t been met, we add SFEctags.spec and SFEcscope.spec to the end of the line to build it as well.
Here we go
cd SFE
pkgtool --interactive --download --pkgformat=ds build SFEvim.spec SFEctags.spec SFEcscope.spec
After some downlaoding, some compiling we should now have a package called SFEvim.pkg in ~/jdsuser/packages/PKGS/SFEvim.pkg, which we can install and copy to other solaris 10 boxens to be installed there as well as usual with pkgadd. On our box its already installed. Would we have wanted not to install it, pkgtool would have required the command build-only instead of build, and we would have had to build and install SFEctags and SFEcscope first and than just create the SFEvim package.
Congrats for building your first SFE based SVR4 package.
Blogged with the Flock Browser