SPITE - Simple Packager And Installer for Tcl Extensions Directions to find it at [Stu] README: SPITE is a utility to package Tcl scripts and other text 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 in to a shell script. This shell script may then be used to install the extension. 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 me disabled during install with --sum "" Useage: 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): # SPITE config file # # 2004 - Stuart Cassoff # # This config is very simple. # This file is [sourced] by spite. # Errors should show up quickly. # # This will appear at the top of the spite file # default is "" comment "SPITE - Simple Packager and Installer for Tcl Extensions" # Destination dir tail # Probably the name of the program # Almost always needed # default is "" appdir spite # Version info # default is "" version 0.1 # Author info # default is "" author "Stuart Cassoff" # Homepage url # default is "" homepage "http://www.fivetones.net/software/" # Distribution file url # default is "" distfile "http://www.fivetones.net/software/spite-0.2.spite.gz" # Base dir for source files # default is "." #srcdir /home/stu/tcl/netutil # Install prefix # default is "/usr/local" #prefix /opt # Bin dir # Installed as $prefix/$bindir # default is 'bin' # Lib dir # Installed as $prefix/$libdir # default is "lib" #libdir mylibdir # Script dir # If "" - this will become $libdir/$appdir # default is "" #scriptdir myscriptdir # Man dir # Installed as $prefix/$mandir # default is "man" #mandir mymandir # Doc dir # Installed as $prefix/$docdir # default is "share/doc" #docdir mydocdir # Example dir # Installed as $prefix/$docdir # default is "share/examples" #docdir myexampledir # Configuration dir # If "" - this will become $libdir/$appdir # default is "" #confdir myconfdir # Mask for datafiles # default is "0444" #datamask 0644 # Mask for script files # default is "0555" #scriptmask 0755 # Name of program to checksum files. # set to "" will turn off checksumming # default is "md5" #sum rmd160 #sum "" # How to encode binary files # default is "uuencode -p" #encode "base64 -e" # How to decode binary files # default is "uudecode" #decode "base64 -d" # Add files to install # addfile sname dir mask ?type? ?iname? # "sname" is where file is located now (source name) # relative to "srcdir" # destdir for file is "prefix" + "dir" # If destdir is one of appdir, bindir, libdir, # scriptdir, mandir, docdir or exdir then # the named dir from the setup will be used. # "mask" is numerical mask or name # "mask" type "data" will use "datamask" # "mask" type "script" will use "scriptmask" # # "type" can be "tclscript", "binary", "text", # "readme", "license" or "" # # # if "type" is "tclscript" it will be treated the same # as "text" except that tclsh/wish path resolution will # be performed during install # # if "type" is "readme" it will be treated the same # as "text" except that it will enable a command line # option allowing the user to view the readme before installing # # if "type" is "license" it will be treated the same # as "text" except that it will enable a command line # option allowing the user to view the readme before installing # # if "type" is "binary" then the file will be uuencoded/decoded # if "type" is "text" or "" then normal processing will occur # # sname destdir mask type iname #---------------------------------------------------------------------- addfile ../common/LICENSE docdir data license addfile README docdir data readme addfile spite.tcl bindir script tclscript spite addfile spite.conf exdir data #---------------------------------------------------------------------- # EOF