Creating a Slackware package

Since version 1.4, it is possible to create a slackware package of whatever program we installed with urpkg. In this section, we are going to create a Slackware package of foo, the test package we are using. To do that, you will need to download and install another of my utilities: list2pkg . This is a tool which converts a list of files to a Slackware package. The idea is to use urpkg's --list action to create a file list to be used by list2pkg.

Note that you should first read list2pkg's user manual before using it to create serious packages. The content of this section is just meant as an overview of list2pkg's possibilities.

Listing the package's file

We already know we can use the --list action to list all files which are part of foo. However, what is outputted does not only contain files, as list2pkg require. We must add the --quiet option for a pure list of files to be generated.

Creating the package

That's all we need. We now only have to use the file listing command, and pipe its output to list2pkg.

    $ urpkg --list --quiet foo | sudo list2pkg foo-0.1-noarch-1usr.tgz
  

Note that we absolutely need to invoke list2pkg with root privilege, in order for all metadata to be preserved.