Table of Contents

src2pkg for the impatient

The following instructions presume at least a basic understanding of:

  1. Linux (!)
  2. Software packages & their installation on your system
  3. Experience building programs from source is helpful, but not required

src2pkg has been developed to make it as easy as possible to go from a single source archive to a single installable package. It is not, however, a substitute for package-making experience and understanding.

For a more complete picture, try the tutorial.

Download & install

Download the Slackware package here.

Install as root, with:

~# installpkg src2pkg-*.tgz

After installation, while still root:

~# src2pgk --setup

Put the kettle on.

Setup & Preparation

It's advisable to set up a clean working area to keep your source if you don't have one already, and doubly advisable to do so as a user, not root.

~$ mkdir src

Next, take a look at the configuration file just installed.

~$ less /etc/src2pkg/src2pkg.conf

The important part we need to know is on line 185:

## Working Directories
# The default settings for these are like for Slackware SlackBuilds:
#
# The tarball, or link to it, is in the current directory 
# SOURCES_DIR="$CWD"
# Sources are unpacked and built in /tmp
# SRC_BUILDS_DIR="/tmp"
# The package build tree is also in /tmp
# PKG_BUILDS_DIR="/tmp"
# Finished packages are left in /tmp
# PKG_DEST_DIR="/tmp"

Read the rest of the file for details. Now we know most of what's going to happen is going to happen in /tmp .

Make tea.

Package building

Push the button, make the noise:

~/src$ src2pkg http://example.com/sources/a_configure_make_makeinstall.tar.gz

Pay attention to the output.

You should now find a package in /tmp called:

/tmp/a_configure_make_makeinstall-1.0.0-i486-1.tgz

Drink you tea.

Finishing up

Install the package you've just created, and do the washing up.

What next?

Some ideas: