Porting Software to SXCE » Creating a Development Desktop on SXCE
en

Creating a Development Desktop on SXCE

The SunStudio and SFE way

Introduction

This will probably not fit everybodies idea of a developers desktop but its what I use and can document here. 

What do I need for my desktop ?

- Solaris Express Community Edition
- Latest Sunstudio Express
- a slightly pathed version of JDS-CDE (pkgbuild, pkgtool, etc)
- a fresh checkout of spec-files-extra

So lets install it

First the OS

Download SXCE and install it on your workstation. Take care to have (especially if you need to work on c++ stuff) around 2GB of SWAP available.
To do any proper work you will need space on the following partitions:

/opt -- around 2G to keep sunstudio express and all the jds0-cbe stuff
home partition -- enough space to build packages, checkout the SFE repository and your usual stuff. It is usually about 5-10G on my boxes.
enough space on /usr and /opt to install all the packages your heart desires. I usualy leve around 20 -25GB for /usr and about 10 - 15 on /opt for larger packages  that do not go into /usr.

Everything else is left to your taste, but I wouldn't recommended installing the included SunStudio Express and netbeans version since they create links into /usr/bin that interfere if you need multiple sunstudio versions on your box.

Now mount the SXCE DVD cause we will need it in a later stage.

Now the IDE

Download and install the latest Sunstudio Express. I tend to install the tar based version in /opt/ssexpress so that /opt/SUNWspro can still contain the standard SunStudio version, but I will talk about the standard version later.
Pretty simple stuff.

And the tools

Before we go ahead and install the tools you will need to decide which user will be developing on this system and adjust his permissions. Lets say we call him 'sfeporter' for now. SO we need to do:

    usermod -P "Software Installation" sfeporter

to allow this user to install software packages. This is necessary to be able to do full builds on creating packages and also to install dependencies when required.

Now download the JDS-CBE sources and lets install them after some small tweaks.

Extract the downloaded archive somewhere where you want to build it, it will need some space since it will create a couple of packages as well.
Change into the directory the unpacking process created called jds-cbe-1.6.0.
We will need to edit the file cbe-install but before we do that we need to change its permissions. So go ahead and do a

    chmod 755 cbe-install

and than open the file cbe-install in your favorite editor and remove the word:

    SUNWsmbaS.

Save the file and run it emoticon_smile

The install will ask for an installation directory, agree with it. It will complain about the compiler version not being the recommended one, ignore that and answer yes when it asks you if you want to use this compiler anyway.
CBE will now install all required optional packages as well as create some new ones and install them in /opt/jdsbld.
Now we need to do some more quirks.
JDS-CBE was made for an older SXCE version, so it installs old versions of tools that are already part of the newer SXCE versions. We will need to fix that, deinstall the old versions and create some symbolic links to some of the newer versions of the tools.

Lets start with deleting what is not needed.

    pkgrm CBEautomake CBEautoconf CBElibtool CBEsvn

Now lets create symbolic links from the new versions in Nevada to jdsbld

    ln -s /usr/bin/automake-1.10 /opt/jdsbld/bin/automake
    ln -s /usr/bin/aclocal-1.10 /opt/jdsbld/aclocal

et voila ... we have a working JDS-CBE environment on our box.

Final Touches

Since I am a lazy person I tend to incldue the necessary environment script call for the usage of jds-cbe into the .bashrc of the sfeporter user. To do that, change into his home directory 

    cd /export/home/sfeporter

and add the env.sh script from jds-cbe into his .bashrc and .bash_profile

    echo ". /opt/jdsbld/bin/env.sh" >> .bashrc
    echo ". /opt/jdsbld/bin/env.sh" >> .bash_profile

Usage

If you followed my final touch part, you are all set and can use the sfeporter to build and develop to your hearts desire. Otherwise you will need to do a:

    . /opt/jdsbld/bin/env.sh

each time you open a terminal, start a shell, or call the sunstudio ide.

If you want to utilize all the work done by the spec-file-extra people, you can checkout their repository via subversion, and use their spec files as examples to create your own. To do this, create yoruself a Projects directory, change into it and checkout the SFE repository to your local machine.

    mkdir Projects
    cd Projects
    svn co https://pkgbuild.svn.sourceforge.net/svnroot/pkgbuild/spec-files-extra/trunk SFE

now you have the whole repository in your Projects/SFE directory.

As a first hint, you can create packages out of every specfile in the SFE directory by simply doing a:

    pkgtool ~--download ~--interactive build-only <SFEspecfile>

It will download and build the package and you will find it  in a directory in your /packages/PKGS directory.

Good luck and I will add another Doc about how to use and create spec files in another doc.

Further Reading emoticon_wink

Tags:
Created by admin on 2009/10/26 12:11
Last modified by admin on 2009/10/26 12:11

XWiki Enterprise 2.7.1.34853 - Documentation