# Ports Filesystem Layout

## Overview

Portfile authors are expected to make sure that a port, when installed conforms to specific filesystem hierarchy guidelines. These guidelines define where certain files should be installed in the DarwinPorts filesystem.

## DarwinPorts Base, ${prefix}

`/${prefix}`

  The base of the DarwinPorts filesystem hierarchy.

  Default: `/opt/local`

  `bin/`

    Common utilities, programming tools, and applications.

  `etc/`

    System configuration files and scripts.

  `games/`

    Useful and semi-frivolous programs.

  `include/`

    Standard C include files.

  `java/`

    Applications based on Java.

  `libexec/`

    System daemons and system utilities (executed by other programs).

  `sbin/`

    System programs and administration utilities.

  `share/`

    Architecture-independent files.

    `doc/`

      Miscellaneous documentation

    `examples/`

      Various examples for users and programmers.

    `info/`

      GNU Info hypertext system

    `locale/`

      Localization files.

    `man/`

      Manual pages.

    `misc/`

      Misc. system-wide ASCII text files.

  `var/`

    Multi-purpose log, temporary, transient and spool files.

    `db/`

      Misc. automatically generated system-specific database files.

      `dports/`

        DarwinPorts runtime data.

    `spool/`

      Directory containing output spool files.

    `log/`

      Misc. system log files.

    `run/`

      System information files describing various info about system since it was booted.

`/Applications/DarwinPorts/`

  Native Mac OS X applications.