Subject: how can a package detect it is getting built with pkgsrc?
To: None <>
From: Klaus Heinz <>
List: tech-pkg
Date: 04/12/2007 00:48:31

is there a way to reliable detect that a package is getting built with
Sometimes you can detect the OS by testing for files like
/etc/redhat-release or using "uname" but since pkgsrc can be used on
many different systems this is not sufficient.

How about introducing ${LOCALBASE}/{etc,share}/.using_pkgsrc and defining an
environment variable like PKG_USING_PKGSRC during the package build?