|
First, make sure your port is almost complete, with only pkg-plist missing.
Next, create a temporary directory tree into which your port can be installed, and install any dependencies. port-type should be local for non-X ports and x11-4 or x11 for ports which install into the directory hierarchy of XFree86 4 or an earlier XFree86 release, respectively.
# mkdir /var/tmp/port-name # mtree -U -f /etc/mtree/BSD.port-type.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 -d * -type d) | sort > OLD-DIRS
Create an empty pkg-plist file:
# touch pkg-plist
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 -d * \! -type d) | sort > pkg-plist
You must also add any newly created directories to the packing list.
# (cd /var/tmp/port-name && find -d * -type d) | sort | comm -13 OLD-DIRS - | sort -r | sed -e 's#^#@dirrm #' >> pkg-plist
Finally, you need to tidy up the packing list by hand; it is not 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 shared libraries section.
Alternatively, use the plist script in /usr/ports/Tools/scripts/ to build the package list automatically. The first step is the same as above: take the first three lines, that is, mkdir, mtree and make depends. Then build and install the port:
# make install PREFIX=/var/tmp/port-name
And let plist create the pkg-plist file:
# /usr/ports/Tools/scripts/plist -Md -m /etc/mtree/BSD.port-type.dist /var/tmp/port-name > pkg-plist
The packing list still have to tidied up the by hand as stated above.
Hosting by: Hurra Communications Ltd.
Generated: 2007-01-26 17:58:41