2015-02-24 10:46:09 +01:00
|
|
|
# $NetBSD: bsd.pkginstall.mk,v 1.62 2015/02/24 09:46:09 wiz Exp $
|
2006-03-10 00:31:51 +01:00
|
|
|
#
|
|
|
|
# This Makefile fragment is included by bsd.pkg.mk and implements the
|
|
|
|
# common INSTALL/DEINSTALL scripts framework. To use the pkginstall
|
|
|
|
# framework, simply set the relevant variables to customize the install
|
|
|
|
# scripts to the package.
|
|
|
|
#
|
2007-07-12 21:41:46 +02:00
|
|
|
# User-settable variables:
|
|
|
|
#
|
2014-10-13 01:44:32 +02:00
|
|
|
# FONTS_VERBOSE indicates whether the +FONTS scriptlet will output a message
|
|
|
|
# noting the actions taken if PKG_UPDATE_FONTS_DB is YES. It is either
|
|
|
|
# YES or NO and defaults to YES for PKG_DEVELOPERs, otherwise NO.
|
2007-07-12 21:41:46 +02:00
|
|
|
#
|
2014-10-13 01:44:32 +02:00
|
|
|
# INFO_FILES_VERBOSE indicates whether the +INFO_FILES scriptlet will output
|
|
|
|
# a message noting the actions taken. It is either YES or NO and
|
|
|
|
# defaults to YES for PKG_DEVELOPERs, otherwise NO.
|
2007-07-12 21:41:46 +02:00
|
|
|
#
|
2007-12-13 12:10:42 +01:00
|
|
|
_VARGROUPS+= pkginstall
|
|
|
|
_USER_VARS.pkginstall= \
|
2014-10-13 01:44:32 +02:00
|
|
|
FONTS_VERBOSE \
|
|
|
|
INFO_FILES_VERBOSE \
|
2007-12-13 12:10:42 +01:00
|
|
|
PKG_CREATE_USERGROUP \
|
|
|
|
PKG_CONFIG PKG_CONFIG_PERMS \
|
|
|
|
PKG_RCD_SCRIPTS \
|
|
|
|
PKG_REGISTER_SHELLS \
|
|
|
|
PKG_UPDATE_FONTS_DB
|
|
|
|
_PKG_VARS.pkginstall= \
|
|
|
|
DEINSTALL_TEMPLATES INSTALL_TEMPLATES \
|
|
|
|
DEINSTALL_SRC INSTALL_SRC \
|
|
|
|
FILES_SUBST \
|
|
|
|
PKG_USERS PKG_GROUPS USERGROUP_PHASE
|
|
|
|
.for u in ${PKG_USERS}
|
|
|
|
_PKG_VARS.pkginstall+= PKG_UID.${u} PKG_GECOS.${u} PKG_HOME.${u} PKG_SHELL.${u}
|
|
|
|
.endfor
|
|
|
|
.for g in ${PKG_GROUPS}
|
|
|
|
_PKG_VARS.pkginstall+= PKG_GID.${g}
|
|
|
|
.endfor
|
|
|
|
_PKG_VARS.pkginstall+= \
|
|
|
|
SPECIAL_PERMS \
|
|
|
|
CONF_FILES REQD_FILES \
|
|
|
|
CONF_FILES_MODE REQD_FILES_MODE \
|
|
|
|
CONF_FILES_PERMS REQD_FILES_PERMS \
|
|
|
|
RCD_SCRIPTS ${RCD_SCRIPTS:@s@RCD_SCRIPT_SRC.${s}@} \
|
|
|
|
OWN_DIRS MAKE_DIRS REQD_DIRS \
|
|
|
|
OWN_DIRS_PERMS MAKE_DIRS_PERMS REQD_DIRS_PERMS \
|
|
|
|
PKG_SYSCONFDIR_PERMS \
|
|
|
|
PKG_SHELL \
|
|
|
|
FONTS_DIRS.ttf FONTS_DIRS.type1 FONTS_DIRS.x11 \
|
|
|
|
_SYS_VARS.pkginstall= \
|
|
|
|
SETUID_ROOT_PERMS \
|
2008-03-04 07:45:33 +01:00
|
|
|
SETGID_GAMES_PERMS \
|
2007-12-13 12:10:42 +01:00
|
|
|
SHLIB_TYPE \
|
|
|
|
LDCONFIG_ADD_CMD \
|
|
|
|
LDCONFIG_REMOVE_CMD
|
|
|
|
|
2005-08-04 17:03:39 +02:00
|
|
|
# The Solaris /bin/sh does not know the ${foo#bar} shell substitution.
|
|
|
|
# This shell function serves a similar purpose, but is specialized on
|
2005-08-25 00:43:02 +02:00
|
|
|
# stripping ${PREFIX}/ from a pathname.
|
2005-08-04 17:03:39 +02:00
|
|
|
_FUNC_STRIP_PREFIX= \
|
|
|
|
strip_prefix() { \
|
2005-08-22 00:27:09 +02:00
|
|
|
${AWK} 'END { \
|
|
|
|
plen = length(prefix); \
|
2005-08-04 17:03:39 +02:00
|
|
|
if (substr(s, 1, plen) == prefix) { \
|
|
|
|
s = substr(s, 1 + plen, length(s) - plen); \
|
|
|
|
} \
|
|
|
|
print s; \
|
2005-08-22 10:07:38 +02:00
|
|
|
}' s="$$1" prefix=${PREFIX:Q}/ /dev/null; \
|
2005-08-04 17:03:39 +02:00
|
|
|
}
|
|
|
|
|
2006-03-15 05:52:57 +01:00
|
|
|
_PKGINSTALL_DIR= ${WRKDIR}/.pkginstall
|
|
|
|
|
First pass at implementing support for package system flavors other
than pkgsrc's current one. This is an important lead-up to any project
that redesigns the pkg_* tools in that it doesn't tie us to past design
(mis)choices. This commit mostly deals with rearranging code, although
there was a considerable amount of rewriting done in cases where I
thought the code was somewhat messy and was difficult to understand.
The design I chose for supporting multiple package system flavors is
that the various depends, install, package, etc. modules would define
default targets and variables that may be overridden in files from
pkgsrc/mk/flavor/${PKG_FLAVOR}. The default targets would do the
sensible thing of doing nothing, and pkgsrc infrastructure would rely
on the appropriate things to be defined in pkgsrc/mk/flavor to do the
real work. The pkgsrc/mk/flavor directory contains subdirectories
corresponding to each package system flavor that we support. Currently,
I only have "pkg" which represents the current pkgsrc-native package
flavor. I've separated out most of the code where we make assumptions
about the package system flavor, mostly either because we directly
use the pkg_* tools, or we make assumptions about the package meta-data
directory, or we directly manipulate the package meta-data files, and
placed it into pkgsrc/mk/flavor/pkg.
There are several new modules that have been refactored out of bsd.pkg.mk
as part of these changes: check, depends, install, package, and update.
Each of these modules has been slimmed down by rewriting them to avoid
some recursive make calls. I've also religiously documented which
targets are "public" and which are "private" so that users won't rely
on reaching into pkgsrc innards to call a private target.
The "depends" module is a complete overhaul of the way that we handle
dependencies. There is now a separate "depends" phase that occurs
before the "extract" phase where dependencies are installed. This
differs from the old way where dependencies were installed just before
extraction occurred. The reduce-depends.mk file is now replaced by
a script that is invoked only once during the depends phase and is
used to generate a cookie file that holds the full set of reduced
dependencies. It is now possible to type "make depends" in a package
directory and all missing dependencies will be installed.
Future work on this project include:
* Resolve the workflow design in anticipation of future work on
staged installations where "package" conceptually happens before
"install".
* Rewrite the buildlink3 framework to not assume the use of the
pkgsrc pkg_* tools.
* Rewrite the pkginstall framework to provide a standard pkg_*
tool to perform the actions, and allowing a purely declarative
file per package to describe what actions need to be taken at
install or deinstall time.
* Implement support for the SVR4 package flavor. This will be
proof that the appropriate abstractions are in place to allow
using a completely different set of package management tools.
2006-06-04 01:11:42 +02:00
|
|
|
# XXX This should not be duplicated from the install module, but we
|
|
|
|
# XXX need this until pkginstall is refactored.
|
|
|
|
# XXX
|
2006-06-06 21:49:52 +02:00
|
|
|
PKG_DB_TMPDIR?= ${WRKDIR}/.pkgdb
|
First pass at implementing support for package system flavors other
than pkgsrc's current one. This is an important lead-up to any project
that redesigns the pkg_* tools in that it doesn't tie us to past design
(mis)choices. This commit mostly deals with rearranging code, although
there was a considerable amount of rewriting done in cases where I
thought the code was somewhat messy and was difficult to understand.
The design I chose for supporting multiple package system flavors is
that the various depends, install, package, etc. modules would define
default targets and variables that may be overridden in files from
pkgsrc/mk/flavor/${PKG_FLAVOR}. The default targets would do the
sensible thing of doing nothing, and pkgsrc infrastructure would rely
on the appropriate things to be defined in pkgsrc/mk/flavor to do the
real work. The pkgsrc/mk/flavor directory contains subdirectories
corresponding to each package system flavor that we support. Currently,
I only have "pkg" which represents the current pkgsrc-native package
flavor. I've separated out most of the code where we make assumptions
about the package system flavor, mostly either because we directly
use the pkg_* tools, or we make assumptions about the package meta-data
directory, or we directly manipulate the package meta-data files, and
placed it into pkgsrc/mk/flavor/pkg.
There are several new modules that have been refactored out of bsd.pkg.mk
as part of these changes: check, depends, install, package, and update.
Each of these modules has been slimmed down by rewriting them to avoid
some recursive make calls. I've also religiously documented which
targets are "public" and which are "private" so that users won't rely
on reaching into pkgsrc innards to call a private target.
The "depends" module is a complete overhaul of the way that we handle
dependencies. There is now a separate "depends" phase that occurs
before the "extract" phase where dependencies are installed. This
differs from the old way where dependencies were installed just before
extraction occurred. The reduce-depends.mk file is now replaced by
a script that is invoked only once during the depends phase and is
used to generate a cookie file that holds the full set of reduced
dependencies. It is now possible to type "make depends" in a package
directory and all missing dependencies will be installed.
Future work on this project include:
* Resolve the workflow design in anticipation of future work on
staged installations where "package" conceptually happens before
"install".
* Rewrite the buildlink3 framework to not assume the use of the
pkgsrc pkg_* tools.
* Rewrite the pkginstall framework to provide a standard pkg_*
tool to perform the actions, and allowing a purely declarative
file per package to describe what actions need to be taken at
install or deinstall time.
* Implement support for the SVR4 package flavor. This will be
proof that the appropriate abstractions are in place to allow
using a completely different set of package management tools.
2006-06-04 01:11:42 +02:00
|
|
|
|
2006-03-14 02:14:26 +01:00
|
|
|
# These are the template scripts for the INSTALL/DEINSTALL scripts.
|
|
|
|
# Packages may do additional work in the INSTALL/DEINSTALL scripts by
|
2006-06-16 00:13:58 +02:00
|
|
|
# overriding the variables DEINSTALL_TEMPLATES and INSTALL_TEMPLATES to
|
2006-03-14 02:14:26 +01:00
|
|
|
# point to additional script fragments. These bits are included after
|
|
|
|
# the main install/deinstall script fragments.
|
2001-11-19 17:18:44 +01:00
|
|
|
#
|
2006-05-22 01:50:15 +02:00
|
|
|
_HEADER_TMPL?= ${.CURDIR}/../../mk/pkginstall/header
|
2006-06-16 00:13:58 +02:00
|
|
|
HEADER_TEMPLATES?= # empty
|
2006-03-14 02:14:26 +01:00
|
|
|
.if exists(${PKGDIR}/HEADER) && \
|
2006-06-16 00:13:58 +02:00
|
|
|
empty(HEADER_TEMPLATES:M${PKGDIR}/HEADER)
|
|
|
|
HEADER_TEMPLATES+= ${PKGDIR}/HEADER
|
2003-07-30 12:31:20 +02:00
|
|
|
.endif
|
2006-06-16 00:13:58 +02:00
|
|
|
DEINSTALL_TEMPLATES?= # empty
|
2006-03-14 02:14:26 +01:00
|
|
|
.if exists(${PKGDIR}/DEINSTALL) && \
|
2006-06-16 00:13:58 +02:00
|
|
|
empty(DEINSTALL_TEMPLATES:M${PKGDIR}/DEINSTALL)
|
|
|
|
DEINSTALL_TEMPLATES+= ${PKGDIR}/DEINSTALL
|
2006-03-14 02:14:26 +01:00
|
|
|
.endif
|
2006-05-22 01:50:15 +02:00
|
|
|
_DEINSTALL_TMPL?= ${.CURDIR}/../../mk/pkginstall/deinstall
|
2006-03-11 00:33:57 +01:00
|
|
|
_INSTALL_UNPACK_TMPL?= # empty
|
2006-05-22 01:50:15 +02:00
|
|
|
_INSTALL_TMPL?= ${.CURDIR}/../../mk/pkginstall/install
|
2006-06-16 00:13:58 +02:00
|
|
|
INSTALL_TEMPLATES?= # empty
|
2006-03-14 02:14:26 +01:00
|
|
|
.if exists(${PKGDIR}/INSTALL) && \
|
2006-06-16 00:13:58 +02:00
|
|
|
empty(INSTALL_TEMPLATES:M${PKGDIR}/INSTALL)
|
|
|
|
INSTALL_TEMPLATES+= ${PKGDIR}/INSTALL
|
2006-03-14 02:14:26 +01:00
|
|
|
.endif
|
2006-03-15 05:52:57 +01:00
|
|
|
_INSTALL_DATA_TMPL?= # empty
|
2006-05-22 01:50:15 +02:00
|
|
|
_FOOTER_TMPL?= ${.CURDIR}/../../mk/pkginstall/footer
|
2001-11-19 17:18:44 +01:00
|
|
|
|
2006-03-14 02:14:26 +01:00
|
|
|
# _DEINSTALL_TEMPLATES and _INSTALL_TEMPLATES are the list of source
|
|
|
|
# files that are concatenated to form the DEINSTALL/INSTALL
|
|
|
|
# scripts.
|
|
|
|
#
|
|
|
|
# _DEINSTALL_TEMPLATES_DFLT and _INSTALL_TEMPLATES_DFLT are the list of
|
|
|
|
# template files minus any user-supplied templates.
|
|
|
|
#
|
2006-06-16 00:13:58 +02:00
|
|
|
_DEINSTALL_TEMPLATES= ${_HEADER_TMPL} ${HEADER_TEMPLATES} \
|
|
|
|
${DEINSTALL_TEMPLATES} \
|
2006-03-14 02:14:26 +01:00
|
|
|
${_DEINSTALL_TMPL} \
|
|
|
|
${_FOOTER_TMPL}
|
2006-06-16 00:13:58 +02:00
|
|
|
_INSTALL_TEMPLATES= ${_HEADER_TMPL} ${HEADER_TEMPLATES} \
|
2006-03-14 02:14:26 +01:00
|
|
|
${_INSTALL_UNPACK_TMPL} \
|
|
|
|
${_INSTALL_TMPL} \
|
2006-06-16 00:13:58 +02:00
|
|
|
${INSTALL_TEMPLATES} \
|
2006-03-15 05:52:57 +01:00
|
|
|
${_FOOTER_TMPL} \
|
|
|
|
${_INSTALL_DATA_TMPL} \
|
2006-03-14 02:14:26 +01:00
|
|
|
|
|
|
|
_DEINSTALL_TEMPLATES_DFLT= ${_HEADER_TMPL} \
|
|
|
|
${_DEINSTALL_TMPL} \
|
|
|
|
${_FOOTER_TMPL}
|
|
|
|
_INSTALL_TEMPLATES_DFLT= ${_HEADER_TMPL} \
|
|
|
|
${_INSTALL_TMPL} \
|
|
|
|
${_FOOTER_TMPL}
|
2001-11-19 17:18:44 +01:00
|
|
|
|
|
|
|
# These are the list of source files that are concatenated to form the
|
|
|
|
# INSTALL/DEINSTALL scripts.
|
|
|
|
#
|
2006-03-14 02:14:26 +01:00
|
|
|
DEINSTALL_SRC?= ${_DEINSTALL_TEMPLATES}
|
|
|
|
INSTALL_SRC?= ${_INSTALL_TEMPLATES}
|
2001-11-19 17:18:44 +01:00
|
|
|
|
2002-09-19 11:02:40 +02:00
|
|
|
# FILES_SUBST lists what to substitute in DEINSTALL/INSTALL scripts and in
|
|
|
|
# rc.d scripts.
|
|
|
|
#
|
2005-12-05 23:07:07 +01:00
|
|
|
FILES_SUBST+= PREFIX=${PREFIX:Q}
|
|
|
|
FILES_SUBST+= LOCALBASE=${LOCALBASE:Q}
|
|
|
|
FILES_SUBST+= X11BASE=${X11BASE:Q}
|
|
|
|
FILES_SUBST+= VARBASE=${VARBASE:Q}
|
|
|
|
FILES_SUBST+= PKG_SYSCONFBASE=${PKG_SYSCONFBASE:Q}
|
|
|
|
FILES_SUBST+= PKG_SYSCONFBASEDIR=${PKG_SYSCONFBASEDIR:Q}
|
|
|
|
FILES_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}
|
2003-09-17 04:38:22 +02:00
|
|
|
FILES_SUBST+= CONF_DEPENDS=${CONF_DEPENDS:C/:.*//:Q}
|
2005-12-05 23:07:07 +01:00
|
|
|
FILES_SUBST+= PKGBASE=${PKGBASE:Q}
|
2001-11-19 17:18:44 +01:00
|
|
|
|
2001-11-26 21:37:38 +01:00
|
|
|
# PKG_USERS represents the users to create for the package. It is a
|
|
|
|
# space-separated list of elements of the form
|
2001-11-19 17:18:44 +01:00
|
|
|
#
|
2006-04-23 02:00:43 +02:00
|
|
|
# user:group
|
2001-11-19 17:18:44 +01:00
|
|
|
#
|
2006-04-23 02:00:43 +02:00
|
|
|
# The following variables are optional and specify further details of
|
|
|
|
# the user accounts listed in PKG_USERS:
|
|
|
|
#
|
|
|
|
# PKG_UID.<user> is the hardcoded numeric UID for <user>.
|
|
|
|
# PKG_GECOS.<user> is <user>'s description, as well as contact info.
|
|
|
|
# PKG_HOME.<user> is the home directory for <user>.
|
|
|
|
# PKG_SHELL.<user> is the login shell for <user>.
|
2001-11-19 17:18:44 +01:00
|
|
|
#
|
|
|
|
#
|
2001-11-26 21:37:38 +01:00
|
|
|
# PKG_GROUPS represents the groups to create for the package. It is a
|
|
|
|
# space-separated list of elements of the form
|
2001-11-19 17:18:44 +01:00
|
|
|
#
|
2006-04-23 02:00:43 +02:00
|
|
|
# group
|
|
|
|
#
|
|
|
|
# The following variables are optional and specify further details of
|
|
|
|
# the user accounts listed in PKG_GROUPS:
|
|
|
|
#
|
|
|
|
# PKG_GID.<group> is the hardcoded numeric GID for <group>.
|
|
|
|
#
|
|
|
|
# For example:
|
|
|
|
#
|
|
|
|
# PKG_GROUPS+= mail
|
|
|
|
# PKG_USERS+= courier:mail
|
2001-11-26 21:37:38 +01:00
|
|
|
#
|
2006-04-23 02:00:43 +02:00
|
|
|
# PKG_GECOS.courier= Courier authlib and mail user
|
|
|
|
#
|
|
|
|
# USERGROUP_PHASE is set to the phase just before which users and
|
|
|
|
# groups need to be created. Valid values are "configure" and
|
|
|
|
# "build". If not defined, then by default users and groups
|
|
|
|
# are created prior to installation by the pre-install-script
|
|
|
|
# target. If this is defined, then the numeric UIDs and GIDs
|
|
|
|
# of users and groups required by this package are hardcoded
|
|
|
|
# into the +INSTALL script.
|
2001-11-26 21:37:38 +01:00
|
|
|
#
|
2005-01-28 08:37:55 +01:00
|
|
|
PKG_GROUPS?= # empty
|
2001-11-26 21:37:38 +01:00
|
|
|
PKG_USERS?= # empty
|
|
|
|
_PKG_USER_HOME?= /nonexistent
|
|
|
|
_PKG_USER_SHELL?= ${NOLOGIN}
|
2005-12-05 23:07:07 +01:00
|
|
|
FILES_SUBST+= PKG_USER_HOME=${_PKG_USER_HOME:Q}
|
|
|
|
FILES_SUBST+= PKG_USER_SHELL=${_PKG_USER_SHELL:Q}
|
2001-11-19 17:18:44 +01:00
|
|
|
|
2012-07-09 17:44:06 +02:00
|
|
|
USE_GAMESGROUP?= no
|
|
|
|
SETGIDGAME?= ${USE_GAMESGROUP}
|
Begin cleanup of setgid game infrastructure.
* Introduce USE_GAMESGROUP, which causes the games user and group to
be made available.
* Retain SETGIDGAME as an alias for USE_GAMESGROUP. Describe it as
deprecated.
* Always define GAMES_USER, GAMES_GROUP, GAMEMODE, GAMEDIRMODE, and
GAMEDATAMODE, regardless of whether USE_GAMESGROUP is turned on or not.
* Define these variables in defaults/mk.conf instead of separately in
every platform/*.mk file. The definitions used to be the same for each
of these platforms anyway, except for some where they were randomly
missing or commented out for no clear reason, leading to broken game
packages.
* Handle all these variables properly when unprivileged.
* Update the comments/documentation for these variables.
* Describe GAMEOWN and GAMEGRP as deprecated. These need to be
retained as aliases for GAMES_USER and GAMES_GROUP respectively for
supporting packages that use bsd.*.mk but should otherwise not be
used.
* Add GAMEDATA_PERMS and GAMEDIR_PERMS using GAMEDATAMODE and
GAMEDIRMODE respectively.
* Fix a bug I noticed that was improperly mixing the "games" group
and "games" user.
Things this does *not* do:
- get rid of GAMES_USER, for which there should ultimately be no need.
- move the declaration/documentation/default value of USE_GAMESGROUP
to a suitable place. (It is currently where SETGIDGAME was, which is
suboptimal.)
- touch any of the games, all of which need updating with at least
s/SETGIDGAME/USE_GAMESGROUP/ and probably more.
- update the guide to explain how to handle games properly.
Also, it would be nice if using GAMES_GROUP without setting
USE_GAMESGROUP=yes caused an error but as far as I know there isn't
any particularly good way to arrange this right now.
Note that these changes may alter the build/install behavior of broken
game packages, e.g. some may silently become setgid when they weren't
before or things like that. If you run into any of this file a PR.
While one might arguably bump the PKGREVISION of all games or other
packages using any of these variables as a precaution, that seems like
a bad idea. Instead, I think I will be bumping each game once it
itself has been fixed up to do everything the right way.
2010-07-08 06:57:36 +02:00
|
|
|
# If USE_GAMESGROUP == yes, then we need the "games" group.
|
|
|
|
# SETGIDGAME is a deprecated alias for USE_GAMESGROUP.
|
|
|
|
#
|
2012-07-09 17:44:06 +02:00
|
|
|
# If USE_GAMESGROUP is set, GAMES_GROUP, GAMEMODE, SETGID_GAMES_PERMS,
|
|
|
|
# etc. variables can be used to install setgid games and their data
|
|
|
|
# files.
|
|
|
|
#
|
|
|
|
# SETGIDGAME is a deprecated alternative variable with the same
|
|
|
|
# purpose but a murky history and unclear semantics; it is being
|
|
|
|
# phased out because it conflicts with a like-named build variable in
|
|
|
|
# the NetBSD base system.
|
|
|
|
#
|
Begin cleanup of setgid game infrastructure.
* Introduce USE_GAMESGROUP, which causes the games user and group to
be made available.
* Retain SETGIDGAME as an alias for USE_GAMESGROUP. Describe it as
deprecated.
* Always define GAMES_USER, GAMES_GROUP, GAMEMODE, GAMEDIRMODE, and
GAMEDATAMODE, regardless of whether USE_GAMESGROUP is turned on or not.
* Define these variables in defaults/mk.conf instead of separately in
every platform/*.mk file. The definitions used to be the same for each
of these platforms anyway, except for some where they were randomly
missing or commented out for no clear reason, leading to broken game
packages.
* Handle all these variables properly when unprivileged.
* Update the comments/documentation for these variables.
* Describe GAMEOWN and GAMEGRP as deprecated. These need to be
retained as aliases for GAMES_USER and GAMES_GROUP respectively for
supporting packages that use bsd.*.mk but should otherwise not be
used.
* Add GAMEDATA_PERMS and GAMEDIR_PERMS using GAMEDATAMODE and
GAMEDIRMODE respectively.
* Fix a bug I noticed that was improperly mixing the "games" group
and "games" user.
Things this does *not* do:
- get rid of GAMES_USER, for which there should ultimately be no need.
- move the declaration/documentation/default value of USE_GAMESGROUP
to a suitable place. (It is currently where SETGIDGAME was, which is
suboptimal.)
- touch any of the games, all of which need updating with at least
s/SETGIDGAME/USE_GAMESGROUP/ and probably more.
- update the guide to explain how to handle games properly.
Also, it would be nice if using GAMES_GROUP without setting
USE_GAMESGROUP=yes caused an error but as far as I know there isn't
any particularly good way to arrange this right now.
Note that these changes may alter the build/install behavior of broken
game packages, e.g. some may silently become setgid when they weren't
before or things like that. If you run into any of this file a PR.
While one might arguably bump the PKGREVISION of all games or other
packages using any of these variables as a precaution, that seems like
a bad idea. Instead, I think I will be bumping each game once it
itself has been fixed up to do everything the right way.
2010-07-08 06:57:36 +02:00
|
|
|
# For now we also create the "games" user; this should not be used and
|
|
|
|
# should be removed at some point.
|
|
|
|
.if (defined(USE_GAMESGROUP) && !empty(USE_GAMESGROUP:M[yY][eE][sS])) ||\
|
|
|
|
(defined(SETGIDGAME) && !empty(SETGIDGAME:M[yY][eE][sS]))
|
|
|
|
PKG_GROUPS+= ${GAMES_GROUP}
|
2008-03-04 07:51:41 +01:00
|
|
|
PKG_USERS+= ${GAMES_USER}:${GAMES_GROUP}
|
2012-07-09 23:56:38 +02:00
|
|
|
_BUILD_DEFS+= GAMES_GROUP GAMES_USER GAMEDATAMODE GAMEDIRMODE GAMEMODE
|
2008-03-04 07:51:41 +01:00
|
|
|
.endif
|
|
|
|
|
2007-09-16 16:40:57 +02:00
|
|
|
# Interix is very special in that users and groups cannot have the
|
2004-10-06 22:51:47 +02:00
|
|
|
# same name. Interix.mk tries to work around this by overriding
|
2004-04-27 14:06:11 +02:00
|
|
|
# some specific package defaults. If we get here and there's still a
|
|
|
|
# conflict, add a breakage indicator to make sure the package won't
|
|
|
|
# compile without changing something.
|
|
|
|
#
|
|
|
|
.if !empty(OPSYS:MInterix)
|
2005-02-10 00:56:10 +01:00
|
|
|
. for user in ${PKG_USERS:C/\\\\//g:C/:.*//}
|
|
|
|
. if !empty(PKG_GROUPS:M${user})
|
|
|
|
PKG_FAIL_REASON+= "User and group '${user}' cannot have the same name on Interix"
|
2004-04-27 16:00:16 +02:00
|
|
|
. endif
|
|
|
|
. endfor
|
2004-04-27 14:06:11 +02:00
|
|
|
.endif
|
|
|
|
|
2004-12-27 07:41:50 +01:00
|
|
|
.if !empty(PKG_USERS) || !empty(PKG_GROUPS)
|
|
|
|
DEPENDS+= ${_USER_DEPENDS}
|
2001-11-19 17:18:44 +01:00
|
|
|
.endif
|
|
|
|
|
2006-03-15 05:52:57 +01:00
|
|
|
_INSTALL_USERGROUP_FILE= ${_PKGINSTALL_DIR}/usergroup
|
2006-05-22 01:50:15 +02:00
|
|
|
.if exists(../../mk/pkginstall/usergroupfuncs.${OPSYS})
|
|
|
|
_INSTALL_USERGROUPFUNCS_FILE?= ../../mk/pkginstall/usergroupfuncs.${OPSYS}
|
2005-09-27 00:12:35 +02:00
|
|
|
.else
|
2006-05-22 01:50:15 +02:00
|
|
|
_INSTALL_USERGROUPFUNCS_FILE?= ../../mk/pkginstall/usergroupfuncs
|
2005-09-27 00:12:35 +02:00
|
|
|
.endif
|
2006-03-15 05:52:57 +01:00
|
|
|
_INSTALL_USERGROUP_DATAFILE= ${_PKGINSTALL_DIR}/usergroup-data
|
2006-03-11 00:33:57 +01:00
|
|
|
_INSTALL_UNPACK_TMPL+= ${_INSTALL_USERGROUP_FILE}
|
2006-03-15 05:52:57 +01:00
|
|
|
_INSTALL_DATA_TMPL+= ${_INSTALL_USERGROUP_DATAFILE}
|
2005-01-28 08:37:55 +01:00
|
|
|
|
2006-04-23 02:00:43 +02:00
|
|
|
.for _group_ in ${PKG_GROUPS}
|
|
|
|
. if defined(USERGROUP_PHASE)
|
|
|
|
# Determine the numeric GID of each group.
|
|
|
|
USE_TOOLS+= perl
|
|
|
|
PKG_GID.${_group_}_cmd= \
|
|
|
|
if ${TEST} ! -x ${PERL5}; then ${ECHO} ""; exit 0; fi; \
|
|
|
|
${PERL5} -le 'print scalar getgrnam shift' ${_group_}
|
|
|
|
PKG_GID.${_group_}?= ${PKG_GID.${_group_}_cmd:sh:M*}
|
|
|
|
. endif
|
|
|
|
_PKG_GROUPS+= ${_group_}:${PKG_GID.${_group_}}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for _entry_ in ${PKG_USERS}
|
2008-01-23 15:46:33 +01:00
|
|
|
. for e in ${_entry_:C/\:.*//}
|
|
|
|
. if defined(USERGROUP_PHASE)
|
2006-04-23 02:00:43 +02:00
|
|
|
# Determine the numeric UID of each user.
|
|
|
|
USE_TOOLS+= perl
|
2008-01-23 15:46:33 +01:00
|
|
|
PKG_UID.${e}_cmd= \
|
2006-04-23 02:00:43 +02:00
|
|
|
if ${TEST} ! -x ${PERL5}; then ${ECHO} ""; exit 0; fi; \
|
2008-01-23 15:46:33 +01:00
|
|
|
${PERL5} -le 'print scalar getpwnam shift' ${e}
|
|
|
|
PKG_UID.${e}?= ${PKG_UID.${e}_cmd:sh:M*}
|
|
|
|
. endif
|
|
|
|
_PKG_USERS+= ${_entry_}:${PKG_UID.${e}}:${PKG_GECOS.${e}:Q}:${PKG_HOME.${e}:Q}:${PKG_SHELL.${e}:Q}
|
|
|
|
. endfor
|
2006-04-23 02:00:43 +02:00
|
|
|
.endfor
|
|
|
|
|
2006-03-15 05:52:57 +01:00
|
|
|
${_INSTALL_USERGROUP_DATAFILE}:
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${MKDIR} ${.TARGET:H}
|
|
|
|
${RUN} \
|
2006-04-23 02:00:43 +02:00
|
|
|
set -- dummy ${_PKG_GROUPS:C/\:*$//}; shift; \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
2005-08-05 09:06:47 +02:00
|
|
|
while ${TEST} $$# -gt 0; do \
|
2005-08-19 19:20:33 +02:00
|
|
|
i="$$1"; shift; \
|
2005-01-28 08:37:55 +01:00
|
|
|
${ECHO} "# GROUP: $$i"; \
|
2006-03-15 05:52:57 +01:00
|
|
|
done
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN} \
|
2006-04-23 02:00:43 +02:00
|
|
|
set -- dummy ${_PKG_USERS:C/\:*$//}; shift; \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
2005-08-05 09:06:47 +02:00
|
|
|
while ${TEST} $$# -gt 0; do \
|
2005-08-19 19:20:33 +02:00
|
|
|
i="$$1"; shift; \
|
2005-01-28 08:37:55 +01:00
|
|
|
${ECHO} "# USER: $$i"; \
|
2006-03-15 05:52:57 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
${_INSTALL_USERGROUP_FILE}: ${_INSTALL_USERGROUP_DATAFILE}
|
|
|
|
${_INSTALL_USERGROUP_FILE}: \
|
2006-05-22 01:50:15 +02:00
|
|
|
../../mk/pkginstall/usergroup \
|
2006-03-15 05:52:57 +01:00
|
|
|
${INSTALL_USERGROUPFUNCS_FILE}
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${MKDIR} ${.TARGET:H}
|
|
|
|
${RUN} \
|
2006-05-22 01:50:15 +02:00
|
|
|
${SED} -e "/^# platform-specific adduser\/addgroup functions/r${_INSTALL_USERGROUPFUNCS_FILE}" ../../mk/pkginstall/usergroup | \
|
2006-04-29 06:36:13 +02:00
|
|
|
${SED} ${FILES_SUBST_SED} > ${.TARGET}
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN} \
|
2006-03-15 05:52:57 +01:00
|
|
|
if ${_ZERO_FILESIZE_P} ${_INSTALL_USERGROUP_DATAFILE}; then \
|
2006-03-10 00:31:51 +01:00
|
|
|
${RM} -f ${.TARGET}; \
|
|
|
|
${TOUCH} ${TOUCH_ARGS} ${.TARGET}; \
|
|
|
|
fi
|
2005-01-28 08:37:55 +01:00
|
|
|
|
2006-04-23 02:00:43 +02:00
|
|
|
_INSTALL_USERGROUP_UNPACKER= ${_PKGINSTALL_DIR}/usergroup-unpack
|
|
|
|
|
|
|
|
${_INSTALL_USERGROUP_UNPACKER}: \
|
|
|
|
${_INSTALL_USERGROUP_FILE} \
|
|
|
|
${_INSTALL_USERGROUP_DATAFILE}
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${MKDIR} ${.TARGET:H}
|
|
|
|
${RUN} \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>${.TARGET}; \
|
2006-04-23 02:00:43 +02:00
|
|
|
${ECHO} "#!${SH}"; \
|
|
|
|
${ECHO} ""; \
|
|
|
|
${ECHO} "CAT="${CAT:Q}; \
|
|
|
|
${ECHO} "CHMOD="${CHMOD:Q}; \
|
|
|
|
${ECHO} "SED="${SED:Q}; \
|
|
|
|
${ECHO} ""; \
|
|
|
|
${ECHO} "SELF=\$$0"; \
|
|
|
|
${ECHO} "STAGE=UNPACK"; \
|
|
|
|
${ECHO} ""; \
|
|
|
|
${CAT} ${_INSTALL_USERGROUP_FILE} \
|
|
|
|
${_INSTALL_USERGROUP_DATAFILE}
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${CHMOD} +x ${.TARGET}
|
2006-04-23 02:00:43 +02:00
|
|
|
|
|
|
|
.if defined(USERGROUP_PHASE)
|
|
|
|
. if !empty(USERGROUP_PHASE:M*configure)
|
2006-06-04 02:39:05 +02:00
|
|
|
pre-configure: create-usergroup
|
2006-04-23 02:00:43 +02:00
|
|
|
. elif !empty(USERGROUP_PHASE:M*build)
|
2006-06-04 02:39:05 +02:00
|
|
|
pre-build: create-usergroup
|
2010-06-15 21:23:55 +02:00
|
|
|
. elif !empty(USERGROUP_PHASE:Mpre-install) && ${_USE_DESTDIR} != "no"
|
|
|
|
pre-install: create-usergroup
|
2006-04-23 02:00:43 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
_INSTALL_USERGROUP_CHECK= \
|
2011-09-08 22:17:15 +02:00
|
|
|
${PKGSRC_SETENV} PERL5=${PERL5:Q} \
|
2006-05-22 01:50:15 +02:00
|
|
|
${SH} ${PKGSRCDIR}/mk/pkginstall/usergroup-check
|
2006-04-23 02:00:43 +02:00
|
|
|
|
2006-06-04 02:39:05 +02:00
|
|
|
.PHONY: create-usergroup
|
|
|
|
create-usergroup: su-target
|
2006-06-08 10:01:53 +02:00
|
|
|
@${STEP_MSG} "Requiring users and groups for ${PKGNAME}"
|
2006-06-04 02:39:05 +02:00
|
|
|
|
|
|
|
PRE_CMD.su-create-usergroup= \
|
2006-04-23 02:00:43 +02:00
|
|
|
if ${_INSTALL_USERGROUP_CHECK} -g ${_PKG_GROUPS:C/\:*$//} && \
|
|
|
|
${_INSTALL_USERGROUP_CHECK} -u ${_PKG_USERS:C/\:*$//}; then \
|
|
|
|
exit 0; \
|
2006-06-04 02:39:05 +02:00
|
|
|
fi
|
2006-04-29 05:09:40 +02:00
|
|
|
|
2006-06-04 02:39:05 +02:00
|
|
|
.PHONY: su-create-usergroup
|
|
|
|
su-create-usergroup: ${_INSTALL_USERGROUP_UNPACKER}
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN} \
|
2006-04-23 02:00:43 +02:00
|
|
|
cd ${_PKGINSTALL_DIR} && \
|
2006-04-29 05:54:10 +02:00
|
|
|
${SH} ${_INSTALL_USERGROUP_UNPACKER}; \
|
|
|
|
exitcode=1; \
|
|
|
|
if ${TEST} -f ./+USERGROUP && \
|
|
|
|
./+USERGROUP ADD ${_PKG_DBDIR}/${PKGNAME} && \
|
|
|
|
./+USERGROUP CHECK-ADD ${_PKG_DBDIR}/${PKGNAME}; then \
|
|
|
|
exitcode=0; \
|
|
|
|
fi; \
|
2006-04-23 02:00:43 +02:00
|
|
|
${RM} -f ${_INSTALL_USERGROUP_FILE:Q} \
|
|
|
|
${_INSTALL_USERGROUP_DATAFILE:Q} \
|
|
|
|
${_INSTALL_USERGROUP_UNPACKER:Q} \
|
2006-04-29 05:54:10 +02:00
|
|
|
./+USERGROUP; \
|
|
|
|
exit $$exitcode
|
2006-04-23 02:00:43 +02:00
|
|
|
|
2002-10-05 01:46:26 +02:00
|
|
|
# SPECIAL_PERMS are lists that look like:
|
|
|
|
# file user group mode
|
2010-03-10 16:01:42 +01:00
|
|
|
# At post-install time, <file> (it may be a directory) is changed
|
|
|
|
# to be owned by <user>:<group> with <mode> permissions. If a file
|
|
|
|
# pathname is relative, then it is taken to be relative to ${PREFIX}.
|
|
|
|
#
|
|
|
|
# SPECIAL_PERMS should be used primarily to change permissions of
|
|
|
|
# files or directories listed in the PLIST. This may be used to
|
|
|
|
# make certain files set-uid or to change the ownership or a
|
|
|
|
# directory.
|
|
|
|
#
|
|
|
|
# Note that when USE_DESTDIR is in effect, the special permissions
|
|
|
|
# are not directly recorded (as file attributes) in the binary
|
|
|
|
# package file.
|
2002-10-05 01:46:26 +02:00
|
|
|
#
|
2002-10-20 20:01:47 +02:00
|
|
|
# SETUID_ROOT_PERMS is a convenience definition to note an executable is
|
|
|
|
# meant to be setuid-root, and should be used as follows:
|
|
|
|
#
|
|
|
|
# SPECIAL_PERMS+= /path/to/suidroot ${SETUID_ROOT_PERMS}
|
|
|
|
#
|
2008-03-04 07:45:33 +01:00
|
|
|
# SETGID_GAMES_PERMS is a convenience definition to note an executable is
|
Begin cleanup of setgid game infrastructure.
* Introduce USE_GAMESGROUP, which causes the games user and group to
be made available.
* Retain SETGIDGAME as an alias for USE_GAMESGROUP. Describe it as
deprecated.
* Always define GAMES_USER, GAMES_GROUP, GAMEMODE, GAMEDIRMODE, and
GAMEDATAMODE, regardless of whether USE_GAMESGROUP is turned on or not.
* Define these variables in defaults/mk.conf instead of separately in
every platform/*.mk file. The definitions used to be the same for each
of these platforms anyway, except for some where they were randomly
missing or commented out for no clear reason, leading to broken game
packages.
* Handle all these variables properly when unprivileged.
* Update the comments/documentation for these variables.
* Describe GAMEOWN and GAMEGRP as deprecated. These need to be
retained as aliases for GAMES_USER and GAMES_GROUP respectively for
supporting packages that use bsd.*.mk but should otherwise not be
used.
* Add GAMEDATA_PERMS and GAMEDIR_PERMS using GAMEDATAMODE and
GAMEDIRMODE respectively.
* Fix a bug I noticed that was improperly mixing the "games" group
and "games" user.
Things this does *not* do:
- get rid of GAMES_USER, for which there should ultimately be no need.
- move the declaration/documentation/default value of USE_GAMESGROUP
to a suitable place. (It is currently where SETGIDGAME was, which is
suboptimal.)
- touch any of the games, all of which need updating with at least
s/SETGIDGAME/USE_GAMESGROUP/ and probably more.
- update the guide to explain how to handle games properly.
Also, it would be nice if using GAMES_GROUP without setting
USE_GAMESGROUP=yes caused an error but as far as I know there isn't
any particularly good way to arrange this right now.
Note that these changes may alter the build/install behavior of broken
game packages, e.g. some may silently become setgid when they weren't
before or things like that. If you run into any of this file a PR.
While one might arguably bump the PKGREVISION of all games or other
packages using any of these variables as a precaution, that seems like
a bad idea. Instead, I think I will be bumping each game once it
itself has been fixed up to do everything the right way.
2010-07-08 06:57:36 +02:00
|
|
|
# meant to be setgid games, and should be used as follows:
|
2008-03-04 06:11:18 +01:00
|
|
|
#
|
2008-03-04 07:45:33 +01:00
|
|
|
# SPECIAL_PERMS+= /path/to/sgidgame ${SETGID_GAMES_PERMS}
|
2008-03-04 06:11:18 +01:00
|
|
|
#
|
Begin cleanup of setgid game infrastructure.
* Introduce USE_GAMESGROUP, which causes the games user and group to
be made available.
* Retain SETGIDGAME as an alias for USE_GAMESGROUP. Describe it as
deprecated.
* Always define GAMES_USER, GAMES_GROUP, GAMEMODE, GAMEDIRMODE, and
GAMEDATAMODE, regardless of whether USE_GAMESGROUP is turned on or not.
* Define these variables in defaults/mk.conf instead of separately in
every platform/*.mk file. The definitions used to be the same for each
of these platforms anyway, except for some where they were randomly
missing or commented out for no clear reason, leading to broken game
packages.
* Handle all these variables properly when unprivileged.
* Update the comments/documentation for these variables.
* Describe GAMEOWN and GAMEGRP as deprecated. These need to be
retained as aliases for GAMES_USER and GAMES_GROUP respectively for
supporting packages that use bsd.*.mk but should otherwise not be
used.
* Add GAMEDATA_PERMS and GAMEDIR_PERMS using GAMEDATAMODE and
GAMEDIRMODE respectively.
* Fix a bug I noticed that was improperly mixing the "games" group
and "games" user.
Things this does *not* do:
- get rid of GAMES_USER, for which there should ultimately be no need.
- move the declaration/documentation/default value of USE_GAMESGROUP
to a suitable place. (It is currently where SETGIDGAME was, which is
suboptimal.)
- touch any of the games, all of which need updating with at least
s/SETGIDGAME/USE_GAMESGROUP/ and probably more.
- update the guide to explain how to handle games properly.
Also, it would be nice if using GAMES_GROUP without setting
USE_GAMESGROUP=yes caused an error but as far as I know there isn't
any particularly good way to arrange this right now.
Note that these changes may alter the build/install behavior of broken
game packages, e.g. some may silently become setgid when they weren't
before or things like that. If you run into any of this file a PR.
While one might arguably bump the PKGREVISION of all games or other
packages using any of these variables as a precaution, that seems like
a bad idea. Instead, I think I will be bumping each game once it
itself has been fixed up to do everything the right way.
2010-07-08 06:57:36 +02:00
|
|
|
# GAMEDATA_PERMS and GAMEDIR_PERMS are convenience defintiions for files
|
|
|
|
# that are meant to be accessed by things that are setgid games. Because
|
|
|
|
# such files should normally be under ${VARBASE}, generally these
|
|
|
|
# definitions should be used roughly as follows:
|
|
|
|
#
|
|
|
|
# REQD_DIRS_PERMS+= /path/to/scoredir ${GAMEDIR_PERMS}
|
|
|
|
# REQD_FILES_PERMS+= /dev/null /path/to/scorefile ${GAMEDATA_PERMS}
|
|
|
|
#
|
|
|
|
# Note that GAMEDIR_PERMS should only be used when the game requires
|
|
|
|
# write access to scribble in its directory; many games do not, in which
|
|
|
|
# case REQD_DIRS instead of REQD_DIRS_PERMS can be used and GAMEDIR_PERMS
|
|
|
|
# is not needed.
|
|
|
|
#
|
2007-03-13 10:43:59 +01:00
|
|
|
# Keywords: setuid setgid st_mode perms
|
|
|
|
#
|
2002-10-05 01:46:26 +02:00
|
|
|
SPECIAL_PERMS?= # empty
|
2007-06-16 00:04:33 +02:00
|
|
|
SETUID_ROOT_PERMS?= ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 4511
|
2008-03-04 07:45:33 +01:00
|
|
|
SETGID_GAMES_PERMS?= ${GAMES_USER} ${GAMES_GROUP} ${GAMEMODE}
|
Begin cleanup of setgid game infrastructure.
* Introduce USE_GAMESGROUP, which causes the games user and group to
be made available.
* Retain SETGIDGAME as an alias for USE_GAMESGROUP. Describe it as
deprecated.
* Always define GAMES_USER, GAMES_GROUP, GAMEMODE, GAMEDIRMODE, and
GAMEDATAMODE, regardless of whether USE_GAMESGROUP is turned on or not.
* Define these variables in defaults/mk.conf instead of separately in
every platform/*.mk file. The definitions used to be the same for each
of these platforms anyway, except for some where they were randomly
missing or commented out for no clear reason, leading to broken game
packages.
* Handle all these variables properly when unprivileged.
* Update the comments/documentation for these variables.
* Describe GAMEOWN and GAMEGRP as deprecated. These need to be
retained as aliases for GAMES_USER and GAMES_GROUP respectively for
supporting packages that use bsd.*.mk but should otherwise not be
used.
* Add GAMEDATA_PERMS and GAMEDIR_PERMS using GAMEDATAMODE and
GAMEDIRMODE respectively.
* Fix a bug I noticed that was improperly mixing the "games" group
and "games" user.
Things this does *not* do:
- get rid of GAMES_USER, for which there should ultimately be no need.
- move the declaration/documentation/default value of USE_GAMESGROUP
to a suitable place. (It is currently where SETGIDGAME was, which is
suboptimal.)
- touch any of the games, all of which need updating with at least
s/SETGIDGAME/USE_GAMESGROUP/ and probably more.
- update the guide to explain how to handle games properly.
Also, it would be nice if using GAMES_GROUP without setting
USE_GAMESGROUP=yes caused an error but as far as I know there isn't
any particularly good way to arrange this right now.
Note that these changes may alter the build/install behavior of broken
game packages, e.g. some may silently become setgid when they weren't
before or things like that. If you run into any of this file a PR.
While one might arguably bump the PKGREVISION of all games or other
packages using any of these variables as a precaution, that seems like
a bad idea. Instead, I think I will be bumping each game once it
itself has been fixed up to do everything the right way.
2010-07-08 06:57:36 +02:00
|
|
|
GAMEDATA_PERMS?= ${GAMES_USER} ${GAMES_GROUP} ${GAMEDATAMODE}
|
|
|
|
GAMEDIR_PERMS?= ${GAMES_USER} ${GAMES_GROUP} ${GAMEDIRMODE}
|
2005-02-02 11:33:01 +01:00
|
|
|
|
2006-03-15 05:52:57 +01:00
|
|
|
_INSTALL_PERMS_FILE= ${_PKGINSTALL_DIR}/perms
|
|
|
|
_INSTALL_PERMS_DATAFILE= ${_PKGINSTALL_DIR}/perms-data
|
|
|
|
_INSTALL_UNPACK_TMPL+= ${_INSTALL_PERMS_FILE}
|
|
|
|
_INSTALL_DATA_TMPL+= ${_INSTALL_PERMS_DATAFILE}
|
2005-02-02 11:33:01 +01:00
|
|
|
|
2006-03-15 05:52:57 +01:00
|
|
|
${_INSTALL_PERMS_DATAFILE}:
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${MKDIR} ${.TARGET:H}
|
|
|
|
${RUN}${_FUNC_STRIP_PREFIX}; \
|
2005-08-23 13:48:47 +02:00
|
|
|
set -- dummy ${SPECIAL_PERMS}; shift; \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
2005-02-02 11:33:01 +01:00
|
|
|
while ${TEST} $$# -gt 0; do \
|
|
|
|
file="$$1"; owner="$$2"; group="$$3"; mode="$$4"; \
|
|
|
|
shift; shift; shift; shift; \
|
2005-08-04 17:03:39 +02:00
|
|
|
file=`strip_prefix "$$file"`; \
|
2005-02-02 11:33:01 +01:00
|
|
|
${ECHO} "# PERMS: $$file $$mode $$owner $$group"; \
|
2006-03-15 05:52:57 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
${_INSTALL_PERMS_FILE}: ${_INSTALL_PERMS_DATAFILE}
|
2006-05-22 01:50:15 +02:00
|
|
|
${_INSTALL_PERMS_FILE}: ../../mk/pkginstall/perms
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${MKDIR} ${.TARGET:H}
|
|
|
|
${RUN} \
|
2006-05-22 01:50:15 +02:00
|
|
|
${SED} ${FILES_SUBST_SED} ../../mk/pkginstall/perms > ${.TARGET}
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN} \
|
2006-03-15 05:52:57 +01:00
|
|
|
if ${_ZERO_FILESIZE_P} ${_INSTALL_PERMS_DATAFILE}; then \
|
2006-03-10 00:31:51 +01:00
|
|
|
${RM} -f ${.TARGET}; \
|
|
|
|
${TOUCH} ${TOUCH_ARGS} ${.TARGET}; \
|
|
|
|
fi
|
2002-10-05 01:46:26 +02:00
|
|
|
|
2007-10-10 13:42:36 +02:00
|
|
|
# CONF_FILES
|
|
|
|
# REQD_FILES
|
|
|
|
# Pairs of example and true config files, used much like MLINKS in
|
|
|
|
# the NetBSD base system. At post-install time, if the true config
|
2001-11-19 17:18:44 +01:00
|
|
|
# file doesn't exist, then the example one is copied into place. At
|
|
|
|
# deinstall time, the true one is removed if it doesn't differ from the
|
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-20 00:24:09 +02:00
|
|
|
# example one. REQD_FILES is the same as CONF_FILES but the value
|
2007-10-10 13:42:36 +02:00
|
|
|
# of PKG_CONFIG is ignored.
|
|
|
|
#
|
|
|
|
# However, all files listed in REQD_FILES should be under ${PREFIX}.
|
|
|
|
# (XXX: Why?)
|
2001-11-19 17:18:44 +01:00
|
|
|
#
|
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-20 00:24:09 +02:00
|
|
|
# CONF_FILES_MODE and REQD_FILES_MODE are the file permissions for the
|
|
|
|
# files in CONF_FILES and REQD_FILES, respectively.
|
2001-11-19 17:18:44 +01:00
|
|
|
#
|
2007-10-10 13:42:36 +02:00
|
|
|
# CONF_FILES_PERMS
|
|
|
|
# REQD_FILES_PERMS
|
|
|
|
# Lists that look like:
|
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-20 00:24:09 +02:00
|
|
|
#
|
2001-11-19 17:18:44 +01:00
|
|
|
# example_file config_file user group mode
|
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-20 00:24:09 +02:00
|
|
|
#
|
2007-10-10 13:42:36 +02:00
|
|
|
# This works like CONF_FILES and REQD_FILES, except that the config
|
|
|
|
# files are owned by user:group and have mode permissions.
|
|
|
|
# REQD_FILES_PERMS is the same as CONF_FILES_PERMS but the value of
|
|
|
|
# PKG_CONFIG is ignored;
|
|
|
|
#
|
|
|
|
# However, all files listed in REQD_FILES_PERMS should be under
|
|
|
|
# ${PREFIX}. (XXX: Why?)
|
2001-11-19 17:18:44 +01:00
|
|
|
#
|
2007-09-16 16:40:57 +02:00
|
|
|
# RCD_SCRIPTS lists the basenames of the rc.d scripts. They are
|
2005-05-02 22:33:57 +02:00
|
|
|
# expected to be found in ${PREFIX}/share/examples/rc.d, and
|
2004-10-12 00:04:19 +02:00
|
|
|
# the scripts will be copied into ${RCD_SCRIPTS_DIR} with
|
|
|
|
# ${RCD_SCRIPTS_MODE} permissions.
|
2001-11-19 17:18:44 +01:00
|
|
|
#
|
2005-07-29 23:41:04 +02:00
|
|
|
# If any file pathnames are relative, then they are taken to be relative
|
|
|
|
# to ${PREFIX}.
|
|
|
|
#
|
2007-10-10 13:42:36 +02:00
|
|
|
# Keywords: etc conf configuration
|
|
|
|
#
|
|
|
|
|
2001-11-19 17:18:44 +01:00
|
|
|
CONF_FILES?= # empty
|
|
|
|
CONF_FILES_MODE?= 0644
|
|
|
|
CONF_FILES_PERMS?= # empty
|
|
|
|
RCD_SCRIPTS?= # empty
|
|
|
|
RCD_SCRIPTS_MODE?= 0755
|
2005-05-02 22:33:57 +02:00
|
|
|
RCD_SCRIPTS_EXAMPLEDIR= share/examples/rc.d
|
2002-09-20 02:45:00 +02:00
|
|
|
RCD_SCRIPTS_SHELL?= ${SH}
|
2005-12-05 23:07:07 +01:00
|
|
|
FILES_SUBST+= RCD_SCRIPTS_SHELL=${RCD_SCRIPTS_SHELL:Q}
|
2002-10-19 03:33:51 +02:00
|
|
|
MESSAGE_SUBST+= RCD_SCRIPTS_DIR=${RCD_SCRIPTS_DIR}
|
2004-10-11 23:49:00 +02:00
|
|
|
MESSAGE_SUBST+= RCD_SCRIPTS_EXAMPLEDIR=${RCD_SCRIPTS_EXAMPLEDIR}
|
2001-12-18 20:54:00 +01:00
|
|
|
|
2006-03-15 05:52:57 +01:00
|
|
|
_INSTALL_FILES_FILE= ${_PKGINSTALL_DIR}/files
|
|
|
|
_INSTALL_FILES_DATAFILE= ${_PKGINSTALL_DIR}/files-data
|
|
|
|
_INSTALL_UNPACK_TMPL+= ${_INSTALL_FILES_FILE}
|
|
|
|
_INSTALL_DATA_TMPL+= ${_INSTALL_FILES_DATAFILE}
|
2005-02-02 11:33:01 +01:00
|
|
|
|
2014-03-11 14:45:07 +01:00
|
|
|
# Only generate init scripts if we are using rc.d
|
|
|
|
_INSTALL_RCD_SCRIPTS= # empty
|
|
|
|
|
|
|
|
.if ${INIT_SYSTEM} == "rc.d"
|
|
|
|
_INSTALL_RCD_SCRIPTS= ${RCD_SCRIPTS}
|
|
|
|
.endif
|
|
|
|
|
2007-11-23 12:36:19 +01:00
|
|
|
privileged-install-hook: _pkginstall-postinstall-check
|
|
|
|
_pkginstall-postinstall-check: .PHONY
|
|
|
|
${RUN} p="${DESTDIR}${PREFIX}"; \
|
|
|
|
${_FUNC_STRIP_PREFIX}; \
|
2007-11-23 12:50:19 +01:00
|
|
|
canon() { f=`strip_prefix "$$1"`; case $$f in [!/]*) f="$$p/$$f"; esac; echo "$$f"; }; \
|
2007-12-06 23:03:22 +01:00
|
|
|
needargs() { [ $$3 -ge $$2 ] || ${FAIL_MSG} "[bsd.pkginstall.mk] $$1 must have a multiple of $$2 words. Rest: $$4"; }; \
|
2014-03-11 14:45:07 +01:00
|
|
|
set args ${_INSTALL_RCD_SCRIPTS}; shift; \
|
2007-11-23 12:36:19 +01:00
|
|
|
while [ $$# -gt 0 ]; do \
|
2007-11-23 12:50:19 +01:00
|
|
|
egfile=`canon "${RCD_SCRIPTS_EXAMPLEDIR}/$$1"`; shift; \
|
2008-01-29 20:18:26 +01:00
|
|
|
[ -f "$$egfile" ] || [ -c "$$egfile" ] || ${FAIL_MSG} "RCD_SCRIPT $$egfile does not exist."; \
|
2007-11-23 12:36:19 +01:00
|
|
|
done; \
|
|
|
|
set args ${CONF_FILES}; shift; \
|
|
|
|
while [ $$# -gt 0 ]; do \
|
2007-12-06 23:03:22 +01:00
|
|
|
needargs CONF_FILES 2 $$# "$$*"; \
|
2007-11-23 12:50:19 +01:00
|
|
|
egfile=`canon "$$1"`; shift 2; \
|
2008-01-29 20:18:26 +01:00
|
|
|
[ -f "$$egfile" ] || [ -c "$$egfile" ] || ${FAIL_MSG} "CONF_FILE $$egfile does not exist."; \
|
2007-11-23 12:36:19 +01:00
|
|
|
done; \
|
|
|
|
set args ${REQD_FILES}; shift; \
|
|
|
|
while [ $$# -gt 0 ]; do \
|
2007-12-06 23:03:22 +01:00
|
|
|
needargs REDQ_FILES 2 $$# "$$*"; \
|
2007-11-23 12:50:19 +01:00
|
|
|
egfile=`canon "$$1"`; shift 2; \
|
2008-01-29 20:18:26 +01:00
|
|
|
[ -f "$$egfile" ] || [ -c "$$egfile" ] || ${FAIL_MSG} "REQD_FILE $$egfile does not exist."; \
|
2007-11-23 12:36:19 +01:00
|
|
|
done; \
|
|
|
|
set args ${CONF_FILES_PERMS}; shift; \
|
|
|
|
while [ $$# -gt 0 ]; do \
|
2007-12-06 23:03:22 +01:00
|
|
|
needargs CONF_FILES_PERMS 5 $$# "$$*"; \
|
2007-11-23 12:50:19 +01:00
|
|
|
egfile=`canon "$$1"`; shift 5; \
|
2008-01-29 20:18:26 +01:00
|
|
|
[ -f "$$egfile" ] || [ -c "$$egfile" ] || ${FAIL_MSG} "CONF_FILES_PERMS $$egfile does not exist."; \
|
2007-11-23 12:36:19 +01:00
|
|
|
done; \
|
|
|
|
set args ${REQD_FILES_PERMS}; shift; \
|
|
|
|
while [ $$# -gt 0 ]; do \
|
2007-12-06 23:03:22 +01:00
|
|
|
needargs REQD_FILES_PERMS 5 $$# "$$*"; \
|
2007-11-23 12:50:19 +01:00
|
|
|
egfile=`canon "$$1"`; shift 5; \
|
2008-01-29 20:18:26 +01:00
|
|
|
[ -f "$$egfile" ] || [ -c "$$egfile" ] || ${FAIL_MSG} "REQD_FILES_PERMS $$egfile does not exist."; \
|
2007-11-23 12:36:19 +01:00
|
|
|
done
|
|
|
|
|
2006-03-15 05:52:57 +01:00
|
|
|
${_INSTALL_FILES_DATAFILE}:
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${MKDIR} ${.TARGET:H}
|
|
|
|
${RUN}${_FUNC_STRIP_PREFIX}; \
|
2014-03-11 14:45:07 +01:00
|
|
|
set -- dummy ${_INSTALL_RCD_SCRIPTS}; shift; \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
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-20 00:24:09 +02:00
|
|
|
while ${TEST} $$# -gt 0; do \
|
|
|
|
script="$$1"; shift; \
|
|
|
|
file="${RCD_SCRIPTS_DIR:S/^${PREFIX}\///}/$$script"; \
|
|
|
|
egfile="${RCD_SCRIPTS_EXAMPLEDIR}/$$script"; \
|
|
|
|
${ECHO} "# FILE: $$file cr $$egfile ${RCD_SCRIPTS_MODE}"; \
|
2005-08-23 10:54:29 +02:00
|
|
|
done
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${_FUNC_STRIP_PREFIX}; \
|
2005-08-23 13:48:47 +02:00
|
|
|
set -- dummy ${CONF_FILES}; shift; \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
2005-02-02 11:33:01 +01:00
|
|
|
while ${TEST} $$# -gt 0; do \
|
|
|
|
egfile="$$1"; file="$$2"; \
|
|
|
|
shift; shift; \
|
2005-08-04 17:03:39 +02:00
|
|
|
egfile=`strip_prefix "$$egfile"`; \
|
|
|
|
file=`strip_prefix "$$file"`; \
|
2005-02-02 11:33:01 +01:00
|
|
|
${ECHO} "# FILE: $$file c $$egfile ${CONF_FILES_MODE}"; \
|
2005-08-23 10:54:29 +02:00
|
|
|
done
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${_FUNC_STRIP_PREFIX}; \
|
2005-08-23 13:48:47 +02:00
|
|
|
set -- dummy ${REQD_FILES}; shift; \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
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-20 00:24:09 +02:00
|
|
|
while ${TEST} $$# -gt 0; do \
|
|
|
|
egfile="$$1"; file="$$2"; \
|
|
|
|
shift; shift; \
|
|
|
|
egfile=`strip_prefix "$$egfile"`; \
|
|
|
|
file=`strip_prefix "$$file"`; \
|
|
|
|
${ECHO} "# FILE: $$file cf $$egfile ${REQD_FILES_MODE}"; \
|
2005-08-23 10:54:29 +02:00
|
|
|
done
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${_FUNC_STRIP_PREFIX}; \
|
2005-08-23 13:48:47 +02:00
|
|
|
set -- dummy ${CONF_FILES_PERMS}; shift; \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
2005-02-02 11:33:01 +01:00
|
|
|
while ${TEST} $$# -gt 0; do \
|
|
|
|
egfile="$$1"; file="$$2"; \
|
|
|
|
owner="$$3"; group="$$4"; mode="$$5"; \
|
|
|
|
shift; shift; shift; shift; shift; \
|
2005-08-04 17:03:39 +02:00
|
|
|
egfile=`strip_prefix "$$egfile"`; \
|
|
|
|
file=`strip_prefix "$$file"`; \
|
2005-02-02 11:33:01 +01:00
|
|
|
${ECHO} "# FILE: $$file c $$egfile $$mode $$owner $$group"; \
|
2005-08-23 10:54:29 +02:00
|
|
|
done
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${_FUNC_STRIP_PREFIX}; \
|
2005-08-23 13:48:47 +02:00
|
|
|
set -- dummy ${REQD_FILES_PERMS}; shift; \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
2005-02-02 11:33:01 +01:00
|
|
|
while ${TEST} $$# -gt 0; do \
|
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-20 00:24:09 +02:00
|
|
|
egfile="$$1"; file="$$2"; \
|
|
|
|
owner="$$3"; group="$$4"; mode="$$5"; \
|
|
|
|
shift; shift; shift; shift; shift; \
|
|
|
|
egfile=`strip_prefix "$$egfile"`; \
|
|
|
|
file=`strip_prefix "$$file"`; \
|
|
|
|
${ECHO} "# FILE: $$file cf $$egfile $$mode $$owner $$group"; \
|
2005-08-23 10:54:29 +02:00
|
|
|
done
|
2006-03-15 05:52:57 +01:00
|
|
|
|
|
|
|
${_INSTALL_FILES_FILE}: ${_INSTALL_FILES_DATAFILE}
|
2006-05-22 01:50:15 +02:00
|
|
|
${_INSTALL_FILES_FILE}: ../../mk/pkginstall/files
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${MKDIR} ${.TARGET:H}
|
|
|
|
${RUN} \
|
2006-05-22 01:50:15 +02:00
|
|
|
${SED} ${FILES_SUBST_SED} ../../mk/pkginstall/files > ${.TARGET}
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN} \
|
2006-03-15 05:52:57 +01:00
|
|
|
if ${_ZERO_FILESIZE_P} ${_INSTALL_FILES_DATAFILE}; then \
|
2006-03-10 00:31:51 +01:00
|
|
|
${RM} -f ${.TARGET}; \
|
|
|
|
${TOUCH} ${TOUCH_ARGS} ${.TARGET}; \
|
|
|
|
fi
|
2005-02-02 11:33:01 +01:00
|
|
|
|
2001-11-19 17:18:44 +01:00
|
|
|
# OWN_DIRS contains a list of directories for this package that should be
|
|
|
|
# created and should attempt to be destroyed by the INSTALL/DEINSTALL
|
|
|
|
# scripts. MAKE_DIRS is used the same way, but the package admin
|
|
|
|
# isn't prompted to remove the directory at post-deinstall time if it
|
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-20 00:24:09 +02:00
|
|
|
# isn't empty. REQD_DIRS is like MAKE_DIRS but the value of PKG_CONFIG
|
2005-08-20 04:22:02 +02:00
|
|
|
# is ignored; however, all directories listed in REQD_DIRS should
|
|
|
|
# be under ${PREFIX}.
|
2001-11-19 17:18:44 +01:00
|
|
|
#
|
|
|
|
# OWN_DIRS_PERMS contains a list of "directory owner group mode" sublists
|
|
|
|
# representing directories for this package that should be
|
|
|
|
# created/destroyed by the INSTALL/DEINSTALL scripts. MAKE_DIRS_PERMS
|
|
|
|
# is used the same way but the package admin isn't prompted to remove
|
|
|
|
# the directory at post-deinstall time if it isn't empty.
|
2011-04-30 23:58:37 +02:00
|
|
|
# REQD_DIRS_PERMS is like MAKE_DIRS_PERMS but the value of PKG_CONFIG is
|
2005-08-20 04:22:02 +02:00
|
|
|
# ignored; however, all directories listed in REQD_DIRS should be
|
|
|
|
# under ${PREFIX}.
|
2001-11-19 17:18:44 +01:00
|
|
|
#
|
2007-06-15 16:14:36 +02:00
|
|
|
# PKG_SYSCONFDIR_PERMS contains a list of "owner group mode" for
|
|
|
|
# ${PKG_SYSCONFDIR}, and only takes effect if PKG_SYSCONFSUBDIR
|
|
|
|
# is non-empty. This is a special case to handle setting
|
|
|
|
# special permissions for ${PKG_SYSCONFDIR}, as ${PKG_SYSCONFDIR}
|
|
|
|
# is (effectively) automatically added to MAKE_DIRS_PERMS.
|
|
|
|
#
|
2005-07-29 23:41:04 +02:00
|
|
|
# If any directory pathnames are relative, then they are taken to be
|
|
|
|
# relative to ${PREFIX}.
|
|
|
|
#
|
2001-11-19 17:18:44 +01:00
|
|
|
MAKE_DIRS?= # empty
|
|
|
|
MAKE_DIRS_PERMS?= # empty
|
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-20 00:24:09 +02:00
|
|
|
REQD_DIRS?= # empty
|
|
|
|
REQD_DIRS_PERMS?= # empty
|
2001-11-19 17:18:44 +01:00
|
|
|
OWN_DIRS?= # empty
|
|
|
|
OWN_DIRS_PERMS?= # empty
|
Use reference counts to properly account for the creation and removal
of directories needed for the proper functioning of each package.
The +INSTALL script unpacks a +DIRS script that adds and removes
directories. The +DIRS script entirely encapsulates the directory
creation and removal, and completely replaces the code in the
mk/install/install and mk/install/deinstall templates that handled
{MAKE,OWN}_DIRS and {MAKE,OWN}_DIRS_PERMS.
The +DIRS script is meant to be executed from within the package
meta-data directory, e.g. /var/db/pkg/<pkgname>. It's usage is:
./+DIRS ADD|REMOVE|CHECK-ADD|CHECK-REMOVE
The ADD and REMOVE actions cause the necessary directories to be added
or removed from the system. The CHECK-ADD and CHECK-REMOVE actions
print out informative messages prompting the user to either create or
remove some necessary directories.
The behaviour of "ADD" is such that if the directory already exists
on the system and is not already ref-counted, then that directory is
marked as "pre-existing". On "REMOVE", pre-existing directories are
left untouched on the filesystem.
At any time, the root user can sanity-check the directories needed by
packages by invoking all of the +DIRS scripts with the "CHECK-ADD"
action. If there are missing directories, then invoking all of the
+DIRS scripts with the "ADD" action will ensure that any missing
directories are created.
The reference counts database is stored in ${PKG_DBDIR}/.refcount.
The reference counts related to directories managed by the +DIRS script
are stored in ${PKG_DBDIR}/.refcount/dirs. If the directory reference
counts database is removed, then invoking all of the +DIRS scripts
with the "ADD" action will reconstruct the database; however, directories
may be marked as being pre-existing, so they won't be removed at
package de-installation (although a message will be displayed informing
the user that those directories can be removed).
2005-01-28 07:30:58 +01:00
|
|
|
|
2006-03-15 05:52:57 +01:00
|
|
|
_INSTALL_DIRS_FILE= ${_PKGINSTALL_DIR}/dirs
|
|
|
|
_INSTALL_DIRS_DATAFILE= ${_PKGINSTALL_DIR}/dirs-data
|
2006-03-11 00:33:57 +01:00
|
|
|
_INSTALL_UNPACK_TMPL+= ${_INSTALL_DIRS_FILE}
|
2006-03-15 05:52:57 +01:00
|
|
|
_INSTALL_DATA_TMPL+= ${_INSTALL_DIRS_DATAFILE}
|
Use reference counts to properly account for the creation and removal
of directories needed for the proper functioning of each package.
The +INSTALL script unpacks a +DIRS script that adds and removes
directories. The +DIRS script entirely encapsulates the directory
creation and removal, and completely replaces the code in the
mk/install/install and mk/install/deinstall templates that handled
{MAKE,OWN}_DIRS and {MAKE,OWN}_DIRS_PERMS.
The +DIRS script is meant to be executed from within the package
meta-data directory, e.g. /var/db/pkg/<pkgname>. It's usage is:
./+DIRS ADD|REMOVE|CHECK-ADD|CHECK-REMOVE
The ADD and REMOVE actions cause the necessary directories to be added
or removed from the system. The CHECK-ADD and CHECK-REMOVE actions
print out informative messages prompting the user to either create or
remove some necessary directories.
The behaviour of "ADD" is such that if the directory already exists
on the system and is not already ref-counted, then that directory is
marked as "pre-existing". On "REMOVE", pre-existing directories are
left untouched on the filesystem.
At any time, the root user can sanity-check the directories needed by
packages by invoking all of the +DIRS scripts with the "CHECK-ADD"
action. If there are missing directories, then invoking all of the
+DIRS scripts with the "ADD" action will ensure that any missing
directories are created.
The reference counts database is stored in ${PKG_DBDIR}/.refcount.
The reference counts related to directories managed by the +DIRS script
are stored in ${PKG_DBDIR}/.refcount/dirs. If the directory reference
counts database is removed, then invoking all of the +DIRS scripts
with the "ADD" action will reconstruct the database; however, directories
may be marked as being pre-existing, so they won't be removed at
package de-installation (although a message will be displayed informing
the user that those directories can be removed).
2005-01-28 07:30:58 +01:00
|
|
|
|
2006-03-15 05:52:57 +01:00
|
|
|
${_INSTALL_DIRS_DATAFILE}:
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${MKDIR} ${.TARGET:H}
|
|
|
|
${RUN}${_FUNC_STRIP_PREFIX}; \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
2005-09-30 18:39:26 +02:00
|
|
|
case ${PKG_SYSCONFSUBDIR:M*:Q}${CONF_FILES:M*:Q}${CONF_FILES_PERMS:M*:Q}"" in \
|
Use reference counts to properly account for the creation and removal
of directories needed for the proper functioning of each package.
The +INSTALL script unpacks a +DIRS script that adds and removes
directories. The +DIRS script entirely encapsulates the directory
creation and removal, and completely replaces the code in the
mk/install/install and mk/install/deinstall templates that handled
{MAKE,OWN}_DIRS and {MAKE,OWN}_DIRS_PERMS.
The +DIRS script is meant to be executed from within the package
meta-data directory, e.g. /var/db/pkg/<pkgname>. It's usage is:
./+DIRS ADD|REMOVE|CHECK-ADD|CHECK-REMOVE
The ADD and REMOVE actions cause the necessary directories to be added
or removed from the system. The CHECK-ADD and CHECK-REMOVE actions
print out informative messages prompting the user to either create or
remove some necessary directories.
The behaviour of "ADD" is such that if the directory already exists
on the system and is not already ref-counted, then that directory is
marked as "pre-existing". On "REMOVE", pre-existing directories are
left untouched on the filesystem.
At any time, the root user can sanity-check the directories needed by
packages by invoking all of the +DIRS scripts with the "CHECK-ADD"
action. If there are missing directories, then invoking all of the
+DIRS scripts with the "ADD" action will ensure that any missing
directories are created.
The reference counts database is stored in ${PKG_DBDIR}/.refcount.
The reference counts related to directories managed by the +DIRS script
are stored in ${PKG_DBDIR}/.refcount/dirs. If the directory reference
counts database is removed, then invoking all of the +DIRS scripts
with the "ADD" action will reconstruct the database; however, directories
may be marked as being pre-existing, so they won't be removed at
package de-installation (although a message will be displayed informing
the user that those directories can be removed).
2005-01-28 07:30:58 +01:00
|
|
|
"") ;; \
|
2006-04-26 07:58:44 +02:00
|
|
|
*) case ${PKG_SYSCONFSUBDIR:M*:Q}"" in \
|
|
|
|
"") ${ECHO} "# DIR: ${PKG_SYSCONFDIR:S/${PREFIX}\///} m" ;; \
|
|
|
|
*) set -- dummy ${PKG_SYSCONFDIR} ${PKG_SYSCONFDIR_PERMS}; shift; \
|
|
|
|
while ${TEST} $$# -gt 0; do \
|
|
|
|
dir="$$1"; owner="$$2"; \
|
|
|
|
group="$$3"; mode="$$4"; \
|
|
|
|
shift; shift; shift; shift; \
|
|
|
|
dir=`strip_prefix "$$dir"`; \
|
|
|
|
${ECHO} "# DIR: $$dir m $$mode $$owner $$group"; \
|
|
|
|
done; \
|
|
|
|
;; \
|
|
|
|
esac; \
|
|
|
|
;; \
|
2006-03-15 05:52:57 +01:00
|
|
|
esac
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN} \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
2014-03-11 14:45:07 +01:00
|
|
|
case ${_INSTALL_RCD_SCRIPTS:M*:Q}"" in \
|
Use reference counts to properly account for the creation and removal
of directories needed for the proper functioning of each package.
The +INSTALL script unpacks a +DIRS script that adds and removes
directories. The +DIRS script entirely encapsulates the directory
creation and removal, and completely replaces the code in the
mk/install/install and mk/install/deinstall templates that handled
{MAKE,OWN}_DIRS and {MAKE,OWN}_DIRS_PERMS.
The +DIRS script is meant to be executed from within the package
meta-data directory, e.g. /var/db/pkg/<pkgname>. It's usage is:
./+DIRS ADD|REMOVE|CHECK-ADD|CHECK-REMOVE
The ADD and REMOVE actions cause the necessary directories to be added
or removed from the system. The CHECK-ADD and CHECK-REMOVE actions
print out informative messages prompting the user to either create or
remove some necessary directories.
The behaviour of "ADD" is such that if the directory already exists
on the system and is not already ref-counted, then that directory is
marked as "pre-existing". On "REMOVE", pre-existing directories are
left untouched on the filesystem.
At any time, the root user can sanity-check the directories needed by
packages by invoking all of the +DIRS scripts with the "CHECK-ADD"
action. If there are missing directories, then invoking all of the
+DIRS scripts with the "ADD" action will ensure that any missing
directories are created.
The reference counts database is stored in ${PKG_DBDIR}/.refcount.
The reference counts related to directories managed by the +DIRS script
are stored in ${PKG_DBDIR}/.refcount/dirs. If the directory reference
counts database is removed, then invoking all of the +DIRS scripts
with the "ADD" action will reconstruct the database; however, directories
may be marked as being pre-existing, so they won't be removed at
package de-installation (although a message will be displayed informing
the user that those directories can be removed).
2005-01-28 07:30:58 +01:00
|
|
|
"") ;; \
|
2005-07-29 23:41:04 +02:00
|
|
|
*) ${ECHO} "# DIR: ${RCD_SCRIPTS_DIR:S/${PREFIX}\///} m" ;; \
|
2005-08-23 11:51:35 +02:00
|
|
|
esac
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${_FUNC_STRIP_PREFIX}; \
|
2005-08-23 13:48:47 +02:00
|
|
|
set -- dummy ${MAKE_DIRS}; shift; \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
2005-08-19 19:20:33 +02:00
|
|
|
while ${TEST} $$# -gt 0; do \
|
|
|
|
dir="$$1"; shift; \
|
2005-08-04 17:03:39 +02:00
|
|
|
dir=`strip_prefix "$$dir"`; \
|
Use reference counts to properly account for the creation and removal
of directories needed for the proper functioning of each package.
The +INSTALL script unpacks a +DIRS script that adds and removes
directories. The +DIRS script entirely encapsulates the directory
creation and removal, and completely replaces the code in the
mk/install/install and mk/install/deinstall templates that handled
{MAKE,OWN}_DIRS and {MAKE,OWN}_DIRS_PERMS.
The +DIRS script is meant to be executed from within the package
meta-data directory, e.g. /var/db/pkg/<pkgname>. It's usage is:
./+DIRS ADD|REMOVE|CHECK-ADD|CHECK-REMOVE
The ADD and REMOVE actions cause the necessary directories to be added
or removed from the system. The CHECK-ADD and CHECK-REMOVE actions
print out informative messages prompting the user to either create or
remove some necessary directories.
The behaviour of "ADD" is such that if the directory already exists
on the system and is not already ref-counted, then that directory is
marked as "pre-existing". On "REMOVE", pre-existing directories are
left untouched on the filesystem.
At any time, the root user can sanity-check the directories needed by
packages by invoking all of the +DIRS scripts with the "CHECK-ADD"
action. If there are missing directories, then invoking all of the
+DIRS scripts with the "ADD" action will ensure that any missing
directories are created.
The reference counts database is stored in ${PKG_DBDIR}/.refcount.
The reference counts related to directories managed by the +DIRS script
are stored in ${PKG_DBDIR}/.refcount/dirs. If the directory reference
counts database is removed, then invoking all of the +DIRS scripts
with the "ADD" action will reconstruct the database; however, directories
may be marked as being pre-existing, so they won't be removed at
package de-installation (although a message will be displayed informing
the user that those directories can be removed).
2005-01-28 07:30:58 +01:00
|
|
|
${ECHO} "# DIR: $$dir m"; \
|
2006-03-15 05:52:57 +01:00
|
|
|
done
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${_FUNC_STRIP_PREFIX}; \
|
2005-08-23 13:48:47 +02:00
|
|
|
set -- dummy ${REQD_DIRS}; shift; \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
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-20 00:24:09 +02:00
|
|
|
while ${TEST} $$# -gt 0; do \
|
|
|
|
dir="$$1"; shift; \
|
|
|
|
dir=`strip_prefix "$$dir"`; \
|
|
|
|
${ECHO} "# DIR: $$dir fm"; \
|
2006-03-15 05:52:57 +01:00
|
|
|
done
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${_FUNC_STRIP_PREFIX}; \
|
2005-08-23 13:48:47 +02:00
|
|
|
set -- dummy ${OWN_DIRS}; shift; \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
2005-08-19 19:20:33 +02:00
|
|
|
while ${TEST} $$# -gt 0; do \
|
|
|
|
dir="$$1"; shift; \
|
2005-08-04 17:03:39 +02:00
|
|
|
dir=`strip_prefix "$$dir"`; \
|
Use reference counts to properly account for the creation and removal
of directories needed for the proper functioning of each package.
The +INSTALL script unpacks a +DIRS script that adds and removes
directories. The +DIRS script entirely encapsulates the directory
creation and removal, and completely replaces the code in the
mk/install/install and mk/install/deinstall templates that handled
{MAKE,OWN}_DIRS and {MAKE,OWN}_DIRS_PERMS.
The +DIRS script is meant to be executed from within the package
meta-data directory, e.g. /var/db/pkg/<pkgname>. It's usage is:
./+DIRS ADD|REMOVE|CHECK-ADD|CHECK-REMOVE
The ADD and REMOVE actions cause the necessary directories to be added
or removed from the system. The CHECK-ADD and CHECK-REMOVE actions
print out informative messages prompting the user to either create or
remove some necessary directories.
The behaviour of "ADD" is such that if the directory already exists
on the system and is not already ref-counted, then that directory is
marked as "pre-existing". On "REMOVE", pre-existing directories are
left untouched on the filesystem.
At any time, the root user can sanity-check the directories needed by
packages by invoking all of the +DIRS scripts with the "CHECK-ADD"
action. If there are missing directories, then invoking all of the
+DIRS scripts with the "ADD" action will ensure that any missing
directories are created.
The reference counts database is stored in ${PKG_DBDIR}/.refcount.
The reference counts related to directories managed by the +DIRS script
are stored in ${PKG_DBDIR}/.refcount/dirs. If the directory reference
counts database is removed, then invoking all of the +DIRS scripts
with the "ADD" action will reconstruct the database; however, directories
may be marked as being pre-existing, so they won't be removed at
package de-installation (although a message will be displayed informing
the user that those directories can be removed).
2005-01-28 07:30:58 +01:00
|
|
|
${ECHO} "# DIR: $$dir mo"; \
|
2005-08-23 11:51:35 +02:00
|
|
|
done
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${_FUNC_STRIP_PREFIX}; \
|
2005-08-23 13:48:47 +02:00
|
|
|
set -- dummy ${MAKE_DIRS_PERMS}; shift; \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
Use reference counts to properly account for the creation and removal
of directories needed for the proper functioning of each package.
The +INSTALL script unpacks a +DIRS script that adds and removes
directories. The +DIRS script entirely encapsulates the directory
creation and removal, and completely replaces the code in the
mk/install/install and mk/install/deinstall templates that handled
{MAKE,OWN}_DIRS and {MAKE,OWN}_DIRS_PERMS.
The +DIRS script is meant to be executed from within the package
meta-data directory, e.g. /var/db/pkg/<pkgname>. It's usage is:
./+DIRS ADD|REMOVE|CHECK-ADD|CHECK-REMOVE
The ADD and REMOVE actions cause the necessary directories to be added
or removed from the system. The CHECK-ADD and CHECK-REMOVE actions
print out informative messages prompting the user to either create or
remove some necessary directories.
The behaviour of "ADD" is such that if the directory already exists
on the system and is not already ref-counted, then that directory is
marked as "pre-existing". On "REMOVE", pre-existing directories are
left untouched on the filesystem.
At any time, the root user can sanity-check the directories needed by
packages by invoking all of the +DIRS scripts with the "CHECK-ADD"
action. If there are missing directories, then invoking all of the
+DIRS scripts with the "ADD" action will ensure that any missing
directories are created.
The reference counts database is stored in ${PKG_DBDIR}/.refcount.
The reference counts related to directories managed by the +DIRS script
are stored in ${PKG_DBDIR}/.refcount/dirs. If the directory reference
counts database is removed, then invoking all of the +DIRS scripts
with the "ADD" action will reconstruct the database; however, directories
may be marked as being pre-existing, so they won't be removed at
package de-installation (although a message will be displayed informing
the user that those directories can be removed).
2005-01-28 07:30:58 +01:00
|
|
|
while ${TEST} $$# -gt 0; do \
|
|
|
|
dir="$$1"; owner="$$2"; group="$$3"; mode="$$4"; \
|
|
|
|
shift; shift; shift; shift; \
|
2005-08-04 17:03:39 +02:00
|
|
|
dir=`strip_prefix "$$dir"`; \
|
2006-04-26 00:32:44 +02:00
|
|
|
${ECHO} "# DIR: $$dir m $$mode $$owner $$group"; \
|
2006-03-15 05:52:57 +01:00
|
|
|
done
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${_FUNC_STRIP_PREFIX}; \
|
2005-08-23 13:48:47 +02:00
|
|
|
set -- dummy ${REQD_DIRS_PERMS}; shift; \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
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-20 00:24:09 +02:00
|
|
|
while ${TEST} $$# -gt 0; do \
|
|
|
|
dir="$$1"; owner="$$2"; group="$$3"; mode="$$4"; \
|
|
|
|
shift; shift; shift; shift; \
|
|
|
|
dir=`strip_prefix "$$dir"`; \
|
2006-04-26 00:32:44 +02:00
|
|
|
${ECHO} "# DIR: $$dir fm $$mode $$owner $$group"; \
|
2006-03-15 05:52:57 +01:00
|
|
|
done
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${_FUNC_STRIP_PREFIX}; \
|
2005-08-23 13:48:47 +02:00
|
|
|
set -- dummy ${OWN_DIRS_PERMS}; shift; \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
Use reference counts to properly account for the creation and removal
of directories needed for the proper functioning of each package.
The +INSTALL script unpacks a +DIRS script that adds and removes
directories. The +DIRS script entirely encapsulates the directory
creation and removal, and completely replaces the code in the
mk/install/install and mk/install/deinstall templates that handled
{MAKE,OWN}_DIRS and {MAKE,OWN}_DIRS_PERMS.
The +DIRS script is meant to be executed from within the package
meta-data directory, e.g. /var/db/pkg/<pkgname>. It's usage is:
./+DIRS ADD|REMOVE|CHECK-ADD|CHECK-REMOVE
The ADD and REMOVE actions cause the necessary directories to be added
or removed from the system. The CHECK-ADD and CHECK-REMOVE actions
print out informative messages prompting the user to either create or
remove some necessary directories.
The behaviour of "ADD" is such that if the directory already exists
on the system and is not already ref-counted, then that directory is
marked as "pre-existing". On "REMOVE", pre-existing directories are
left untouched on the filesystem.
At any time, the root user can sanity-check the directories needed by
packages by invoking all of the +DIRS scripts with the "CHECK-ADD"
action. If there are missing directories, then invoking all of the
+DIRS scripts with the "ADD" action will ensure that any missing
directories are created.
The reference counts database is stored in ${PKG_DBDIR}/.refcount.
The reference counts related to directories managed by the +DIRS script
are stored in ${PKG_DBDIR}/.refcount/dirs. If the directory reference
counts database is removed, then invoking all of the +DIRS scripts
with the "ADD" action will reconstruct the database; however, directories
may be marked as being pre-existing, so they won't be removed at
package de-installation (although a message will be displayed informing
the user that those directories can be removed).
2005-01-28 07:30:58 +01:00
|
|
|
while ${TEST} $$# -gt 0; do \
|
|
|
|
dir="$$1"; owner="$$2"; group="$$3"; mode="$$4"; \
|
|
|
|
shift; shift; shift; shift; \
|
2005-08-04 17:03:39 +02:00
|
|
|
dir=`strip_prefix "$$dir"`; \
|
2006-04-26 00:32:44 +02:00
|
|
|
${ECHO} "# DIR: $$dir mo $$mode $$owner $$group"; \
|
2005-08-23 11:51:35 +02:00
|
|
|
done
|
2006-03-15 05:52:57 +01:00
|
|
|
|
|
|
|
${_INSTALL_DIRS_FILE}: ${_INSTALL_DIRS_DATAFILE}
|
2006-05-22 01:50:15 +02:00
|
|
|
${_INSTALL_DIRS_FILE}: ../../mk/pkginstall/dirs
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${MKDIR} ${.TARGET:H}
|
|
|
|
${RUN} \
|
2006-05-22 01:50:15 +02:00
|
|
|
${SED} ${FILES_SUBST_SED} ../../mk/pkginstall/dirs > ${.TARGET}
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN} \
|
2006-03-15 05:52:57 +01:00
|
|
|
if ${_ZERO_FILESIZE_P} ${_INSTALL_DIRS_DATAFILE}; then \
|
2006-03-10 00:31:51 +01:00
|
|
|
${RM} -f ${.TARGET}; \
|
|
|
|
${TOUCH} ${TOUCH_ARGS} ${.TARGET}; \
|
|
|
|
fi
|
2001-11-19 17:18:44 +01:00
|
|
|
|
2007-01-02 18:15:24 +01:00
|
|
|
# INFO_DIR
|
|
|
|
# If defined, specifies the directory path containing the "dir"
|
2006-04-06 19:57:34 +02:00
|
|
|
# index file that should be updated. If the pathname is relative,
|
|
|
|
# then it is taken to be relative to ${PREFIX}. This shouldn't
|
|
|
|
# be needed unless "dir" is not in the same directory as the
|
|
|
|
# installed info files.
|
|
|
|
#
|
2007-01-02 18:15:24 +01:00
|
|
|
|
2006-03-15 05:52:57 +01:00
|
|
|
_INSTALL_INFO_FILES_FILE= ${_PKGINSTALL_DIR}/info-files
|
|
|
|
_INSTALL_INFO_FILES_DATAFILE= ${_PKGINSTALL_DIR}/info-files-data
|
2006-03-11 00:33:57 +01:00
|
|
|
_INSTALL_UNPACK_TMPL+= ${_INSTALL_INFO_FILES_FILE}
|
2006-03-15 05:52:57 +01:00
|
|
|
_INSTALL_DATA_TMPL+= ${_INSTALL_INFO_FILES_DATAFILE}
|
2006-03-09 01:20:27 +01:00
|
|
|
|
2006-03-20 02:48:57 +01:00
|
|
|
.if defined(INFO_FILES)
|
2006-03-09 01:20:27 +01:00
|
|
|
USE_TOOLS+= install-info:run
|
|
|
|
FILES_SUBST+= INSTALL_INFO=${INSTALL_INFO:Q}
|
|
|
|
.endif
|
|
|
|
|
2006-03-15 05:52:57 +01:00
|
|
|
${_INSTALL_INFO_FILES_DATAFILE}:
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${MKDIR} ${.TARGET:H}
|
|
|
|
${RUN}${RM} -f ${.TARGET}
|
|
|
|
${RUN}${TOUCH} ${TOUCH_ARGS} ${.TARGET}
|
2006-03-15 05:52:57 +01:00
|
|
|
|
|
|
|
${_INSTALL_INFO_FILES_FILE}: ${_INSTALL_INFO_FILES_DATAFILE}
|
2006-05-22 01:50:15 +02:00
|
|
|
${_INSTALL_INFO_FILES_FILE}: ../../mk/pkginstall/info-files
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${MKDIR} ${.TARGET:H}
|
|
|
|
${RUN} \
|
2006-05-22 01:50:15 +02:00
|
|
|
${SED} ${FILES_SUBST_SED} ../../mk/pkginstall/info-files > ${.TARGET}
|
2006-03-20 02:48:57 +01:00
|
|
|
.if !defined(INFO_FILES)
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN} \
|
2006-03-15 05:52:57 +01:00
|
|
|
if ${_ZERO_FILESIZE_P} ${_INSTALL_INFO_FILES_DATAFILE}; then \
|
2006-03-10 00:31:51 +01:00
|
|
|
${RM} -f ${.TARGET}; \
|
|
|
|
${TOUCH} ${TOUCH_ARGS} ${.TARGET}; \
|
|
|
|
fi
|
2006-03-20 02:48:57 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.PHONY: install-script-data-info-files
|
|
|
|
install-script-data: install-script-data-info-files
|
|
|
|
install-script-data-info-files:
|
|
|
|
.if defined(INFO_FILES)
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${_FUNC_STRIP_PREFIX}; \
|
2006-03-20 02:48:57 +01:00
|
|
|
if ${TEST} -x ${INSTALL_FILE}; then \
|
|
|
|
${INFO_FILES_cmd} | \
|
|
|
|
while read file; do \
|
2006-04-06 19:57:34 +02:00
|
|
|
infodir=${INFO_DIR:Q}; \
|
|
|
|
infodir=`strip_prefix "$$infodir"`; \
|
|
|
|
case "$$infodir" in \
|
|
|
|
"") ${ECHO} "# INFO: $$file" \
|
|
|
|
>> ${INSTALL_FILE} ;; \
|
|
|
|
*) ${ECHO} "# INFO: $$file $$infodir" \
|
|
|
|
>> ${INSTALL_FILE} ;; \
|
|
|
|
esac; \
|
2006-03-20 02:48:57 +01:00
|
|
|
done; \
|
2011-09-08 22:17:15 +02:00
|
|
|
cd ${PKG_DB_TMPDIR} && ${PKGSRC_SETENV} ${INSTALL_SCRIPTS_ENV} \
|
2006-03-20 02:48:57 +01:00
|
|
|
${_PKG_DEBUG_SCRIPT} ${INSTALL_FILE} ${PKGNAME} \
|
|
|
|
UNPACK +INFO_FILES; \
|
|
|
|
fi
|
|
|
|
.endif
|
2006-03-09 01:20:27 +01:00
|
|
|
|
2005-07-29 20:32:17 +02:00
|
|
|
# PKG_SHELL contains the pathname of the shell that should be added or
|
2005-07-29 23:41:04 +02:00
|
|
|
# removed from the shell database, /etc/shells. If a pathname
|
2005-07-29 20:32:17 +02:00
|
|
|
# is relative, then it is taken to be relative to ${PREFIX}.
|
|
|
|
#
|
|
|
|
PKG_SHELL?= # empty
|
|
|
|
|
2006-03-15 05:52:57 +01:00
|
|
|
_INSTALL_SHELL_FILE= ${_PKGINSTALL_DIR}/shell
|
|
|
|
_INSTALL_SHELL_DATAFILE= ${_PKGINSTALL_DIR}/shell-data
|
|
|
|
_INSTALL_UNPACK_TMPL+= ${_INSTALL_SHELL_FILE}
|
|
|
|
_INSTALL_DATA_TMPL+= ${_INSTALL_SHELL_DATAFILE}
|
2005-07-29 20:32:17 +02:00
|
|
|
|
2006-03-15 05:52:57 +01:00
|
|
|
${_INSTALL_SHELL_DATAFILE}:
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${MKDIR} ${.TARGET:H}
|
|
|
|
${RUN}${_FUNC_STRIP_PREFIX}; \
|
2005-08-23 13:48:47 +02:00
|
|
|
set -- dummy ${PKG_SHELL}; shift; \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
2005-08-19 19:20:33 +02:00
|
|
|
while ${TEST} $$# -gt 0; do \
|
|
|
|
shell="$$1"; shift; \
|
|
|
|
shell=`strip_prefix "$$shell"`; \
|
|
|
|
${ECHO} "# SHELL: $$shell"; \
|
2006-03-15 05:52:57 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
${_INSTALL_SHELL_FILE}: ${_INSTALL_SHELL_DATAFILE}
|
2006-05-22 01:50:15 +02:00
|
|
|
${_INSTALL_SHELL_FILE}: ../../mk/pkginstall/shell
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${MKDIR} ${.TARGET:H}
|
|
|
|
${RUN} \
|
2006-05-22 01:50:15 +02:00
|
|
|
${SED} ${FILES_SUBST_SED} ../../mk/pkginstall/shell > ${.TARGET}
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN} \
|
2006-03-15 05:52:57 +01:00
|
|
|
if ${_ZERO_FILESIZE_P} ${_INSTALL_SHELL_DATAFILE}; then \
|
2006-03-10 00:31:51 +01:00
|
|
|
${RM} -f ${.TARGET}; \
|
|
|
|
${TOUCH} ${TOUCH_ARGS} ${.TARGET}; \
|
|
|
|
fi
|
2005-07-29 20:32:17 +02:00
|
|
|
|
2007-07-27 20:37:35 +02:00
|
|
|
# SHLIB_TYPE
|
|
|
|
# The type of shared library supported by the platform.
|
|
|
|
#
|
|
|
|
# Default value: ${_OPSYS_SHLIB_TYPE}
|
|
|
|
#
|
|
|
|
# LDCONFIG_ADD_CMD
|
|
|
|
# LDCONFIG_REMOVE_CMD
|
|
|
|
# Command-line to be invoked to update the system run-time library
|
|
|
|
# search paths database when adding and removing a package.
|
|
|
|
#
|
|
|
|
# Default value: ${LDCONFIG}
|
|
|
|
#
|
|
|
|
SHLIB_TYPE= ${_SHLIB_TYPE_cmd:sh}
|
|
|
|
_SHLIB_TYPE_cmd= \
|
2007-08-02 18:00:33 +02:00
|
|
|
sh ${.CURDIR}/../../mk/scripts/shlib-type \
|
|
|
|
${_OPSYS_SHLIB_TYPE:Q} ${PKG_INFO_CMD:Q}
|
2007-07-27 20:37:35 +02:00
|
|
|
|
|
|
|
LDCONFIG_ADD_CMD?= ${_LDCONFIG_ADD_CMD.${OPSYS}}
|
|
|
|
LDCONFIG_REMOVE_CMD?= ${_LDCONFIG_REMOVE_CMD.${OPSYS}}
|
|
|
|
_LDCONFIG_ADD_CMD.${OPSYS}?= ${LDCONFIG}
|
|
|
|
_LDCONFIG_REMOVE_CMD.${OPSYS}?= ${LDCONFIG}
|
|
|
|
FILES_SUBST+= LDCONFIG_ADD_CMD=${LDCONFIG_ADD_CMD:Q}
|
|
|
|
FILES_SUBST+= LDCONFIG_REMOVE_CMD=${LDCONFIG_REMOVE_CMD:Q}
|
|
|
|
|
|
|
|
.if ${SHLIB_TYPE} == "a.out"
|
|
|
|
RUN_LDCONFIG?= yes
|
|
|
|
.else
|
|
|
|
RUN_LDCONFIG?= no
|
|
|
|
.endif
|
|
|
|
|
|
|
|
_INSTALL_SHLIBS_FILE= ${_PKGINSTALL_DIR}/shlibs
|
|
|
|
.if !empty(RUN_LDCONFIG:M[Yy][Ee][Ss])
|
|
|
|
_INSTALL_UNPACK_TMPL+= ${_INSTALL_SHLIBS_FILE}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
${_INSTALL_SHLIBS_FILE}: ../../mk/pkginstall/shlibs
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${MKDIR} ${.TARGET:H}
|
|
|
|
${RUN} \
|
2007-07-27 20:37:35 +02:00
|
|
|
${SED} ${FILES_SUBST_SED} ../../mk/pkginstall/shlibs > ${.TARGET}
|
|
|
|
|
2005-12-29 04:44:38 +01:00
|
|
|
# FONTS_DIRS.<type> are lists of directories in which the font databases
|
2007-10-09 13:31:46 +02:00
|
|
|
# are updated. If this is non-empty, then the appropriate tools are
|
2005-12-29 04:44:38 +01:00
|
|
|
# used to update the fonts database for the font type. The supported
|
|
|
|
# types are:
|
|
|
|
#
|
|
|
|
# ttf TrueType fonts
|
|
|
|
# type1 Type1 fonts
|
|
|
|
# x11 Generic X fonts, e.g. PCF, SNF, BDF, etc.
|
|
|
|
#
|
|
|
|
FONTS_DIRS.ttf?= # empty
|
|
|
|
FONTS_DIRS.type1?= # empty
|
|
|
|
FONTS_DIRS.x11?= # empty
|
|
|
|
|
2006-03-15 05:52:57 +01:00
|
|
|
_INSTALL_FONTS_FILE= ${_PKGINSTALL_DIR}/fonts
|
|
|
|
_INSTALL_FONTS_DATAFILE= ${_PKGINSTALL_DIR}/fonts-data
|
|
|
|
_INSTALL_UNPACK_TMPL+= ${_INSTALL_FONTS_FILE}
|
|
|
|
_INSTALL_DATA_TMPL+= ${_INSTALL_FONTS_DATAFILE}
|
2005-12-29 04:44:38 +01:00
|
|
|
|
|
|
|
# Directories with TTF and Type1 fonts also need to run mkfontdir, so
|
|
|
|
# list them as "x11" font directories as well.
|
|
|
|
#
|
|
|
|
.if !empty(FONTS_DIRS.ttf:M*)
|
2007-01-02 12:47:26 +01:00
|
|
|
.if ${X11_TYPE} == "modular"
|
|
|
|
USE_TOOLS+= mkfontscale:run
|
|
|
|
FILES_SUBST+= TTF_INDEX_CMD=${TOOLS_PATH.mkfontscale:Q}
|
|
|
|
.else
|
2005-12-29 04:44:38 +01:00
|
|
|
USE_TOOLS+= ttmkfdir:run
|
2007-01-02 12:47:26 +01:00
|
|
|
FILES_SUBST+= TTF_INDEX_CMD=${TOOLS_PATH.ttmkfdir:Q}
|
|
|
|
.endif
|
2005-12-29 04:44:38 +01:00
|
|
|
FONTS_DIRS.x11+= ${FONTS_DIRS.ttf}
|
|
|
|
.endif
|
|
|
|
.if !empty(FONTS_DIRS.type1:M*)
|
2007-01-02 12:47:26 +01:00
|
|
|
.if ${X11_TYPE} == "modular"
|
|
|
|
USE_TOOLS+= mkfontscale:run
|
|
|
|
FILES_SUBST+= TYPE1_INDEX_CMD=${TOOLS_PATH.type1inst:Q}
|
|
|
|
FILES_SUBST+= TYPE1_POSTINDEX_CMD=
|
|
|
|
.else
|
2005-12-29 04:44:38 +01:00
|
|
|
USE_TOOLS+= type1inst:run
|
2007-01-02 12:47:26 +01:00
|
|
|
FILES_SUBST+= TYPE1_INDEX_CMD=${TOOLS_PATH.type1inst:Q}
|
2007-01-24 15:33:50 +01:00
|
|
|
FILES_SUBST+= TYPE1_POSTINDEX_CMD="\$${RM} type1inst.log"
|
2007-01-02 12:47:26 +01:00
|
|
|
.endif
|
2005-12-29 04:44:38 +01:00
|
|
|
FONTS_DIRS.x11+= ${FONTS_DIRS.type1}
|
|
|
|
.endif
|
|
|
|
.if !empty(FONTS_DIRS.x11:M*)
|
|
|
|
USE_TOOLS+= mkfontdir:run
|
|
|
|
FILES_SUBST+= MKFONTDIR=${TOOLS_PATH.mkfontdir:Q}
|
2007-01-02 12:47:26 +01:00
|
|
|
|
|
|
|
.if ${X11_TYPE} == "modular"
|
|
|
|
DEPENDS+= encodings-[0-9]*:../../fonts/encodings
|
|
|
|
.endif
|
2005-12-29 04:44:38 +01:00
|
|
|
.endif
|
|
|
|
|
2006-09-22 23:53:56 +02:00
|
|
|
FILES_SUBST+= X11_ENCODINGSDIR=${X11_ENCODINGSDIR:Q}
|
|
|
|
|
2006-03-15 05:52:57 +01:00
|
|
|
${_INSTALL_FONTS_DATAFILE}:
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${MKDIR} ${.TARGET:H}
|
|
|
|
${RUN}${_FUNC_STRIP_PREFIX}; \
|
2005-12-29 04:44:38 +01:00
|
|
|
set -- dummy ${FONTS_DIRS.ttf}; shift; \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
2005-12-29 04:44:38 +01:00
|
|
|
while ${TEST} $$# -gt 0; do \
|
|
|
|
dir="$$1"; shift; \
|
|
|
|
dir=`strip_prefix "$$dir"`; \
|
|
|
|
${ECHO} "# FONTS: $$dir ttf"; \
|
2006-03-15 05:52:57 +01:00
|
|
|
done
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${_FUNC_STRIP_PREFIX}; \
|
2005-12-29 04:44:38 +01:00
|
|
|
set -- dummy ${FONTS_DIRS.type1}; shift; \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
2005-12-29 04:44:38 +01:00
|
|
|
while ${TEST} $$# -gt 0; do \
|
|
|
|
dir="$$1"; shift; \
|
|
|
|
dir=`strip_prefix "$$dir"`; \
|
|
|
|
${ECHO} "# FONTS: $$dir type1"; \
|
2006-03-15 05:52:57 +01:00
|
|
|
done
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${_FUNC_STRIP_PREFIX}; \
|
2005-12-29 04:44:38 +01:00
|
|
|
set -- dummy ${FONTS_DIRS.x11}; shift; \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
2005-12-29 04:44:38 +01:00
|
|
|
while ${TEST} $$# -gt 0; do \
|
|
|
|
dir="$$1"; shift; \
|
|
|
|
dir=`strip_prefix "$$dir"`; \
|
|
|
|
${ECHO} "# FONTS: $$dir x11"; \
|
2006-03-15 05:52:57 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
${_INSTALL_FONTS_FILE}: ${_INSTALL_FONTS_DATAFILE}
|
2006-05-22 01:50:15 +02:00
|
|
|
${_INSTALL_FONTS_FILE}: ../../mk/pkginstall/fonts
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${MKDIR} ${.TARGET:H}
|
|
|
|
${RUN} \
|
2006-05-22 01:50:15 +02:00
|
|
|
${SED} ${FILES_SUBST_SED} ../../mk/pkginstall/fonts > ${.TARGET}
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN} \
|
2006-03-15 05:52:57 +01:00
|
|
|
if ${_ZERO_FILESIZE_P} ${_INSTALL_FONTS_DATAFILE}; then \
|
2006-03-10 00:31:51 +01:00
|
|
|
${RM} -f ${.TARGET}; \
|
|
|
|
${TOUCH} ${TOUCH_ARGS} ${.TARGET}; \
|
|
|
|
fi
|
2005-12-29 04:44:38 +01:00
|
|
|
|
2002-06-22 04:48:35 +02:00
|
|
|
# PKG_CREATE_USERGROUP indicates whether the INSTALL script should
|
|
|
|
# automatically add any needed users/groups to the system using
|
|
|
|
# useradd/groupadd. It is either YES or NO and defaults to YES.
|
|
|
|
#
|
|
|
|
# PKG_CONFIG indicates whether the INSTALL/DEINSTALL scripts should do
|
|
|
|
# automatic config file and directory handling, or if it should
|
|
|
|
# merely inform the admin of the list of required files and
|
|
|
|
# directories needed to use the package. It is either YES or NO
|
|
|
|
# and defaults to YES.
|
|
|
|
#
|
2006-04-25 21:54:39 +02:00
|
|
|
# PKG_CONFIG_PERMS indicates whether to automatically correct permissions
|
|
|
|
# and ownership on pre-existing files and directories, or if it
|
|
|
|
# should merely inform the admin of the list of files and
|
|
|
|
# directories whose permissions and ownership need to be fixed. It
|
|
|
|
# is either YES or NO and defaults to NO.
|
|
|
|
#
|
2002-09-19 12:20:50 +02:00
|
|
|
# PKG_RCD_SCRIPTS indicates whether to automatically install rc.d scripts
|
|
|
|
# to ${RCD_SCRIPTS_DIR}. It is either YES or NO and defaults to
|
|
|
|
# NO. This variable only takes effect if ${PKG_CONFIG} == "YES".
|
|
|
|
#
|
2005-07-29 20:32:17 +02:00
|
|
|
# PKG_REGISTER_SHELLS indicates whether to automatically register shells
|
|
|
|
# in /etc/shells. It is either YES or NO and defaults to YES.
|
|
|
|
#
|
2005-12-29 15:10:01 +01:00
|
|
|
# PKG_UPDATE_FONTS_DB indicates whether to automatically update the fonts
|
|
|
|
# databases in directories where fonts have been installed or
|
|
|
|
# removed. It is either YES or NO and defaults to YES.
|
|
|
|
#
|
2002-06-22 04:48:35 +02:00
|
|
|
# These values merely set the defaults for INSTALL/DEINSTALL scripts, but
|
|
|
|
# they may be overridden by resetting them in the environment.
|
|
|
|
#
|
2014-10-13 01:44:32 +02:00
|
|
|
.if ${PKG_DEVELOPER:Uno} != "no"
|
|
|
|
FONTS_VERBOSE?= YES
|
|
|
|
INFO_FILES_VERBOSE?= YES
|
|
|
|
.else
|
|
|
|
FONTS_VERBOSE?= NO
|
|
|
|
INFO_FILES_VERBOSE?= NO
|
|
|
|
.endif
|
2002-06-22 04:48:35 +02:00
|
|
|
PKG_CREATE_USERGROUP?= YES
|
|
|
|
PKG_CONFIG?= YES
|
2006-04-25 21:54:39 +02:00
|
|
|
PKG_CONFIG_PERMS?= NO
|
2002-09-19 12:20:50 +02:00
|
|
|
PKG_RCD_SCRIPTS?= NO
|
2005-07-29 20:32:17 +02:00
|
|
|
PKG_REGISTER_SHELLS?= YES
|
2005-12-29 15:10:01 +01:00
|
|
|
PKG_UPDATE_FONTS_DB?= YES
|
2005-12-05 23:07:07 +01:00
|
|
|
FILES_SUBST+= PKG_CREATE_USERGROUP=${PKG_CREATE_USERGROUP:Q}
|
|
|
|
FILES_SUBST+= PKG_CONFIG=${PKG_CONFIG:Q}
|
2006-04-25 21:54:39 +02:00
|
|
|
FILES_SUBST+= PKG_CONFIG_PERMS=${PKG_CONFIG_PERMS:Q}
|
2005-12-05 23:07:07 +01:00
|
|
|
FILES_SUBST+= PKG_RCD_SCRIPTS=${PKG_RCD_SCRIPTS:Q}
|
|
|
|
FILES_SUBST+= PKG_REGISTER_SHELLS=${PKG_REGISTER_SHELLS:Q}
|
2005-12-29 15:10:01 +01:00
|
|
|
FILES_SUBST+= PKG_UPDATE_FONTS_DB=${PKG_UPDATE_FONTS_DB:Q}
|
2014-10-13 01:44:32 +02:00
|
|
|
FILES_SUBST+= FONTS_VERBOSE=${FONTS_VERBOSE:Q}
|
|
|
|
FILES_SUBST+= INFO_FILES_VERBOSE=${INFO_FILES_VERBOSE:Q}
|
2007-07-12 21:41:46 +02:00
|
|
|
|
2002-09-19 11:02:40 +02:00
|
|
|
# Substitute for various programs used in the DEINSTALL/INSTALL scripts and
|
|
|
|
# in the rc.d scripts.
|
|
|
|
#
|
2001-11-19 17:18:44 +01:00
|
|
|
FILES_SUBST+= AWK=${AWK:Q}
|
|
|
|
FILES_SUBST+= BASENAME=${BASENAME:Q}
|
|
|
|
FILES_SUBST+= CAT=${CAT:Q}
|
|
|
|
FILES_SUBST+= CHGRP=${CHGRP:Q}
|
|
|
|
FILES_SUBST+= CHMOD=${CHMOD:Q}
|
|
|
|
FILES_SUBST+= CHOWN=${CHOWN:Q}
|
|
|
|
FILES_SUBST+= CMP=${CMP:Q}
|
|
|
|
FILES_SUBST+= CP=${CP:Q}
|
|
|
|
FILES_SUBST+= DIRNAME=${DIRNAME:Q}
|
|
|
|
FILES_SUBST+= ECHO=${ECHO:Q}
|
2004-04-27 20:31:08 +02:00
|
|
|
FILES_SUBST+= ECHO_N=${ECHO_N:Q}
|
2001-11-19 17:18:44 +01:00
|
|
|
FILES_SUBST+= EGREP=${EGREP:Q}
|
2002-10-05 01:46:26 +02:00
|
|
|
FILES_SUBST+= EXPR=${EXPR:Q}
|
2001-11-19 17:18:44 +01:00
|
|
|
FILES_SUBST+= FALSE=${FALSE:Q}
|
2002-10-08 13:31:24 +02:00
|
|
|
FILES_SUBST+= FIND=${FIND:Q}
|
2001-12-13 07:32:55 +01:00
|
|
|
FILES_SUBST+= GREP=${GREP:Q}
|
2001-11-19 17:18:44 +01:00
|
|
|
FILES_SUBST+= GROUPADD=${GROUPADD:Q}
|
2001-12-11 00:02:17 +01:00
|
|
|
FILES_SUBST+= GTAR=${GTAR:Q}
|
|
|
|
FILES_SUBST+= HEAD=${HEAD:Q}
|
2001-11-19 17:18:44 +01:00
|
|
|
FILES_SUBST+= ID=${ID:Q}
|
2002-03-15 21:08:17 +01:00
|
|
|
FILES_SUBST+= INSTALL_INFO=${INSTALL_INFO:Q}
|
2003-09-02 08:59:37 +02:00
|
|
|
FILES_SUBST+= LINKFARM=${LINKFARM:Q}
|
2001-11-19 17:18:44 +01:00
|
|
|
FILES_SUBST+= LN=${LN:Q}
|
2003-12-20 10:45:55 +01:00
|
|
|
FILES_SUBST+= LS=${LS:Q}
|
2001-11-19 17:18:44 +01:00
|
|
|
FILES_SUBST+= MKDIR=${MKDIR:Q}
|
|
|
|
FILES_SUBST+= MV=${MV:Q}
|
2001-12-09 10:22:29 +01:00
|
|
|
FILES_SUBST+= PERL5=${PERL5:Q}
|
2003-09-17 04:38:22 +02:00
|
|
|
FILES_SUBST+= PKG_ADMIN=${PKG_ADMIN_CMD:Q}
|
|
|
|
FILES_SUBST+= PKG_INFO=${PKG_INFO_CMD:Q}
|
2005-10-28 22:09:38 +02:00
|
|
|
FILES_SUBST+= PW=${PW:Q}
|
2005-01-27 00:15:03 +01:00
|
|
|
FILES_SUBST+= PWD_CMD=${PWD_CMD:Q}
|
2001-11-19 17:18:44 +01:00
|
|
|
FILES_SUBST+= RM=${RM:Q}
|
|
|
|
FILES_SUBST+= RMDIR=${RMDIR:Q}
|
|
|
|
FILES_SUBST+= SED=${SED:Q}
|
2002-01-22 18:46:52 +01:00
|
|
|
FILES_SUBST+= SETENV=${SETENV:Q}
|
2001-11-19 17:18:44 +01:00
|
|
|
FILES_SUBST+= SH=${SH:Q}
|
|
|
|
FILES_SUBST+= SORT=${SORT:Q}
|
2001-11-23 15:37:24 +01:00
|
|
|
FILES_SUBST+= SU=${SU:Q}
|
2003-08-30 20:42:36 +02:00
|
|
|
FILES_SUBST+= TEST=${TEST:Q}
|
2001-11-19 17:18:44 +01:00
|
|
|
FILES_SUBST+= TOUCH=${TOUCH:Q}
|
|
|
|
FILES_SUBST+= TR=${TR:Q}
|
|
|
|
FILES_SUBST+= TRUE=${TRUE:Q}
|
|
|
|
FILES_SUBST+= USERADD=${USERADD:Q}
|
2002-10-08 13:31:24 +02:00
|
|
|
FILES_SUBST+= XARGS=${XARGS:Q}
|
2001-11-19 17:18:44 +01:00
|
|
|
|
|
|
|
FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}
|
|
|
|
|
2005-02-05 02:17:59 +01:00
|
|
|
PKG_REFCOUNT_DBDIR?= ${PKG_DBDIR}.refcount
|
|
|
|
|
2002-09-26 23:04:11 +02:00
|
|
|
INSTALL_SCRIPTS_ENV= PKG_PREFIX=${PREFIX}
|
Use reference counts to properly account for the creation and removal
of directories needed for the proper functioning of each package.
The +INSTALL script unpacks a +DIRS script that adds and removes
directories. The +DIRS script entirely encapsulates the directory
creation and removal, and completely replaces the code in the
mk/install/install and mk/install/deinstall templates that handled
{MAKE,OWN}_DIRS and {MAKE,OWN}_DIRS_PERMS.
The +DIRS script is meant to be executed from within the package
meta-data directory, e.g. /var/db/pkg/<pkgname>. It's usage is:
./+DIRS ADD|REMOVE|CHECK-ADD|CHECK-REMOVE
The ADD and REMOVE actions cause the necessary directories to be added
or removed from the system. The CHECK-ADD and CHECK-REMOVE actions
print out informative messages prompting the user to either create or
remove some necessary directories.
The behaviour of "ADD" is such that if the directory already exists
on the system and is not already ref-counted, then that directory is
marked as "pre-existing". On "REMOVE", pre-existing directories are
left untouched on the filesystem.
At any time, the root user can sanity-check the directories needed by
packages by invoking all of the +DIRS scripts with the "CHECK-ADD"
action. If there are missing directories, then invoking all of the
+DIRS scripts with the "ADD" action will ensure that any missing
directories are created.
The reference counts database is stored in ${PKG_DBDIR}/.refcount.
The reference counts related to directories managed by the +DIRS script
are stored in ${PKG_DBDIR}/.refcount/dirs. If the directory reference
counts database is removed, then invoking all of the +DIRS scripts
with the "ADD" action will reconstruct the database; however, directories
may be marked as being pre-existing, so they won't be removed at
package de-installation (although a message will be displayed informing
the user that those directories can be removed).
2005-01-28 07:30:58 +01:00
|
|
|
INSTALL_SCRIPTS_ENV+= PKG_METADATA_DIR=${_PKG_DBDIR}/${PKGNAME}
|
2005-02-05 02:17:59 +01:00
|
|
|
INSTALL_SCRIPTS_ENV+= PKG_REFCOUNT_DBDIR=${PKG_REFCOUNT_DBDIR}
|
2002-09-26 23:04:11 +02:00
|
|
|
|
2003-09-06 13:41:31 +02:00
|
|
|
.PHONY: pre-install-script post-install-script
|
|
|
|
|
2006-03-10 00:31:51 +01:00
|
|
|
DEINSTALL_FILE= ${PKG_DB_TMPDIR}/+DEINSTALL
|
|
|
|
INSTALL_FILE= ${PKG_DB_TMPDIR}/+INSTALL
|
2006-03-15 05:52:57 +01:00
|
|
|
_DEINSTALL_FILE= ${_PKGINSTALL_DIR}/DEINSTALL
|
|
|
|
_INSTALL_FILE= ${_PKGINSTALL_DIR}/INSTALL
|
|
|
|
_DEINSTALL_FILE_DFLT= ${_PKGINSTALL_DIR}/DEINSTALL.default
|
|
|
|
_INSTALL_FILE_DFLT= ${_PKGINSTALL_DIR}/INSTALL.default
|
2001-12-02 04:11:35 +01:00
|
|
|
|
2003-09-06 13:41:31 +02:00
|
|
|
.PHONY: generate-install-scripts
|
2006-03-14 02:14:26 +01:00
|
|
|
generate-install-scripts: \
|
|
|
|
${_DEINSTALL_FILE} ${_INSTALL_FILE} \
|
|
|
|
${_DEINSTALL_FILE_DFLT} ${_INSTALL_FILE_DFLT}
|
|
|
|
.if !exists(${DEINSTALL_FILE}) || !exists(${INSTALL_FILE})
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${MKDIR} ${INSTALL_FILE:H}
|
|
|
|
${RUN}${MKDIR} ${DEINSTALL_FILE:H}
|
|
|
|
${RUN} \
|
2006-03-14 02:14:26 +01:00
|
|
|
if ${CMP} -s ${_INSTALL_FILE_DFLT:Q} ${_INSTALL_FILE:Q}; then \
|
|
|
|
${TRUE}; \
|
|
|
|
else \
|
|
|
|
${CP} -f ${_INSTALL_FILE} ${INSTALL_FILE}; \
|
|
|
|
${CP} -f ${_DEINSTALL_FILE} ${DEINSTALL_FILE}; \
|
|
|
|
fi
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN} \
|
2006-03-14 02:14:26 +01:00
|
|
|
if ${CMP} -s ${_DEINSTALL_FILE_DFLT:Q} ${_DEINSTALL_FILE:Q}; then \
|
|
|
|
${TRUE}; \
|
|
|
|
else \
|
|
|
|
${CP} -f ${_DEINSTALL_FILE} ${DEINSTALL_FILE}; \
|
|
|
|
fi
|
|
|
|
.endif
|
2002-10-20 11:10:42 +02:00
|
|
|
|
2006-03-14 02:14:26 +01:00
|
|
|
${_DEINSTALL_FILE_DFLT}: ${_DEINSTALL_TEMPLATES_DFLT}
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${MKDIR} ${.TARGET:H}
|
|
|
|
${RUN}${CAT} ${.ALLSRC} | ${SED} ${FILES_SUBST_SED} > ${.TARGET}
|
|
|
|
${RUN}${CHMOD} +x ${.TARGET}
|
2002-10-20 11:10:42 +02:00
|
|
|
|
2006-03-14 02:14:26 +01:00
|
|
|
${_INSTALL_FILE_DFLT}: ${_INSTALL_TEMPLATES_DFLT}
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${MKDIR} ${.TARGET:H}
|
|
|
|
${RUN}${CAT} ${.ALLSRC} | ${SED} ${FILES_SUBST_SED} > ${.TARGET}
|
|
|
|
${RUN}${CHMOD} +x ${.TARGET}
|
2006-03-14 02:14:26 +01:00
|
|
|
|
|
|
|
${_DEINSTALL_FILE}: ${DEINSTALL_SRC}
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${MKDIR} ${.TARGET:H}
|
|
|
|
${RUN} \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
2006-03-14 02:14:26 +01:00
|
|
|
case ${.ALLSRC:Q}"" in \
|
2006-03-15 05:52:57 +01:00
|
|
|
"") ${ECHO} "#!${SH}" ; \
|
|
|
|
${ECHO} "exit 0" ;; \
|
|
|
|
*) ${CAT} ${.ALLSRC} | ${SED} ${FILES_SUBST_SED} ;; \
|
2006-03-14 02:14:26 +01:00
|
|
|
esac
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${CHMOD} +x ${.TARGET}
|
2006-03-14 02:14:26 +01:00
|
|
|
|
|
|
|
${_INSTALL_FILE}: ${INSTALL_SRC}
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${MKDIR} ${.TARGET:H}
|
|
|
|
${RUN} \
|
2006-06-09 18:41:09 +02:00
|
|
|
exec 1>>${.TARGET}; \
|
2006-03-14 02:14:26 +01:00
|
|
|
case ${.ALLSRC:Q}"" in \
|
2006-03-15 05:52:57 +01:00
|
|
|
"") ${ECHO} "#!${SH}" ; \
|
|
|
|
${ECHO} "exit 0" ;; \
|
|
|
|
*) ${CAT} ${.ALLSRC} | ${SED} ${FILES_SUBST_SED} ;; \
|
2006-03-14 02:14:26 +01:00
|
|
|
esac
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${CHMOD} +x ${.TARGET}
|
2006-03-14 02:14:26 +01:00
|
|
|
|
|
|
|
pre-install-script:
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN} \
|
2006-03-14 02:14:26 +01:00
|
|
|
if ${TEST} -x ${INSTALL_FILE}; then \
|
2006-07-19 20:05:35 +02:00
|
|
|
${STEP_MSG} "Running PRE-INSTALL script actions"; \
|
2011-09-08 22:17:15 +02:00
|
|
|
cd ${PKG_DB_TMPDIR} && ${PKGSRC_SETENV} ${INSTALL_SCRIPTS_ENV} \
|
2006-03-14 02:14:26 +01:00
|
|
|
${_PKG_DEBUG_SCRIPT} ${INSTALL_FILE} ${PKGNAME} \
|
|
|
|
PRE-INSTALL; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
post-install-script:
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN} \
|
2006-03-14 02:14:26 +01:00
|
|
|
if ${TEST} -x ${INSTALL_FILE}; then \
|
2006-07-19 20:05:35 +02:00
|
|
|
${STEP_MSG} "Running POST-INSTALL script actions"; \
|
2011-09-08 22:17:15 +02:00
|
|
|
cd ${PKG_DB_TMPDIR} && ${PKGSRC_SETENV} ${INSTALL_SCRIPTS_ENV} \
|
2006-03-14 02:14:26 +01:00
|
|
|
${_PKG_DEBUG_SCRIPT} ${INSTALL_FILE} ${PKGNAME} \
|
|
|
|
POST-INSTALL; \
|
|
|
|
fi
|
2001-11-19 17:18:44 +01:00
|
|
|
|
2002-09-19 11:02:40 +02:00
|
|
|
# rc.d scripts are automatically generated and installed into the rc.d
|
|
|
|
# scripts example directory at the post-install step. The following
|
2015-02-24 10:46:09 +01:00
|
|
|
# variables are relevant to this process:
|
2002-09-19 11:02:40 +02:00
|
|
|
#
|
|
|
|
# RCD_SCRIPTS lists the basenames of the rc.d scripts
|
|
|
|
#
|
|
|
|
# RCD_SCRIPT_SRC.<script> the source file for <script>; this will
|
|
|
|
# be run through FILES_SUBST to generate
|
2004-10-12 00:04:19 +02:00
|
|
|
# the rc.d script (defaults to
|
|
|
|
# ${FILESDIR}/<script>.sh)
|
2002-09-19 11:02:40 +02:00
|
|
|
#
|
|
|
|
# If the source rc.d script is not present, then the automatic handling
|
|
|
|
# doesn't occur.
|
|
|
|
|
2003-09-06 13:41:31 +02:00
|
|
|
.PHONY: generate-rcd-scripts
|
2002-09-19 11:02:40 +02:00
|
|
|
generate-rcd-scripts: # do nothing
|
2003-09-06 13:41:31 +02:00
|
|
|
|
|
|
|
.PHONY: install-rcd-scripts
|
2003-09-06 13:43:55 +02:00
|
|
|
post-install: install-rcd-scripts
|
2002-09-19 11:02:40 +02:00
|
|
|
install-rcd-scripts: # do nothing
|
|
|
|
|
2014-03-11 14:45:07 +01:00
|
|
|
.for _script_ in ${_INSTALL_RCD_SCRIPTS}
|
2002-09-19 11:02:40 +02:00
|
|
|
RCD_SCRIPT_SRC.${_script_}?= ${FILESDIR}/${_script_}.sh
|
2003-07-31 12:36:03 +02:00
|
|
|
RCD_SCRIPT_WRK.${_script_}?= ${WRKDIR}/${_script_}
|
2002-09-19 11:02:40 +02:00
|
|
|
|
2002-10-20 06:11:39 +02:00
|
|
|
. if !empty(RCD_SCRIPT_SRC.${_script_})
|
2003-07-31 12:36:03 +02:00
|
|
|
generate-rcd-scripts: ${RCD_SCRIPT_WRK.${_script_}}
|
|
|
|
${RCD_SCRIPT_WRK.${_script_}}: ${RCD_SCRIPT_SRC.${_script_}}
|
2006-06-06 00:49:44 +02:00
|
|
|
@${STEP_MSG} "Creating ${.TARGET}"
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN}${CAT} ${.ALLSRC} | ${SED} ${FILES_SUBST_SED} > ${.TARGET}
|
|
|
|
${RUN}${CHMOD} +x ${.TARGET}
|
2002-09-19 11:02:40 +02:00
|
|
|
|
|
|
|
install-rcd-scripts: install-rcd-${_script_}
|
2003-07-31 12:36:03 +02:00
|
|
|
install-rcd-${_script_}: ${RCD_SCRIPT_WRK.${_script_}}
|
2008-01-23 15:12:32 +01:00
|
|
|
${RUN} \
|
2003-07-31 12:36:03 +02:00
|
|
|
if [ -f ${RCD_SCRIPT_WRK.${_script_}} ]; then \
|
2006-11-05 15:51:24 +01:00
|
|
|
${MKDIR} ${DESTDIR}${PREFIX}/${RCD_SCRIPTS_EXAMPLEDIR}; \
|
2003-07-31 12:36:03 +02:00
|
|
|
${INSTALL_SCRIPT} ${RCD_SCRIPT_WRK.${_script_}} \
|
2006-11-05 15:51:24 +01:00
|
|
|
${DESTDIR}${PREFIX}/${RCD_SCRIPTS_EXAMPLEDIR}/${_script_}; \
|
2002-09-19 11:02:40 +02:00
|
|
|
fi
|
2002-10-20 06:11:39 +02:00
|
|
|
. endif
|
2014-03-11 14:45:07 +01:00
|
|
|
GENERATE_PLIST+= ${ECHO} ${RCD_SCRIPTS_EXAMPLEDIR}/${_script_};
|
|
|
|
PRINT_PLIST_AWK+= /^${RCD_SCRIPTS_EXAMPLEDIR:S|/|\\/|g}\/${_script_}/ { next; }
|
2002-09-19 11:02:40 +02:00
|
|
|
.endfor
|
2006-03-15 17:20:11 +01:00
|
|
|
|
|
|
|
_PKGINSTALL_TARGETS+= acquire-pkginstall-lock
|
Flatten out recursive makes into a single re-invocation of make by
introducing the concept of a "barrier". We separate the user-invokable
targets into ones that must happen before the barrier, and ones that
must happen after the barrier. The ones that happen after the barrier
are run in a sub-make process. In this case, the targets that must
be run after the barrier are from the "wrapper" step and beyond. We
rewrite the various "flow" targets, e.g. wrapper, configure, build,
etc., so that they of the right form to use the barrier target.
This now completely removes the concept of PKG_PHASE from pkgsrc. It
is replaced with the concept of "before" and "after" the barrier, and
this state can be checked by testing for the existence of the barrier
cookie file. Because we've removed most of the recursive makes, there
is now nowhere to hook the PKG_ERROR_HANDLER.* commands, so remove
them for now.
As part of this commit, put back the logic that conditionalized the
sources for the various cookie files. Because the sources are all
"phony" targets, they were always run, regardless of whether or not
the cookie file already existed. Now, if a cookie file exists, then
that entire phase associated with that cookie file is skipped.
Lastly, fix a thinko in configure/bsd.configure.mk where setting
NO_CONFIGURE in a package Makefile would manage to skip the "wrapper"
step altogether. Fix this by correctly noting "wrapper" and not
"patch" as the preceding step to "configure".
2006-07-06 00:21:02 +02:00
|
|
|
_PKGINSTALL_TARGETS+= real-pkginstall
|
2006-03-15 17:20:11 +01:00
|
|
|
_PKGINSTALL_TARGETS+= release-pkginstall-lock
|
|
|
|
|
2006-03-20 02:48:57 +01:00
|
|
|
.PHONY: pkginstall install-script-data
|
2006-03-15 17:20:11 +01:00
|
|
|
pkginstall: ${_PKGINSTALL_TARGETS}
|
|
|
|
|
|
|
|
.PHONY: acquire-pkginstall-lock release-pkginstall-lock
|
2006-06-04 06:31:47 +02:00
|
|
|
acquire-pkginstall-lock: acquire-lock
|
|
|
|
release-pkginstall-lock: release-lock
|
2006-03-15 17:20:11 +01:00
|
|
|
|
2006-03-17 19:22:30 +01:00
|
|
|
.PHONY: real-pkginstall
|
|
|
|
real-pkginstall: generate-rcd-scripts generate-install-scripts
|