scratch

scratch is front-end for pkgbuild, pkgadd and pkgdel. Its changed directory in ports and call pkgbuild to build package, then pkgadd to install package into system. Its also has some extra functions like search packages, check dependency, dependent, orphan package, duplicate ports, list installed package and etc. Run scratch help to see available functions.

Usage:
scratch [ mode ] [ <pkgname> <options> ]

mode:
    install   <packages>      install packages and its dependencies
    upgrade   <packages>      upgrade packages and install new dependencies (if any)
    build     <package>       build only packages
    remove    <packages>      remove packages in system
    depends   <package>       show depends of a package
    deplist   <packages>      show list dependencies of a package
    search    <pattern>       search packages in port's repos
    lock      <packages>      lock packages from upgrade
    unlock    <packages>      unlock packages from upgrade
    listport  <repo>          list ports of a repo
    cat       <package>       view a package build scripts
    dependent <package>       show package's dependent
    own       <file>          show package's owner of file
    pkgtree   <package>       show list files of installed package
    path      <package>       show package's buildscripts path
    sync                      update port's repo
    sysup                     full system update
    dup                       print duplicate ports in repo
    readme                    print readme file if exist
    listinst                  list installed package in system
    listorphan                list orphan package
    integrity                 check integrity of package's files
    outdate                   check for outdate packages
    cache                     print leftover cache
    rmcache                   remove leftover cache
    missingdep                check for mising dependency of installed package
    foreignpkg                print package installed without port in repo
    listlocked                print locked packages
    help                      print this help message

options for:		
    build
        -f, --force-rebuild    force rebuild
        -m, --skip-mdsum       skip md5sum check for sources
        -d, --no-dep           skip dependency check
        -e, --extract          extract only
        -w, --keep-work        keep woring directory
        -o, --download         download source files only
        --redownload           re-download source files
        --srcdir=<path>        override default SOURCE_DIR
        --pkgdir=<path>        override default PACKAGE_DIR
        --no-preinstall        skip pre-install script

    install
        -d, --no-dep           skip installing dependencies
        -c, --ignore-conflict  skip file conflict check
        -r, --reinstall        reinstall installed package
        -v, --verbose          print install process
        --no-preinstall        skip pre-install script
        --no-postinstall       skip post-install script

    upgrade
        -d, --no-dep           skip installing dependencies (new dependencies)
        -c, --ignore-conflict  skip file conflict check
        -v, --verbose          print install process
        --no-backup            skip backup configuration file
        --no-preupgrade        skip pre-upgrade script
        --no-postupgrade       skip post-upgrade script

    remove
        -d, --no-dep           skip dependency check
        -v, --verbose          print removed files
        --no-preremove         skip pre-remove script
        --no-postremove        skip post-remove script

global options:
        --no-color             disable colour for output
        --debug                debug scratch script

Example

scratch install firefox gvfs -cv build and install required dependencies and target package itself, ignore file conflict check and be verbose.

scratch remove firefox gvfs -dv remove package firefox and gvfs from system, ignore dependent check and be verbose