C search for up to date pkg plugin examples

Using freeBSD 12.2 I try to program a pkg plugin. So far it is found by the pkg tool and gets triggered by the install operation.
To be able to compare with best practices I'd like to see some source code for a pgk plugin which is triggered just before the installation of a new package.

I'm trying to create some pkg install filter which needs access to the package name, possible already downloaded location.

The parameters to my callback (void *data, struct pkgdb *db) and the conversion to pkg_jobs are the most stunning part.

I only found several very old plugin examples which not even compile.
 
Back
Top