SPITE - Simple Packager and Installer for Tcl Extensions
Directions to find it at Stu
Stu 2015-05-20 Version 0.3.
Release notes
Spring 2015 - Version 0.3 Updated license to ISC. New command -> is an alias for addfile New command license to specify license type (default ISC) Added ability to install files as Tcl Modules Added ability to create links Files can be added but not installed. Specify dir "". New mask types: "" defaults to "data" "none" won't chmod the file when installing New file types: "tclmodule" the file may be installed as a Tcl module "pkgindex" the file won't be installed if installing Tcl modules Winter 2012 - Version 0.2 Added command line option -f to specify spite.conf file
2014 - Version 0.1
README SPITE - Simple Packager and Installer for Tcl Extensions 2004-2015 Stuart Cassoff <[email protected]> SPITE is a utility to package Tcl scripts and other files for easy distribution and installation. SPITE is designed mainly for unix systems. SPITE takes a list of files and puts them and the installer code into a shell script. This shell script may then be used to install the files. The idea behind SPITE is to provide a simple way to distribute mostly non-binary Tcl extensions consisting of a handful of text files. Textual input files must terminate with a newline or SPITE will break. When installing files of type 'tclscript', the installer will pass the file through sed with one or both of the following regexps: "1,5s/exec .*tclsh^*/exec ${TCLSH}/g" "1,5s/exec .*wish^*/exec ${WISH}/g" This requires sed and mktemp on the target system. Checksumming may be disabled during install with --sum "" Requires Tcl 8.5+ Usage: spite -f configfile Will write to stdout a .spite installer file based on the configuration in configfile. BUGS For directories, ownership is changed only for the last dir in a path.
Fully documented config file (spite.conf):
Example usage:
$ gunzip < spite-0.2.spite.gz | sh -s -- --help SPITE 0.2 Installer for * SPITE - Simple Packager and Installer for Tcl Extensions * Useage: sh --install option value ... Install options: --install Perform installation --appdir dir Usually the name of the app spite --prefix dir Install prefix /usr/local --bindir dir Executable files dir $prefix/bin --libdir dir Library files dir $prefix/lib --scriptdir dir Script files dir $prefix/lib/spite --mandir dir Man files dir $prefix/man --docdir dir Documentation files dir $prefix/share/doc/$appdir --exdir dir Example files dir $prefix/share/examples/$appdir --confdir dir Configuration files dir $prefix/lib/spite --tmp dir Dir used during installation for temporary files /tmp --user user Install files as user:group User and group must --group group both be specified if "chown" is to be performed --datamask mask Mask for data files 0444 --scriptmask mask Mask for executable files 0555 --tclsh file Path to tclsh --wish file Path to wish --sed file Sed program sed --sum file Checksum program ("" will disable checksumming) md5 --destdir dir Super-prefix installation dir, does not affect --tmp --quiet Do not display installation messages --fake Show messages, do not perform actions --info Display program info --readme Display readme --license Display license --help This information $ gunzip < spite-0.2.spite.gz | sh -s -- --info COMMENT : SPITE - Simple Packager and Installer for Tcl Extensions AUTHOR : Stuart Cassoff VERSION : 0.2 HOMEPAGE : http://fivetones.net/software/ DISTFILE : http://fivetones.net/software/spite-0.2.spite.gz $ mkdir /tmp/test $ gunzip < spite-0.2.spite.gz | sh -s -- --destdir /tmp/test --install Installing /tmp/test/usr/local/share/doc/spite/LICENSE : sum ok Installing /tmp/test/usr/local/share/doc/spite/README : sum ok Installing /tmp/test/usr/local/bin/spite : sum ok Installing /tmp/test/usr/local/share/examples/spite/spite.conf : sum ok It's also possible to install over the 'net using http or wget: $ echo 'package require http; set r [http::geturl http://www.mysite.net/mydir/spite-0.2.spite.gz -binary 1]; fconfigure stdout -translation binary; puts -nonewline stdout http::data $r' | tclsh | gunzip | sh -s -- --install $ wget -q -O - http://www.mysite.net/mydir/spite-0.2.spite.gz | gunzip | sh -s -- --install