summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.install.mk
AgeCommit message (Collapse)AuthorFilesLines
2004-10-11Make it so RCD_SCRIPTS_EXAMPLEDIR is a directory relative toreed1-12/+18
${PREFIX}. It is not an absolute path because with the automatic addition of the entry to the PLIST would be bogus if someone defined it to some RCD_SCRIPTS_EXAMPLEDIR outside of PREFIX. (This may cause multiple rc.d directories if there are multiple PREFIXes, but I think that is fine.) Note that at this time, this doesn't change the RCD_SCRIPTS_EXAMPLEDIR default directory. This will change soon. Most of this has been in use for over a year. Also some of this is from Greg Woods. Thank you Greg. I will next update a few other references to RCD_SCRIPTS_EXAMPLEDIR.
2004-10-11Add RCD_SCRIPTS_EXAMPLEDIR to the MESSAGE_SUBST. www/tinyproxy's MESSAGEreed1-1/+2
used it but it was not defined. Other MESSAGE files use it too.
2004-10-06Reorganize some of the files under pkgsrc/mk:jlam1-2/+2
(1) defs.${OPSYS}.mk --> platform/${OPSYS}.mk. The "platform" subdirectory is where all of the ${OPSYS}-specific infrastructure logic should reside. (2) bsd.pkg.defaults.mk --> defaults/mk.conf bsd.pkg.obsolete.mk --> defaults/obsolete.mk Renaming bsd.pkg.defaults.mk to defaults/mk.conf is to mimic the way that NetBSD has /etc/rc.conf as well as /etc/defaults/rc.conf, where the latter is a full list of user-settable variables, and the two files share the same name to reinforce the fact /etc/defaults/rc.conf can be directly copied in place as /etc/rc.conf. This is the same relationship shared by defaults/mk.conf and /etc/mk.conf.
2004-07-10Be explicit about the fact that USE_PKGINSTALL has to be set to YESwiz1-2/+2
for this Makefile fragment to get included. XXX: This should be documented in Packages.txt, not here.
2004-07-08Replace VARBASE in INSTALL/DEINSTALL scripts and in rc.d scripts.reed1-1/+2
2004-04-27Add ECHO_N to the list of substituted variables in [DE]INSTALL.tv1-1/+2
2004-04-27Indent properly.agc1-5/+5
2004-04-27Add Interix hack: if user and group are the same name, trip up with atv1-1/+15
BROKEN message telling the user that they must be different.
2004-04-27It's USE_GROUPADD, not USE_USERGROUP.tv1-2/+2
2004-04-23mk/bsd.pkg.install.mk now automatically registersreed1-1/+3
the RCD_SCRIPTS rc.d script(s) to the PLIST. This GENERATE_PLIST idea is part of Greg A. Woods' PR #22954. This helps when the RC_SCRIPTS are installed to a different ${RCD_SCRIPTS_EXAMPLEDIR}. (Later, the default RCD_SCRIPTS_EXAMPLEDIR will be changed to be more clear that they are the examples.) These patches also remove the etc/rc.d/ scripts from PLISTs (of packages that use RCD_SCRIPTS). (This also removes now unused references from openssh* makefiles. Note that qmail package has not been changed yet.) I have been doing automatic PLIST registration for RC_SCRIPTS for over a year. Not all of these packages have been tested, but many have been tested and used. Somethings maybe to do: - a few packages still manually install the rc.d scripts to hard-coded etc/rc.d. These need to be fixed. - maybe remove from mk/${OPSYS}.pkg.dist mtree specifications too.
2004-01-12Sync comment with reality: tell about USE_PKGINSTALL and discourage directsalo1-4/+4
inclusion of this file. Suggested bu cjep.
2003-12-20Define LS in install scripts (needed by install/fonts).jmmv1-1/+2
2003-11-23In the overwrite package case:jlam1-1/+5
* Ensure that VIEW-INSTALL is called after _all_ POST-INSTALL actions (including any in the INSTALL_EXTRA_TMPL file) by moving the call to a file that is included after all other INSTALL templates. * Ensure that VIEW-DEINSTALL is called before _all_ DEINSTALL actions (including any in the DEINSTALL_EXTRA_TMPL file) by moving the call to a file that is included before all other DEINSTALL templates.
2003-09-17Introduce a new variable "CONF_DEPENDS" for pkgviews: a package'sjlam1-1/+5
config directory matches the config directory for the dependency listed in CONF_DEPENDS. Use symlinks to physically point the package's config directory to the dependency's config directory, and handle all of this in the INSTALL/DEINSTALL scripts. Also make the INSTALL/DEINSTALL scripts a bit smarter about not copying files and not removing files if the source and destination file locations point to the same thing.
2003-09-12Make adding config files to views other than the default view work ifjlam1-2/+2
PKG_SYSCONFBASE points outside of ${PREFIX}.
2003-09-06Move RCD_SCRIPTS_DIR definition to bsd.pkg.defaults.mk. This implies thatjlam1-2/+1
RCD_SCRIPTS_DIR is user-settable in /etc/mk.conf.
2003-09-06Install the rcd scripts at post-install time, not at post-install-scriptjlam1-2/+3
time. The rc.d script needs to be recorded in the PLIST, and post-install-script time is too late if we use dynamic PLISTs.
2003-09-06Add .PHONY targets for Makefile correctness.jlam1-1/+7
2003-09-05Package Makefiles should refer to PKG_SYSCONFBASEDIR instead ofjlam1-6/+4
PKG_SYSCONFBASE when they want PKG_SYSCONFDIR stripped of PKG_SYSCONFSUBDIR. This makes PKG_SYSCONFBASE=/etc work with pkgviews by installing all config files into /etc/packages/<pkg> instead of occasionally putting some directly into /etc. Also only create PKG_SYSCONFDIR if we're actually going to copy config files.
2003-09-02Merge pkgviews-mk branch into the HEAD by running:jlam1-2/+6
cd pkgsrc/mk cvs update -Pd -A cvs update -Pd -j pkgviews-mk-base -j pkgviews-mk
2003-08-30No longer assume that a DEINSTALL/INSTALL script in the package directoryjlam1-9/+1
is meant for {,DE}INSTALL_EXTRA_TMPL. Package makefiles should explicitly set those variables if they want to use them in conjunction with USE_PKGINSTALL.
2003-08-30Add for use by the INSTALL/DEINSTALL scripts.jlam1-1/+2
2003-07-31Let a package override the name of the automatically generated rc.d scriptjmmv1-7/+8
files inside the WRKDIR. This is done by setting RCD_SCRIPT_WRK.<name> to the requested filename, like: RCD_SCRIPT_WRK.foobar= ${WRKDIR}/foobar.sh This fixes a problem (rc.d script not beeing generated) when there is a name conflict in the WRKDIR (i.e., the file already exists or WRKSRC has the same basename).
2003-07-30If a HEADER file exists in the package directory, then assume it's meantjlam1-1/+5
for the HEADER_EXTRA_TMPL variable.
2003-07-30Allow package Makefiles to insert a supplementary header to thejlam1-1/+4
INSTALL/DEINSTALL scripts via HEADER_EXTRA_TMPL, that is meant to contain variable definitions to be used by the various actions.
2002-12-02Add initial support for IRIX.jschauma1-3/+3
Again, anybody's feedback (success or failure) will be appreciated.
2002-11-17Introduce new framework which unifies registering packages providing loginsalo1-1/+12
shells to /etc/shells. This feature can be disabled by setting PKG_REGISTER_SHELLS to NO in /etc/mk.conf. An excerpt from Packages.txt, section 10.28: 10.28 Packages providing login shells ===================================== If the purpose of the package is to provide a login shell, the variable PKG_SHELL should contain the full pathname of the shell executable installed by this package. The package Makefile also must include "../../mk/bsd.pkg.install.mk" prior to the inclusion of bsd.pkg.mk to use the automatically generated INSTALL/DEINSTALL scripts. An example taken from shells/zsh: PKG_SHELL= ${PREFIX}/bin/zsh .include "../../mk/bsd.pkg.install.mk" The shell is registered into /etc/shells file automatically in the post-install target by the INSTALL script generated by bsd.pkg.install.mk and removed in the deinstall target by the DEINSTALL script.
2002-10-23Unless PKG_RCD_SCRIPTS=YES and RCD_SCRIPTS is non-empty, don't createjlam1-6/+3
${RCD_SCRIPTS_DIR} as it's not used at all.
2002-10-23Only create RCD_SCRIPTS_DIR if RCD_SCRIPTS is defined and non-empty injlam1-1/+3
the package Makefile.
2002-10-20SETUID_ROOT_PERMS is a convenience definition to note an executable isjlam1-1/+7
meant to be setuid-root, and should be used as follows: SPECIAL_PERMS+= /path/to/suidroot ${SETUID_ROOT_PERMS}
2002-10-20Generate the INSTALL/DEINSTALL scripts at post-build time, and use properjlam1-8/+19
make dependencies to ensure that the actual scripts are up-to-date if the sources are changed.
2002-10-20Generate the rc.d scripts at post-build time and use proper makejlam1-12/+12
dependencies to deal with changes in the source rc.d script file (this is possible now that some variables have moved to bsd.prefs.mk from bsd.pkg.mk).
2002-10-19Substitute for ${RCD_SCRIPTS_DIR} in MESSAGE files.jlam1-1/+2
2002-10-08Substitute for ${FIND} and ${XARGS}.jlam1-1/+3
2002-10-04Add new bsd.pkg.install.mk tunable variable: SPECIAL_PERMS.jlam1-1/+14
SPECIAL_PERMS are lists that look like: file user group mode At post-install time, file (it may be a directory) is changed to be owned by user:group with mode permissions. 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. Packages that install setuid executables should list them in SPECIAL_PERMS so that the correct user and group will be used for file ownership, even if the uid/gid changes between the package creation and the package installation.
2002-09-26When PKG_DEBUG_LEVEL=2, set_PKG_DEBUG_SCRIPT is set to "${SH} -x". Usejlam1-3/+7
_PKG_DEBUG_SCRIPT when running the INSTALL/DEINSTALL scripts so that they may be easier to debug.
2002-09-26Don't make ${RCD_SCRIPTS_EXAMPLEDIR} unless it doesn't exist, and if wejlam1-2/+6
do make it, make it with the same permissions as outlined in the *.pkg.dist files.
2002-09-20Add RCD_SCRIPTS_SHELL to automatic rc.d script handling, defaulting togrant1-1/+3
${SH}. Enables rc.d script portability for non-NetBSD systems. as discussed with jlam.
2002-09-19Restore the ability to not automatically install the rc.d script intojlam1-1/+7
/etc/rc.d. This is controlled by the new variable PKG_RCD_SCRIPTS which may be set in /etc/mk.conf or in the shell environment in which the INSTALL script is executed. PKG_RCD_SCRIPTS only takes effect if ${PKG_CONFIG} == "YES" and defaults to NO.
2002-09-19Automatically generate and install the rc.d scripts if specified byjlam1-3/+51
RCD_SCRIPTS. From the comments in bsd.pkg.install.mk: # rc.d scripts are automatically generated and installed into the rc.d # scripts example directory at the post-install step. The following # variables are relevent to this process: # # 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 # the rc.d script # # RCD_SCRIPTS_EXAMPLEDIR the directory in which to install the # example rc.d scripts # # If the source rc.d script is not present, then the automatic handling # doesn't occur.
2002-09-18When using bsd.pkg.install.mk, if a DEINSTALL or INSTALL file alreadyjlam1-1/+9
exists, then use it as the default value of DEINSTALL_EXTRA_TMPL or INSTALL_EXTRA_TMPL.
2002-07-24Create a new variable "RCD_SCRIPTS_EXAMPLEDIR" that contains the locationjlam1-4/+7
of the example rc.d scripts for a package. This defaults to ${PREFIX}/etc/rc.d, but may be reset for those odd packages, e.g. qmail, that set LOCALBASE=/.
2002-06-27Back out revisions 1.21 and 1.22 andjlam1-5/+4
(1) do the work of not being so noisy for /etc and /etc/rc.d in the scripts themselves, and (2) make PKG_SYSCONFBASE and PKG_SYSCONFDIR usable from within the INSTALL/DEINSTALL scripts by putting them in the header. This preserves the ability for a single binary package to be used for both PKG_CONFIG=yes or PKG_CONFIG=no.
2002-06-27pass PKG_SYSCONFDIR when calling {PRE,POST}-INSTALL.grant1-3/+3
2002-06-27Only add RCD_SCRIPTS_DIR to MAKE_DIRS if RCD_SCRIPTS isn't empty.lukem1-2/+5
Prevents warning on deinstall "remove /etc/rc.d" if no rc.d scripts are provided for the package and PKG_CONFIG=no.
2002-06-22Change PKG_CREATE_USERGROUP and PKG_CONFIG so that their values are merelyjlam1-1/+19
defaults for the INSTALL/DEINSTALL scripts. The environment variables of the same name take precedence during installation of a binary package.
2002-06-20In order to solve the following problems:jlam1-8/+1
(1) Admins want to create users/groups on their own (pkg/17183). (2) Admins don't want packages to setup an initial configuration. The bsd.pkg.install.mk-generated INSTALL/DEINSTALL scripts have been modified to check certain PKG_* environment variables to tune their behaviour. This works whether installing from "make install" or from a binary package. 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. The make(1) variable INSTALL_RCD_SCRIPTS is removed. The package rc.d script is now handled like other config files for the package, and is copied into place if PKG_CONFIG=YES. The default values above reflect the current behaviour. Setting PKG_CREATE_USERGROUP=NO solves problem (1), and setting PKG_CONFIG=NO solves problem (2). To simply matters for users installing directly from pkgsrc, these variables may also be defined in /etc/mk.conf, but behaviour at deinstall time may be surprising. It is *HIGHLY* recommended that these values be set in the shell environment instead.
2002-03-18Back out some changes that I didn't intend to commit.jlam1-5/+1
2002-03-15Allow INSTALL/DEINSTALL scripts to use ${INSTALL_INFO}.jlam1-1/+6
2002-01-22Also replace for @SETENV@ (/usr/bin/env).jlam1-1/+2