jucrenv
From Genunix
Welcome
This tutorial will help you to setup a "jucr environment"!
Note1: this is a copy-paste tutorial
Note2: there is a script whose IPS extensions have been inspired by this tutorial. It automates the setup for a not identical but similar build enviroment (by tomww): [bootstrap-sfe-latest-os20nn]
First Step: install required packages
Note: the list can be incomplete!
pfexec pkg install ss-dev gcc-dev SUNWgpch SUNWhea SUNWsfwhea SUNWwget SUNWgtar \
SUNWxwinc SUNWxorg-headers SUNWpkgcmds SUNWperl-xml-parser \
SUNWgmake SUNWgnu-automake-110 SUNWgnome-doc-utils \
SUNWgsed SUNWgawk SUNWgnu-diffutils SUNWgnu-coreutils \
SUNWgnome-base-libs SUNWgnome-common-devel SUNWgnu-gettext
Second Step: create directories
pfexec mkdir -p /opt/dtbld/{bin,lib/cbe-env}
mkdir ~/tmp
this directory will contain .spec files, includes etc.
mkdir ~/jucrdev cd ~/tmp
Third step: a
this tarball contains some needed stuff, like: symlinks, directory structure, exmples
wget http://pkgsrc.sartek.net/jucrenv.tar.gz gtar xf jucrenv.tar.gz cd jucrenv pfexec cp dtbld/bin/* /opt/dtbld/bin/ pfexec cp dtbld/lib/cbe-env/default /opt/dtbld/lib/cbe-env/
You will need to execute this command every time before you are building a package!
. /opt/dtbld/bin/env.sh
Third step: b
cd .. wget http://prdownloads.sourceforge.net/pkgbuild/pkgbuild-1.3.101.tar.bz2 gtar xf pkgbuild-1.3.101.tar.bz2 cd pkgbuild-1.3.101 ./configure --prefix=/opt/dtbld make pfexec make install cp -r ~/tmp/jucrenv/jucr/* ~/jucrdev/ cd ~/jucrdev cp ~/tmp/jucrenv/jucr/.pkgtoolrc . rm -rf ~/tmp
the default path for downloaded sources + etc is /export/home/<userid>/packages, you can change this with this command:
echo "%_topdir /export/home/`whoami`/jucrbld" > ~/.pkgbuildmacros mkdir ~/jucrbld
DONE
Now try to build a .spec file:
NOTE: pkgbuild can't install required packages wit 'pkg' so you will need to install them manually
Fourth step:
let's try to build a .spec file but before this you'll need to:
pfexec svcadm enable pkg/server pfexec pkg set-publisher -O http://localhost localhost
or
pfexec pkg set-authority -O http://localhost localhost
if you are running the 2008.11 release
pkgtool build --download gedit-plugins.spec
if no problems pkgbuild will publish your package to the local IPS repo: http://localhost
Last step
Create your own specs! You will find a template.spec in ~/jucrdev .. so
cp template.spec yourpackage.spec
and start editing!
