pkg-create and plist

What's the current way of creating a FreeBSD package?

This post shows embedding the files in the `+MANIFEST`:

The man pages show a `package-list` or `plist` file:

The `plist` file does have more fidelity, in that you can set the uid and gid of the files...
 
pkg-plist is in a port directory and shows which compile result files in the workdir should be added to the package.
It requires the command 'make package' while in the port dir. The destination usually is /usr/ports/<port>/work/pkg/<package>
The workdir name can variate for to me unclear reasons. (Different output results depending on settings means different ports with work as all-tune result location. No need for a family tree.)
 
The pkg create creates a package from installed files.
This is useful when you've built something yourself but have deleted WRKDIR and don't want to rebuild it again, or when you want to save an older version of the pkg that you have installed when the port is updated.
ports-mgmt/portmaster also uses pkg create when creating backups.

Normally, to create a package, you run make package in the port tree.
 
It depends if you want to create a pkg just for you or if you want that software be available for anyone on FreeBSD. For this latter, you must create a port.
I have both use cases:

1. Code I am developing just for myself that I want to package as FreeBSD packages to make deployments easier
2. Code that I would like to make available in the FreeBSD ports tree

For #1, I have written a CLI tool to package Gleam apps into FreeBSD packages:
However, I'm not satisfied with what I wrote, and so I'm re-writing it.

For #2, I'd like to package the open source martin tile server and publish as a port.
 
To re-phrase the original question: when do you list your files in a separate `plist` file, vs. in the `files` stanza within the `+MANIFEST` file?
 
I think this is what I was looking for:

Code:
Usage of PLIST_FILES should not be abused.When looking for the origin of a file, people usually try to grep through the pkg-plist files in the ports tree.Listing files in PLIST_FILES in the Makefile makes that search more difficult.

So it seems that listing included files in the `pkg-plist` file is preferred over listing included files in the +MANIFEST `files` stanza.

Thanks everyone!
 
Back
Top