Subject: how about invoking INSTALL scripts directly from bsd.pkg.mk?
To: NetBSD Packages Technical Discussion List <tech-pkg@NetBSD.ORG>
From: Greg A. Woods <woods@weird.com>
List: tech-pkg
Date: 08/13/2001 14:14:10
I'm wondering if maybe we couldn't put these rules directly into
pkgsrc/mk/bsd.pkg.mk so that they're always there (iff there's a
pkg/INSTALL script, of course):

	pre-install: 
		@${SETENV} ${MAKE_ENV} ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL

	post-install: 
		@${SETENV} ${MAKE_ENV} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL

Every package which has an INSTALL script should have it invoked before
and after the main "install" target is run.  Currently some packages
include one or both of these rules in their own Makefile, but this is
clumsy and maintainers seem prone to removing one or the other rule if
they think the current implementation of the script doesn't do anything
useful for the given invocation.  For example even though I supplied the
pre-install rule in suggested changes for www/squid, it was not included
by the maintainer (and though it does nothing now when passed
"PRE-INSTALL", there's no guarantee that some future version won't do
something and it's best to always invoke it than to have to remember to
add the rule if/when necessary since it will always be invoked by
pkg_add for binary packages and thus must always handle all possible
invocations anyway).

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>     <woods@robohack.ca>
Planix, Inc. <woods@planix.com>;   Secrets of the Weird <woods@weird.com>