pkgsrc/mk/install/header
jlam 66030afca0 Define new variables for package Makefile use:
REQD_FILES, REQD_FILES_PERMS, REQD_FILES_MODE
	REQD_DIRS, REQD_DIRS_PERMS

These are the same as the CONF_* variables, except the files and
directories listed in REQD_* are always copied over, created or removed
(taking into account if there are user modifications from the originals,
etc.) regardless of the value of PKG_CONFIG.

The implementation involved pushing the knowledge of PKG_CONFIG,
PKG_RCD_SCRIPTS, PKG_CREATE_USERGROUP, and PKG_REGISTER_SHELLS into
the individual helper scripts.  The helper scripts are now always
invoked by the +INSTALL and +DEINSTALL scripts.  The +DIRS and +FILES
script have been enhanced to understand a new "f" flag that means
"force" to ignore the value of PKG_CONFIG and PKG_RCD_SCRIPTS.

Lastly, the +FILES script has been taught a new "r" flag just for rc.d
scripts and the +RCD_SCRIPTS script is now unnecessary.
2005-08-19 22:24:09 +00:00

87 lines
1.5 KiB
Text

#!@SH@
#
# start of header
#
# $NetBSD: header,v 1.34 2005/08/19 22:24:10 jlam Exp $
PKGNAME=$1
STAGE=$2
AWK="@AWK@"
BASENAME="@BASENAME@"
CAT="@CAT@"
CHGRP="@CHGRP@"
CHMOD="@CHMOD@"
CHOWN="@CHOWN@"
CMP="@CMP@"
CP="@CP@"
DIRNAME="@DIRNAME@"
ECHO="@ECHO@"
ECHO_N="@ECHO_N@"
EGREP="@EGREP@"
EXPR="@EXPR@"
FALSE="@FALSE@"
FIND="@FIND@"
GREP="@GREP@"
GTAR="@GTAR@"
HEAD="@HEAD@"
ID="@ID@"
LINKFARM="@LINKFARM@"
LN="@LN@"
LS="@LS@"
MKDIR="@MKDIR@"
MV="@MV@"
PERL5="@PERL5@"
PKG_ADMIN="@PKG_ADMIN@"
PKG_INFO="@PKG_INFO@"
PWD_CMD="@PWD_CMD@"
RM="@RM@"
RMDIR="@RMDIR@"
SED="@SED@"
SETENV="@SETENV@"
SH="@SH@"
SORT="@SORT@"
SU="@SU@"
TEST="@TEST@"
TOUCH="@TOUCH@"
TR="@TR@"
TRUE="@TRUE@"
XARGS="@XARGS@"
: ${PKG_METADATA_DIR=`${PWD_CMD}`}
PKGBASE="@PKGBASE@"
LOCALBASE="@LOCALBASE@"
X11BASE="@X11BASE@"
DEPOTBASE="@DEPOTBASE@"
PREFIX="@PREFIX@"
case ${PKG_PREFIX} in
${LOCALBASE}/*) VIEW="${PKG_PREFIX#${LOCALBASE}/}" ;;
*) VIEW="" ;;
esac
PKG_SYSCONFBASE="@PKG_SYSCONFBASE@"
PKG_SYSCONFDEPOTBASE="@PKG_SYSCONFDEPOTBASE@"
PKG_SYSCONFBASEDIR="@PKG_SYSCONFBASEDIR@"
PKG_SYSCONFDIR="@PKG_SYSCONFDIR@"
CONF_DEPENDS="@CONF_DEPENDS@"
case ${VIEW} in
"") PKG_SYSCONFVIEWBASE="${PKG_SYSCONFBASE}" ;;
*) PKG_SYSCONFVIEWBASE="${PKG_SYSCONFBASE}/${VIEW}" ;;
esac
CONF_IGNORE_FILES="*[~#] *.OLD *.orig *,v .pkgsrc */.pkgsrc"
PKG_INSTALLATION_TYPE="@PKG_INSTALLATION_TYPE@"
case "${PKG_CONFIG:-@PKG_CONFIG@}" in
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
_PKG_CONFIG=yes
;;
[Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0)
_PKG_CONFIG=yes
;;
esac
# end of header