Chapter 2. Getting started

Table of Contents

Installing list2pkg
Prerequisites
Extracting the tarball
Building the documentation
Running the installation script
Creating your first package
The file list
The package tree
The package file
Putting it all together
The package's content

Installing list2pkg

Prerequisites

You need a UNIX-like system for list2pkg to work. I have tested it on GNU/Linux, but other systems should work as well. You will also need root access on that system, since otherwise some ownership information might not be correctly preserved.

Dependencies

list2pkg relies on a few external tools to do its job properly. Most of them should already be installed on your system. They are listed below.

Extracting the tarball

First, extract the list2pkg tarball and cd to it.

    $ tar -xf <Your .tar.gz file>
    $ cd <filename without .tar.gz>
  

Building the documentation

If you have downloaded a release tarball, you should skip this step, since the html and man documentation has already been compiled for you. Otherwise, you can build the documentation by doing the following.

    $ ./helpers/build-doc.sh .
  

Running the installation script

Installing list2pkg is very simple: you just have to invoke the install.sh script. First, you must choose where you want list2pkg installed. There are several variables you can give to the installation script to change that.

  • PREFIX: The installation prefix, defaulting to /usr/local. All list2pkg files will be installed there.

  • SYSCONFDIR: The system configuration directory, defaulting to ${PREFIX}/etc. The list2pkg configuration file will be installed there.

  • DOCDIR: Where list2pkg's documentation will be installed. It defaults to ${PREFIX}/share/doc

  • MANDIR: Where list2pkg's manpages will be installed. It defaults to ${PREFIX}/share/man

For example, to install list2pkg in a /usr prefix and the configuration file in /etc, you can do

    $ sudo PREFIX=/usr SYSCONFDIR=/etc ./install.sh