PORTSHAKER.D(5) BSD File Formats Manual PORTSHAKER.D(5)NAME
portshaker.d/ — format of portshaker(8) sources update scripts
SYNOPSIS
portshaker.d/
DESCRIPTION
The portshaker.d/ directory contains shell scripts used to maintain
portshaker(8) target ports trees. Each script correspond to a source
ports tree, and provide the required functions required by portshaker(8)
to merge to target ports trees.
Syntax
In order to ease development, portshaker(8) provides the portshaker.subr
scripts that contains all the logic for managing source ports trees. In
order to configure a source ports tree, you have to source that file,
specify how the ports tree has to be fetched (see bellow), and run the
run_portshaker_command() function as detailed in the EXAMPLES section.
The following variable are available to configure how the source ports
tree has to be fetched:
method (str) Update method. Should be one of csup, cvs, portsnap,
git, hg (mercurial), rsync or svn.
csup_supfile (str) supfile to provide to csup(1) when “method=csup”.
cvs_root (str) CVSROOT string to use for checking-out the ports tree
when “method=cvs”.
cvs_module (str) cvs module to checkout when “method=cvs”.
git_clone_uri
(str) git URI to clone when “method=git”.
git_branch (str) branch to track when “method=git”.
hg_clone_uri (str) mercurial URI to clone when “method=hg”.
rsync_source_path
(str) path to copy data from when “method=rsync”.
rsync_extra_args
(str) extra arguments to pass to rsync(1) when
“method=rsync”.
svn_checkout_path
(str) URI to checkout the ports tree from when
“method=svn”.
Special consideration when “method=csup”
When updating a source ports tree using the csup method, the source ports
tree name has to be ports because the remote collection is named likely.
portshaker(8) will ensure this condition is met before attempting to per‐
form any update.
Hooking
An update script may define the ⟨port_tree⟩_pre⟨action⟩() and
⟨port_tree⟩_post⟨action⟩() function hooks, where action is one of update,
clone_to, copy_to or merge_to.
EXAMPLES
To configure the official FreeBSD ports tree as a source ports tree, cre‐
ate a /usr/local/etc/portshaker.d/ports shell script containing:
#!/bin/sh
. /usr/local/share/portshaker/portshaker.subr
method="portsnap"
run_portshaker_command $*
To configure the BSD# ports tree as a source ports tree, create a
/usr/local/etc/portshaker.d/bsd_sharp shell script containing:
#!/bin/sh
. /usr/local/share/portshaker/portshaker.subr
method="svn"
svn_checkout_path="http://bsd-sharp.googlecode.com/svn/trunk/"
run_portshaker_command $*
To setup a dynamic redports source ports tree, create a
/usr/local/etc/portshaker.d/redports shell script containing:
#!/bin/sh
. /usr/local/share/portshaker/portshaker.subr
username="$1"
extra_info=":${username}"
shift
method="svn"
svn_checkout_path="http://svn.redports.org/${username}"
run_portshaker_command $*
You can then specify the foo and bar ports tree at redports specifying
the redports:foo and redports:bar source ports tree in your
portshaker.conf configuration file.
SEE ALSOcsup(1), portshaker(8), portshaker.conf(5)AUTHORS
Romain Tarti�re ⟨romain@blogreen.org⟩
BSD September 30, 2008 BSD