Subject: how can a package detect it is getting built with pkgsrc?
To: None <tech-pkg@NetBSD.org>
From: Klaus Heinz <k.heinz.apr.sieben@kh-22.de>
List: tech-pkg
Date: 04/12/2007 00:48:31
Hi,

is there a way to reliable detect that a package is getting built with
pkgsrc?
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?

ciao
     Klaus