Creating i-Packages


NAME

iibless, perl script to turn directory into valid i-Package


SYNOPSIS

Given a directory with package contents (which can be anything), iibless will create the necessary extra contents that turns the directory into a valid i-package bundle. This documentation has been created automatically from the script itself.


DESCRIPTION

Format

The i-Package format is a directory (bundle) containing a set of files and no subdirectories.

The name of the bundle should end on ``.ii2''. For the remainder of this description, a package name of ``foo.ii2'' will be used.

The following files are required to exist inside the bundle to make a valid i-Package and these are generated by iibless:

The following files are standard files of an i-Package. Each is optional, but their availability define the functionality of the i-Package:

For al scripts/programs above holds that their function is not guarantueed. It is only convention to let the foo.remove script or program do an uninstall of the i-Package. It could do quite other things if the i-Package maker decides to.

Table of Contents

The file foo.plist contains the Table of Contents for the package. This is a Mac OS X format property list with the following entries:

iiversion
The version of i-Installer this i-Package is intended for.

timestamp
The date that iibless was run on the i-Package bundle in seconds since Jan 1 1970, 00:00.

name
The i-Package name

default_url
The default remote location where the contents of this this i-Package can be downloaded (if missing) or updated.

install_location
The default location where the contents of this i-Package should be installed. The directory will be created if it does not exist yet.

relocatable
A boolean that defines if the user is allowed to select a different install_location.

adminrequired
A boolean that defines if unrachiving the i-Package archive or running any of the programs and scripts (including a few internal functions like the creation of a missing install_location directory) is required.

interactive
A boolean that defines if i-Installer should launch a server to listen to requests from the programs or scripts for user interaction through the doalerter program (which is available in the i-Installer application bundle.

files
A dictionary containing for every file in the package (with the exception of the Table of Contents of course):
file
The name of the file

size
The size of the file in bytes

executable
If the file needs the execute permission bit set

md5
The MD5 checksum of the file

sig (optional)
The GPG signature of the file.

dependencies (optional)
The running of the prepare, remove or configure script or program may require the availability of certain other files of the i-Package. For each of thses actions, a list may be given with these file dependencies. this enables i-Installer to download all files necessary for a certain action but nothing more. Default dependencies are of course the scripts or programs self and for unarchiving the archive. i-Installer takes care of these without the requirement of the dependencies.

pkgdependencies
An array containing dependencies for this package. The array elements contain (note: the following items are all part of the pkgdependencies, but Apple Help does not always indent them correctly):
include
Either AND, XOR or NOT. If AND then all packages in the array element are required. If XOR, then one and only one of the packages in the array element are required and NOT then non of the packages in the array element should be installed.

optional
A boolean that defines if this array element is optional. This turns ``required'' in the previous item description into ``recommended''.

reason
The reason for this set.

set
A dictionary of package descriptions. The key of each entry is the package basename without the ``.ii2'' extension. The value is another dictionary containing:
displayname
A user-friendly name of the package.

installlocation
Where the package should be installed.

relocatable
If the package is relocatable. If the package is relocatable, the install location of the package that is checking will be used. Otherwise, the fixed location installlocation will be used. Example, if texbinaries and texbinaries-experimental are packages that exclude the other (they each have a NOT for the other) but they are relocatable, they may only not be installed at the same install location. If ghostscript-6 and ghostscript-7 are likewise mutually exclusive but they both have a fixed and nonrelocatable install location, they should not be installed together on the system at all, even if their respective install locations would differ.

Arguments and Flags

Usage:

iibless --man

iibless --htmlman

iibless [--verbose[=i]] [--keyid=s] [--keyserver=s] [--preparedep=s] [--removedep=s] [--configuredep=s] [--pkgdependencies=s] pkgname iidirname installlocation url adminrequired relocatable interactive

Arguments

pkgname
Setting for name in the ``Table of Contents''

iidirname
Directory to turn into i-Package bundle

installocation
Setting for install_location in the ``Table of Contents''

url
Setting for default_url in the ``Table of Contents''

adminrequired
Setting for adminrequired in the ``Table of Contents''

relocatable
Setting for relocatable in the ``Table of Contents''

interactive
Setting for interactive in the ``Table of Contents''

Options:

--man
Output the documentation in man page format, suitable for `less'

--htmlman
Output the documentation in HTML format

--verbose, --verbose=2
Set verbosity of program.

--keyid=F6DF6ED2
Use keyid F6DF6ED2 for a gpg detached sig for all files.

--keyserver=http://wwwkeys.nl.pgp.net
Set this keyserver to use for this package

--preparedep=s
Comma-separated list of files that the prepare script depends on

--removedep=s
Comma-separated list of files that the remove script depends on

--configuredep=s
Comma-separated list of files that the configure script depends on

--pkgdependencies=s
A file that contains the package dependencies. The file should be in ASCII Property List format. The outer level is an array. Note: an extra semicolon is needed at the end of the array.

Example:

        iibless --keyid=iinstaller@rna.nl --verbose=2 \
            --pkgdependencies=bzip.dependencies.plist \
            'BZIP2 Library and Tools' bzip2.ii2 \
            /usr/local http://tug.org/i-packages/bzip2.ii2 \
            YES NO YES

This will bless the directory bzip2.ii2, give the package the name BZIP2 Library and Tools set it to authentication required, relocation not allowed and with interaction enabled. It will sign the package files with GPG key iinstaller@rna.nl and produce quite a bit of progress output.


EXAMPLE Table of Contents

    {
        "iiversion" = "2";
        "timestamp" = "1038872467";
        "name" = "wvWare (Word Conversion Tools)";
        "default_url" = "http://tug.org/i-packages/wvWare.ii2";;
        "install_location" = "/usr/local";
        "relocatable" = "NO";
        "adminrequired" = "YES";
        "interactive" = "YES";
        "files" = {
                "wvWare.dependencies.plist" = {
                            "file" = "wvWare.dependencies.plist";
                            "size" = "1373";
                            "executable" = "";
                            "md5" = "MD5(wvWare.dependencies.plist)= 4da8bb786dbc2b92ddbdc07c7002e8f4";
                            "sig" = "-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.0.7 (Darwin)\n\niD8DBQA96++TnQPbcMh6tfwRAgA5AKCA/xXlL7KC+JslAahZ5Tf4LKnDvQCeNQHH\ndt69CtV+YQlL5XqXLFlv83s=\n=ttJC\n-----END PGP SIGNATURE-----\n";
                        };
                "wvWare.tar.bz2" = {
                            "file" = "wvWare.tar.bz2";
                            "size" = "2433687";
                            "executable" = "";
                            "md5" = "MD5(wvWare.tar.bz2)= e8924138f91314ba72bfa7d4c1ba212a";
                            "sig" = "-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.0.7 (Darwin)\n\niD8DBQA96++UnQPbcMh6tfwRAhO9AJ9FvLXK8/p1RyMkgZbbNcenodfyDACgu4ha\nXLgNM1JplxCqqA9pJLJRqM8=\n=52D5\n-----END PGP SIGNATURE-----\n";
                        };
                "wvWare.rtf" = {
                            "file" = "wvWare.rtf";
                            "size" = "1694";
                            "executable" = "";
                            "md5" = "MD5(wvWare.rtf)= 14d058b6fe98a0b2333ab533e1f90d04";
                            "sig" = "-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.0.7 (Darwin)\n\niD8DBQA96++UnQPbcMh6tfwRAm3LAJ9ajp5TVNevUOdi8GxmMOfcO3VkjgCfQYWS\nRdH32rpCG2zhpTac5m6UcIY=\n=I9tp\n-----END PGP SIGNATURE-----\n";
                        };
                "wvWare.prepare" = {
                            "file" = "wvWare.prepare";
                            "size" = "1919";
                            "executable" = "1";
                            "md5" = "MD5(wvWare.prepare)= aa9c46e8ed9163f399aa1488ac4ee35c";
                            "sig" = "-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.0.7 (Darwin)\n\niD8DBQA96++UnQPbcMh6tfwRAnssAJ9TiFmHkmewvjfHwhgaQzDPY00SzwCgoiY7\nySsjSM0U81xYJrjaX941w2Q=\n=QbY/\n-----END PGP SIGNATURE-----\n";
                        };
                "wvWare.stamp" = {
                            "file" = "wvWare.stamp";
                            "size" = "11";
                            "executable" = "";
                            "md5" = "MD5(wvWare.stamp)= b6ca20739833c2d94838aade10fec778";
                            "sig" = "-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.0.7 (Darwin)\n\niD8DBQA96++UnQPbcMh6tfwRAhaLAKCL7LHNDog5UHeQ/Q8OcoTxQ74ZxACfSn85\nd3AFctC3qZ9+oUQnLpMptao=\n=LfRk\n-----END PGP SIGNATURE-----\n";
                        };
                "wvWare.l.bz2" = {
                            "file" = "wvWare.l.bz2";
                            "size" = "1988";
                            "executable" = "";
                            "md5" = "MD5(wvWare.l.bz2)= cacf8bb5877395e184c65ba305e52a7b";
                            "sig" = "-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.0.7 (Darwin)\n\niD8DBQA96++UnQPbcMh6tfwRAuetAJ99xKglIyXhUKSb/tDVs8q2XLUP4QCeJn79\nt1WcdeM2gMOsEafaWZvQNg8=\n=KM8B\n-----END PGP SIGNATURE-----\n";
                        };
                "wvWare.remove" = {
                            "file" = "wvWare.remove";
                            "size" = "1862";
                            "executable" = "1";
                            "md5" = "MD5(wvWare.remove)= 3553b67f98fd732d5f922249cb9a185e";
                            "sig" = "-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.0.7 (Darwin)\n\niD8DBQA96++UnQPbcMh6tfwRAh5fAJ9corhKdqeCphcmfIdhyq4U0cBKKQCguDAq\nYXfafuUlhRg7V22D2EZi8nU=\n=OiZx\n-----END PGP SIGNATURE-----\n";
                        };
            };
        "pkgdependencies" = (
        {
            optional = NO;
            include = "AND";
            reason = "wvWare has been linked dynamically against libwmf+iconv";
            set = {
                libwmf = {
                    displayname = "libwmf + iconv conversion library";
                    installlocation = "/usr/local";
                    relocatable = NO;
                };
            };
        },
        {
            optional = YES;
            include = "AND";
            reason = "wvWare cannot function properly without TeX";
            set = {
                "texbinaries" = {
                    displayname = "TeX Programs";
                    installlocation = "/usr/local/teTeX";
                    relocatable = YES;
                };
                "texmf" = {
                    displayname = "TeX Foundation";
                    installlocation = "/usr/local/teTeX";
                    relocatable = YES;
                };
            };
        },
        {
            optional = YES;
            include = "XOR";
            reason = "wvWare cannot convert to PostScript or PDF without Ghostscript";
            set = {
                "ghostscript-6" = {
                    displayname = "Ghostscript 6 Interpreter";
                    installlocation = "/usr/local";
                    relocatable = NO;
                };
                "ghostscript-7" = {
                    displayname = "Ghostscript 7 Interpreter";
                    installlocation = "/usr/local";
                    relocatable = NO;
                };
            };
        }
    );
  }