Best practices for managing tweaked ports

Mel fbsd.questions at
Thu Feb 7 22:12:28 UTC 2008


On Tuesday 05 February 2008 13:05:12 Michaël Grünewald wrote:

> I am seeking for a word in advice in how to automatically tweak some
> applications, possibly making packages for them.

> The current solution is: I have a post install shell script that plugs
> my files into appropriate location. This works but there is two
> drawbacks:

You're almost there:
- Create a file Makefile.local in the port you need a post-install shell 
script executed with contents:

This will then be packaged in packages as well.
See pkg_create(1) and in particular -i option, as well as grep 
_LATE_PKG_ARGS /usr/ports/Mk/

If you wanna do it cleaner, may want to wrap that in:
.if !defined(PKGINSTALL) && !exists(${PKGDIR}/pkg-install)
	echo "Omg they killed kenny"

So that it errors out, if the port starts providing a post-install script.

More information about the freebsd-questions mailing list