# STklos Reference Manual 11. The ScmPkg Package System

Contents
| *Top*
1 | Introduction
2 | Expressions
3 | Program structure
4 | Standard Procedures
5 | Regular Expressions
6 | Pattern Matching
7 | Exceptions and Conditions
8 | STklos Object System
9 | Threads, Mutexes and Condition Variables
10 | Customizations
11 | The ScmPkg Package System
11.1 | ScmPkg "tutorial"
11.2 | stklos-pkg options
12 | Foreign Function Interface
13 | Using the SLIB package
14 | SRFIs
15 | Index
| Bibliography
> | ScmPkg is a package distribution system for Scheme. It is currently supported by Bigloo and Stklos. This package system provides new APIs to Scheme (e.g., network programming, cryptography, encoding, ...) and it manages automatic package installation, deinstallation and testing. ### 11.1 ScmPkg "tutorial" `stklos-pkg` is the command which gives access to ScmPkg in STklos. This is the only command necessary to manage ScmPkg packages. For instance, this command manages a local cache of the ScmPkg server, permits (de)installation of ScmPkg packages, the test of packages, ... To start, we can synchronize our local repository with the ScmPkg servers. This can be done by the following command:
>     $ stklos-pkg --sync
> This will download a description of the ScmPkg packages which are available. The list of these packages can be displayed with:
>     $ stklos-pkg --list
>     _bigloo-1.0.1 (tuning)
>     _bigloo-regexp-0.0.1
>     _bigloo-stdlib-0.0.1 (tuning)
>     _chicken-0.0.1 (tuning)
>     _chicken-net-0.0.1 (tuning)
>     _chicken-os-0.0.1
>     rfc3339-0.2.0
>     srfi1-0.0.1 (tuning)
>     $
> Packages whose name start by an underscore are packages needed for alien language support (e.g. the package "_bigloo" is necessary to run a package written in the Bigloo Scheme dialect, or the package "_chicken-net" is necessary for the packages using the network primitives of the Chicken Scheme dialect). Some packages my offer a tuning. A tuned package is a package which has been specially tuned for STklos (e.g. the generic "srfi1" package which implement SRFI-1 has been tuned to be more efficient in STklos) To download a new package (and all its dependencies), one can simply issue the following command:
>     $ stklos-pkg --extract PKG --directory /tmp/Test
> This command downloads the package PKG, it dependencies and (eventually) its tuning. It also creates a `Makefile` for compiling the package. The `--directory` option specifies where the files must be extracted in the `/tmp/Test` directory (instaed of the current directory). The generated `Makefile` offers the following main targets all : the default target test: to launch the package tests install: to install the package for the user system-install: to install the package system wide (privilegied access rights are probably needed) To test a package, one can also use the following command:
>     $ stklos-pkg --test PKG
> This downloads the necessary files in a temporary directory, and launches the tests of the package PKG To install a package, one can also use the following command:
>     $ stklos-pkg --install PKG
> This downloads the necessary files in a temporary directory, and installs the package PKG This completes the basis ScmPkg tutorial. See below for the list of all `stklos-pkg` options ### 11.2 stklos-pkg options Here are the options supported by the `stklos-pkg` command
>     Usage: stklos-pkg [options] [parameter ...]
>     Actions
>       --extract=<pkg>, -e <pkg>    Extract <pkg>. Don't install it
>       --test=<pkg>, -t <pkg>       Test <pkg>.
>       --install=<pkg>, -i <pkg>    Extract, compile, Install <pkg>.
>       --uninstall=<pkg>            un-install package <pkg>
>     Repository administration
>       --sync, -s                   synchronize with remote server servers
>       --add=<sb>, -a <sb>          Add <sb> pkgball to the local repository
>       --download=<pkg>             download <pkg>
>       --fill-cache                 fill cache with available distant packages
>       --clear-cache                delete packages present in cache
>       --reset                      reset stklos-pkg repository. USE WITH CAUTION
>       --build-sync-file=<dir>      Build a synchronization file from <dir>
>     Informations
>       --list, -l                   list available packages
>       --depends=<pkg>              Show all the dependencies of <pkg>
>       --installed                  Show installed packages
>     Misc
>       --conf-dir=<dir>, -D <dir>   Use <dir> as stklos main configuration directory
>       --directory=<dir>, -C <dir>  Change to directory <dir> (extract/download)
>       --verbose, -v                be verbose (can be cumulated)
>       --system-wide, -S            do a system wide (de)installation
>       --version, -V                print the version and exit
>       --help, -h                   display this help
>       --options                    display program options
>       --cp                         INTERNAL USE ONLY. Do not use this option

This Html page has been produced by Skribe.
Last update Sat Dec 31 15:49:34 2011