Wednesday, October 14, 2009

Solaris packaging

murugaia_default [murugaia@blrmimsbuild1] /tmp/cmbuildtest> pwd
/tmp/cmbuildtest

murugaia_default [murugaia@blrmimsbuild1] /tmp/cmbuildtest> ls -lrt
total 64
-rwxr-xr-x 1 murugaia bhmobile 247 Oct 14 13:00 pkginfo*
-rw-rw-r-- 1 murugaia bhmobile 0 Oct 14 13:04 depend
drwxrwxr-x 2 murugaia bhmobile 185 Oct 14 13:08 bin/
-rwxr-xr-x 1 murugaia bhmobile 326 Oct 14 13:08 prototype*
-rwxr-xr-x 1 murugaia bhmobile 809 Oct 14 13:51 checkinstall*
murugaia_default [murugaia@blrmimsbuild1] /tmp/cmbuildtest>

murugaia_default [murugaia@blrmimsbuild1] /tmp/cmbuildtest> cat pkginfo
PKG=CMBuild
ARCH=SPARC
NAME=cmbuildtest utility is installed by this package
VERSION=1.0.1
CATEGORY=application
BASEDIR=/tmp/cmbuildtest/ PATH=/opt/CMBuild/bin/cmbuildtest /opt/CMBuild/install/checkinstall /opt/CMBuild/install/depend CLASSES=none

murugaia_default [murugaia@blrmimsbuild1] /tmp/cmbuildtest> cat depend

murugaia_default [murugaia@blrmimsbuild1] /tmp/cmbuildtest> find bin
bin
bin/cmbuildtest

murugaia_default [murugaia@blrmimsbuild1] /tmp/cmbuildtest> cat prototype
d none /opt 0755 root bin
d none /opt/CMBuild 0755 root bin
d none /opt/CMBuild/bin=bin 0755 root bin
d none /opt/CMBuild/install=install 0755 nobody bin
f none /opt/CMBuild/bin/cmbuildtest=bin/cmbuildtest 0755 root bin
i pkginfo
i checkinstall
s none /usr/bin/cmbuildtest=/opt/CMBuild/bin/cmbuildtest 0755 root bin
i depend

murugaia_default [murugaia@blrmimsbuild1] /tmp/cmbuildtest> cat checkinstall
# checkinstall script for IMStest
#
# This confirms the existence of the required SUNWcsu package
# First find package has been installed.
pkginfo -q CMBuild
if [ $? -eq 0 ]; then
echo "No SUNWcsu package can be found. Please install the"
echo "package and try this installation again."
exit 3 # Stop here
else
echo "The dependent package SUNWcsu is present on the system."
fi
# Now look for the wget file before proceeding with this installation
cmbuildtest --version
if [ $? -eq 0 ]; then
echo "wget file already present in the system."
echo " Do you want to still install?(y/n)- :c"
read response
if [ $response = y ]; then
echo "Lets proceed to install."
fi
else
echo "#################### wget currently not installed. ####################"
echo "Proceeding with the package installation."
exit 0
fi
murugaia_default [murugaia@blrmimsbuild1] /tmp/cmbuildtest>

murugaia_default [murugaia@blrmimsbuild1] /tmp/cmbuildtest> pkgmk -o -r `pwd`
## Building pkgmap from package prototype file.
## Processing pkginfo file.
WARNING: missing directory entry for
WARNING: missing directory entry for
WARNING: parameter set to "blrmimsbuild120091014135329"
## Attempting to volumize 6 entries in pkgmap.
part 1 -- 53 blocks, 22 entries
## Packaging one part.
/var/spool/pkg/CMBuild/pkgmap
/var/spool/pkg/CMBuild/pkginfo
/var/spool/pkg/CMBuild/root/opt/CMBuild/bin/cmbuildtest
/var/spool/pkg/CMBuild/install/checkinstall
/var/spool/pkg/CMBuild/install/depend
## Validating control scripts.
WARNING: script may require user interaction at line <21>.
## Packaging complete.


bash-3.00# pkgtrans . /tmp
The following packages are available:
1 CMBuild cmbuildtest utility is installed by this package
(SPARC) 1.0.1
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:
Transferring package instance
bash-3.00# ls -lrt /tmp grep CMBuild
drwxr-xr-x 4 root root 369 Oct 14 14:04 CMBuild
bash-3.00#

No comments:

Post a Comment