daad0f3d6c
INSTALL/DEINSTALL script creation within pkgsrc. If an INSTALL or DEINSTALL script is found in the package directory, it is automatically used as a template for the pkginstall-generated scripts. If instead, they should be used simply as the full scripts, then the package Makefile should set INSTALL_SRC or DEINSTALL_SRC explicitly, e.g.: INSTALL_SRC= ${PKGDIR}/INSTALL DEINSTALL_SRC= # emtpy As part of the restructuring of the pkginstall framework internals, we now *always* generate temporary INSTALL or DEINSTALL scripts. By comparing these temporary scripts with minimal INSTALL/DEINSTALL scripts formed from only the base templates, we determine whether or not the INSTALL/DEINSTALL scripts are actually needed by the package (see the generate-install-scripts target in bsd.pkginstall.mk). In addition, more variables in the framework have been made private. The *_EXTRA_TMPL variables have been renamed to *_TEMPLATE, which are more sensible names given the very few exported variables in this framework. The only public variables relating to the templates are: INSTALL_SRC INSTALL_TEMPLATE DEINSTALL_SRC DEINSTALL_TEMPLATE HEADER_TEMPLATE The packages in pkgsrc have been modified to reflect the changes in the pkginstall framework.
66 lines
2.5 KiB
Text
66 lines
2.5 KiB
Text
# $NetBSD: Makefile.install,v 1.3 2006/03/14 01:14:27 jlam Exp $
|
|
|
|
RT_SHARE_DIR= ${PREFIX}/share/rt3
|
|
RT_EXAMPLE_DIR= ${PREFIX}/share/examples/rt3
|
|
RT_LIB_DIR= ${PREFIX}/lib/rt3
|
|
RT_VAR_DIR= ${VARBASE}/spool/rt3
|
|
RT_LOCAL_DIR?= ${RT_SHARE_DIR}/local
|
|
RT_HTML_DIR= ${RT_SHARE_DIR}/html
|
|
RT_DOC_DIR= ${PREFIX}/share/doc/rt3
|
|
|
|
BUILD_DEFS+= RT_LOCAL_DIR
|
|
|
|
OWN_DIRS+= ${RT_LOCAL_DIR} ${RT_SHARE_DIR} ${RT_VAR_DIR}
|
|
|
|
SUBST_CLASSES+= prefix
|
|
SUBST_FILES.prefix= config.layout
|
|
SUBST_SED.prefix= -e s,@PREFIX@,${PREFIX}, \
|
|
-e s,@PKGSYSCONFDIR@,${PKG_SYSCONFDIR}, \
|
|
-e s,@RTLIBDIR@,${RT_LIB_DIR}, \
|
|
-e s,@RTSHAREDIR@,${RT_SHARE_DIR}, \
|
|
-e s,@RTHTMLDIR@,${RT_HTML_DIR}, \
|
|
-e s,@RTDOCDIR@,${RT_DOC_DIR}, \
|
|
-e s,@RTVARDIR@,${RT_VAR_DIR}, \
|
|
-e s,@RTLOCALDIR@,${RT_LOCAL_DIR},
|
|
SUBST_STAGE.prefix= pre-configure
|
|
|
|
RT_CONFIG_FILES= RT_Config.pm RT_SiteConfig.pm
|
|
RT_SUPPORT_FILES= acl.Informix acl.Oracle acl.Pg acl.Sybase acl.mysql \
|
|
initialdata schema.Informix schema.Oracle schema.Pg \
|
|
schema.Sybase schema.mysql
|
|
|
|
.for _file_ in ${RT_CONFIG_FILES}
|
|
CONF_FILES_PERMS+= ${RT_EXAMPLE_DIR}/${_file_} ${PKG_SYSCONFDIR}/${_file_} \
|
|
${ROOT_USER} ${RT_GROUP} 0550
|
|
.endfor
|
|
.for _file_ in ${RT_SUPPORT_FILES}
|
|
CONF_FILES_PERMS+= ${RT_EXAMPLE_DIR}/${_file_} ${PKG_SYSCONFDIR}/${_file_} \
|
|
${ROOT_USER} ${RT_GROUP} 0500
|
|
.endfor
|
|
|
|
FILES_SUBST+= RTVARDIR=${RT_VAR_DIR:Q} RTLOCALDIR=${RT_LOCAL_DIR:Q}
|
|
FILES_SUBST+= WEBUSER=${APACHE_USER:Q} WEBGROUP=${APACHE_GROUP:Q}
|
|
|
|
do-install:
|
|
@${ECHO} "=> Configuration files"
|
|
${INSTALL_DATA_DIR} ${RT_EXAMPLE_DIR}
|
|
.for _file_ in ${RT_CONFIG_FILES} ${RT_SUPPORT_FILES}
|
|
${INSTALL_DATA} ${WRKSRC}/etc/${_file_} ${RT_EXAMPLE_DIR}
|
|
.endfor
|
|
@${ECHO} "=> Libraries"
|
|
${INSTALL_DATA_DIR} ${RT_LIB_DIR}
|
|
cd ${WRKSRC}/lib && ${FIND} . -type f ! -name '*.orig' 2>/dev/null | ${PAX} -rw ${RT_LIB_DIR}
|
|
@${ECHO} "=> Binaries"
|
|
${INSTALL_SCRIPT} ${WRKSRC}/bin/rt-mailgate ${WRKSRC}/bin/rt-crontool \
|
|
${WRKSRC}/bin/mason_handler.fcgi ${WRKSRC}/bin/mason_handler.scgi \
|
|
${WRKSRC}/bin/standalone_httpd ${WRKSRC}/bin/mason_handler.svc \
|
|
${WRKSRC}/bin/rt ${WRKSRC}/bin/webmux.pl ${WRKSRC}/bin/rt-crontool \
|
|
${PREFIX}/bin
|
|
${INSTALL_SCRIPT} ${WRKSRC}/sbin/rt-setup-database \
|
|
${WRKSRC}/sbin/rt-test-dependencies ${PREFIX}/sbin
|
|
@${ECHO} "=> HTML documents"
|
|
${INSTALL_DATA_DIR} ${RT_HTML_DIR}
|
|
cd ${WRKSRC}/html && ${FIND} . -type f ! -name '*.orig' 2>/dev/null | ${PAX} -rw ${RT_HTML_DIR}
|
|
@${ECHO} "=> Documentation"
|
|
${INSTALL_DATA_DIR} ${RT_DOC_DIR}
|
|
${INSTALL_DATA} ${WRKSRC}/README ${RT_DOC_DIR}
|