Stage and /var ?

Tijl Coosemans tijl at FreeBSD.org
Fri Nov 1 09:12:00 UTC 2013


On Thu, 31 Oct 2013 15:20:25 +0100 Thierry Thomas wrote:
> 
> Hello,
> 
> How should we stagify ports writing out of their $PREFIX for
> good reasons, e.g. a statedir like /var/foo/$PORTNAME.
> 
> I don't like the idea of $PREFIX/var, and prefer the real /var.
> 
> Thanks for your suggestions.

Something like this should work:


In post-install do: ${MKDIR} /var/foo

In pkg-plist add:

@unexec rmdir /var/foo 2>/dev/null || true
@exec mkdir -p /var/foo


More information about the freebsd-ports mailing list