package/uninstall software

From: Mike's List (mikelist@sky.net)
Date: Thu Apr 18 2002 - 12:51:02 EDT


Andrew J Caines forwarded step-by-step for package create/install,
it might be useful for some who prefers package installation.
step-by-step, command-by-command, this is how it should be ;)
Thought this might be useful in the archive, to be search for later...

- Mike

---------- Forwarded message ----------

Mike,

The easiest way is to package what you just installed and add the package.
When the time comes to deinstall, you can just pkgrm it.

Something like this should work pretty well:

# make
# touch /tmp/timestamp
# make install
# NAME=MYpkg
# EXT="-sol8"
# VERSION=1.23
# BASEDIR=/usr/local
# cd $BASEDIR
# echo 'i pkginfo' > prototype
# find . -newer /tmp/timestamp | pkgproto >> prototype
# cat > pkginfo << EOF
PKG=$NAME
VERSION=$VERSION
BASEDIR=$BASEDIR
ARCH=sparc
CATEGORY=application
CLASSES=none
NAME=The Software
DESC=Software to do stuff
VENDOR=The Vendor - www.vendor.tld
EMAIL=support@vendor.tld
PSTAMP=foobar$(date +%Y%m%d)
EOF
# pkgmk -r $PWD
# cd /var/spool/pkg/
# pkgfile=/path/to/packages/$NAME-$VERSION$EXT.pkg
# pkgtrans -s $PWD $pkgfile
# pkgadd -d $pkgfile

You should of course check the prototype file to remove any stray files
you may have picked up.

Adjust you find and BASEDIR accordingly if you have files outside
somewhere like /usr/local or /opt. For / it's better to specify specific
directories to search, eg.

# BASEDIR=/
# find /usr/bin /etc/*.d /var/foobar -newer /tmp/timestamp | pkgproto >> prototype
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:24:13 EDT