diff options
author | rillig <rillig> | 2007-09-11 22:21:12 +0000 |
---|---|---|
committer | rillig <rillig> | 2007-09-11 22:21:12 +0000 |
commit | e33a340f4ff9f0e6a23157bee3e08dfed7452574 (patch) | |
tree | f62f7ac77e36d0f5bcd894d0fa39ad2675ac192a | |
parent | 165a6a9a6671195eb449452d8be4fcdd88f93bcd (diff) | |
download | pkgsrc-e33a340f4ff9f0e6a23157bee3e08dfed7452574.tar.gz |
Fixed many pkglint warnings in order to make the build possible for
unprivileged users who don't have write access to /var. As a result, the
Makefile has become a bit shorter and more readable.
-rw-r--r-- | devel/rt-mysql/Makefile.common | 53 |
1 files changed, 22 insertions, 31 deletions
diff --git a/devel/rt-mysql/Makefile.common b/devel/rt-mysql/Makefile.common index 4f6100900a7..8e445860130 100644 --- a/devel/rt-mysql/Makefile.common +++ b/devel/rt-mysql/Makefile.common @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.15 2007/07/04 20:54:38 jlam Exp $ +# $NetBSD: Makefile.common,v 1.16 2007/09/11 22:21:12 rillig Exp $ DISTNAME= rt-2-0-15 CATEGORIES= devel @@ -7,14 +7,17 @@ MASTER_SITES= http://www.bestpractical.com/rt/release/ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://www.bestpractical.com/rt/ COMMENT= Industrial-grade ticketing system -CONFLICTS= rt-* +CONFLICTS= rt-*-[0-9]* + +.include "../../mk/bsd.prefs.mk" RT_GROUP?= rt RT_PATH?= ${PREFIX}/rt -RT_VAR_PATH?= /var/pkg/rt +RT_VAR_PATH?= ${VARBASE}/pkg/rt RT_LOG_PATH?= ${RT_VAR_PATH}/log RT_DATA_PATH?= ${RT_VAR_PATH}/data RT_SESSION_PATH?= ${RT_VAR_PATH}/sessiondata +BUILD_DEFS+= VARBASE RT_DB_HOME?= ${PREFIX} RT_DB_DATABASE?=rt2 @@ -90,36 +93,24 @@ DEPENDS+= p5-FreezeThaw-[0-9]*:../../devel/p5-FreezeThaw DEPENDS+= p5-Log-Dispatch-[0-9]*:../../devel/p5-Log-Dispatch DEPENDS+= p5-Apache-DBI-[0-9]*:../../databases/p5-Apache-DBI -pre-configure: - @${ECHO} "=> Removing CVS directories from work directory" - @${FIND} ${WRKSRC} -name CVS -type d -print | ${XARGS} ${RM} -rf - @${CP} ${FILESDIR}/rtconfig ${WRKSRC}/rtconfig - @${CP} ${FILESDIR}/README ${WRKSRC}/README.pkg - @cd ${WRKSRC} ; \ - for f in Makefile rtconfig README.pkg; do \ - ${ECHO} "=> Doing RT variable replacement in $$f"; \ - [ -f $$f.BAK ] || ${MV} $$f $$f.BAK ; \ - ${SED} -e 's|@PREFIX@|${PREFIX}|g' \ - -e 's|@RT_GROUP@|${RT_GROUP}|g' \ - -e 's|@RT_PATH@|${RT_PATH}|g' \ - -e 's|@RT_LOG_PATH@|${RT_LOG_PATH}|g' \ - -e 's|@RT_DATA_PATH@|${RT_DATA_PATH}|g' \ - -e 's|@RT_SESSION_PATH@|${RT_SESSION_PATH}|g' \ - -e 's|@RT_DB_TYPE@|${RT_DB_TYPE}|g' \ - -e 's|@RT_DB_DBA@|${RT_DB_DBA}|g' \ - -e 's|@RT_DB_DBA_PASSWORD@|${RT_DB_DBA_PASSWORD}|g' \ - -e 's|@RT_DB_DATABASE@|${RT_DB_DATABASE}|g' \ - -e 's|@RT_DB_USER@|${RT_DB_USER}|g' \ - -e 's|@RT_DB_PASS@|${RT_DB_PASS}|g' \ - -e 's|@RT_DB_HOME@|${RT_DB_HOME}|g' \ - -e 's|@RT_DB_HOST@|${RT_DB_HOST}|g' \ - -e 's|@RT_DB_PORT@|${RT_DB_PORT}|g' \ - -e 's|@RT_WEB_USER@|${RT_WEB_USER}|g' \ - -e 's|@RT_WEB_GROUP@|${RT_WEB_GROUP}|g' < $$f.BAK > $$f; \ - done +SUBST_CLASSES+= rt +SUBST_STAGE.rt= pre-configure +SUBST_FILES.rt= Makefile rtconfig README.pkg +SUBST_VARS.rt= PREFIX RT_GROUP \ + RT_PATH RT_LOG_PATH RT_DATA_PATH RT_SESSION_PATH \ + RT_DB_TYPE RT_DB_DBA RT_DB_DBA_PASSWORD RT_DB_DATABASE RT_DB_USER \ + RT_DB_PASS RT_DB_HOME RT_DB_HOST RT_DB_PORT RT_WEB_USER RT_WEB_GROUP + +post-extract: + @${STEP_MSG} "Removing CVS directories from work directory" + ${FIND} ${WRKSRC} -name CVS -type d -print | ${XARGS} ${RM} -rf + +post-patch: + ${CP} ${FILESDIR}/rtconfig ${WRKSRC}/rtconfig + ${CP} ${FILESDIR}/README ${WRKSRC}/README.pkg pre-build: - (mkdir -p ${WRKSRC}/src; \ + set -e; (mkdir -p ${WRKSRC}/src; \ cd ${WRKSRC}/src; \ ${CP} ${FILESDIR}/wrapper.c .; \ ${ECHO} '#define RT_REAL_PATH "${RT_PATH}/bin/real"' > config.h; \ |