This is an archive of past FreeBSD releases; it's part of the FreeBSD Documentation Archive.

Automated package list creation

Chapter 17. Automated package list creation

First, make sure your port is almost complete, with only PLIST missing. Create an empty PLIST.

    # touch PLIST

Next, create a new set of directories which your port can be installed, and install any dependencies.

    # mtree -U -f /etc/mtree/BSD.local.dist -d -e -p /var/tmp/port-name
    # make depends PREFIX=/var/tmp/port-name

Store the directory structure in a new file.

    # (cd /var/tmp/port-name && find * -type d) > OLD-DIRS

If your port honors PREFIX (which it should) you can then install the port and create the package list.

    # make install PREFIX=/var/tmp/port-name
    # (cd /var/tmp/port-name && find * \! -type d) > pkg/PLIST

You must also add any newly created directories to the packing list.

    # (cd /var/tmp/port-name && find * -type d) | comm -13 OLD-DIRS - | sed -e 's#^#@dirrm #' >> pkg/PLIST

Finally, you need to tidy up the packing list by hand. I lied when I said this was all automated. Manual pages should be listed in the port's Makefile under MANn, and not in the package list. User configuration files should be removed, or installed as filename.sample. The info/dir file should not be listed and appropriate install-info lines should be added as noted in the info files section. Any libraries installed by the port should be listed as specified in the ldconfig section.

For questions about the FreeBSD ports system, e-mail <ports@freebsd.org>.
For questions about this documentation, e-mail <doc@freebsd.org>.