srcpac(1)

NAME
srcpac - A bash build wrapper for pacman.

SYNOPSIS
srcpac <operation> [options] [package] ...

DESCRIPTION
srcpac is a wrapper for pacman. It allows for automatic building of specified packages from source. The built package is then installed via pacman. If you never tell srcpac to build anything from source, it will act just like pacman.

OPERATIONS
For additional OPERATIONS not specified below, see pacman manpage. Only those OPERATIONS specified below have been modified.

-R, --remove
    Remove a package from the system. Works the same as pacman. In addition, the 'from-source' marking will be removed.

-Q, --query
    Query the package database. Works the same as pacman. Additionally, use of the -i option tells you whether a package is marked as 'from-source' or not.

-S, --sync
    Synchronize packages. Works the same as pacman. Additional flags may be specified to build something from source (see below).

-h, --help
    Display syntax for the given operation. If no operation was supplied then the general syntax is shown.

OPTIONS
See pacman manpage. No additional general options beyond what pacman provides. See specific section below for added options specific to the operation.

SYNC OPTIONS
For additional SYNC options not specified below, see pacman manpage. Only those options specified below have been modified.

-b, --build
    Build specified package from source. This runs makepkg in /var/srcpac/<package>. This may build an older version of the package if the abs tree is not updated.

-bb
    Build specified package and its dependencies from source. This runs makepkg in /var/srcpac/<package>. This may build an older version of the packages if the abs tree is not updated.

-bbb
    Build specified package, its dependencies and its makedependencies from source. This runs makepkg in /var/srcpac/<package>. This may build an older version of the packages if the abs tree is not updated.

-m, --makedeps
    By default srcpac keeps the makedependencies installed. With this option srcpac will remove them after the build.

-o, --onlyconf
    Applies the sed command to a PKGBUILD (see CONFIGURATION), then pipes the output to less or the pager set in the PAGER environment variable. This allows you to make sure the changes are applied properly. No actual build occurs when using -o.

-y, --refresh
    This command updates the abs tree and the pacman database.

QUERY OPTIONS
For additional QUERY options not specified below, see pacman manpage. Only those options specified below have been modified.

-b, --build
    Shows all packages installed with fBsrcpac.

REMOVE OPTIONS
For additional QUERY options not specified below, see pacman manpage. Only those options specified below have been modified.

-b, --build
    With this option srcpac will remove only the build-flag, but not the installed package.

-o, --onlyconf
    With this option srcpac will remove only the patchfile, but not the installed package.

CONFIGURATION
srcpac lets you specify custom configs based on sed commands applied to PKGBUILDs. The config files are simple sed script files and have to be put in /etc/srcpac.d/. The config files have to be named like the packages they apply to. ie /etc/srcpac.d/less.

Example /etc/srcpac.d/less:
    s#--prefix=/usr#--prefix=/usr/local#

The above example config is supplied to the PKGBUILD in a sed command like this:
    sed -f CONFIG PKGBUILD

Since writing these rules can be kind of tricky, it is best to use the -o flag (see above) until you are sure things look right.

SEE ALSO
pacman is the Arch Linux package manager.

AUTHORS
Jason Chu <jason@archlinux.org> Andrea Scarpino <andrea@archlinux.org>