The configuration directory

Urpkg's configuration directory is kept by default in /usr/local/etc/urpkg. This is where all the files urpkg needs to run correctly are stored. Those are mostly shell scripts that you can change to fit your needs. They are documented here. Pay attention: they are invoked with the privileges that were used to invoke urpkg.

The find script

This is the script urpkg uses to find files whose owner or group is a given package user. It is also used to list install directories or shared files. It takes one argument: a user or group name. It should print the list of files in the system that are owned by this user or group, excluding the package's home directory

By default, a few locations such as /tmp or /mnt, or the package home directory are excluded from the search. They are given in the EXCLUDE variable at the beginning of the script. Please check that they match your expectation.

The preinstall script

It is run before any installation. It takes no argument, and by default does nothing but printing a line or two to confirm it was executed.

The postinstall scripts

All files in the directory postinst relative to the configuration directory will be run after the installation. Each can be passed exactly one argument using the --SCRIPT-arg option.

  • The complog script will install a compilation log in the package's home directory. The file must be named svcompile.log, or you must pass it as argument. If no such file exist, nothing will be done.

  • The ldconfig script will only run the ldconfig command and exit.

  • The source script will install the source file/directory, given as its argument in a subdirectory src/ of the package directory.

Environment variables

If you decide to write your own scripts, you can count on several environment variables to help you:

  • URPKG_USER: gives the package username

  • URPKG_PKGNAME: gives the package name

  • URPKG_HOMEDIR: gives the package directory

  • PWD is set to the directory from which urpkg was invoked.