summaryrefslogtreecommitdiff
path: root/devel/mantis/Makefile
blob: 3778fe21537c6877ecb35641ece4d90327f27fd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# $NetBSD: Makefile,v 1.21 2006/05/28 15:17:47 adrianp Exp $

DISTNAME=	mantis-1.0.3
CATEGORIES=	devel www
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=mantisbt/}

MAINTAINER=	adrianp@NetBSD.org
HOMEPAGE=	http://www.mantisdb.org/
COMMENT=	PHP/MySQL/web based bugtracking system

DEPENDS+=	ap-php>=4.0.6:../../www/ap-php
DEPENDS+=	php-mysql>=4.0.6:../../databases/php-mysql

NO_BUILD=	YES

.include "../../mk/bsd.prefs.mk"

PKG_OPTIONS_VAR=	PKG_OPTIONS.mantis
PKG_SUPPORTED_OPTIONS=	charts

.include "../../mk/bsd.options.mk"

.if !empty(PKG_OPTIONS:Mcharts)
DEPENDS+=	php-jpgraph-[0-9]*:../../graphics/php-jpgraph
.endif

APACHE_USER?=	www

BUILD_DEFS+=	APACHE_USER
MESSAGE_SUBST+=	PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}

MANTIS_HOME=	${PREFIX}/share/mantis
EGDIR=		${PREFIX}/share/examples/mantis
CONF_FILES+=	${EGDIR}/mantis.conf ${PKG_SYSCONFDIR}/mantis.conf \
		${EGDIR}/config_inc.php ${MANTIS_HOME}/config_inc.php
SPECIAL_PERMS=	${MANTIS_HOME}/config_inc.php ${APACHE_USER} ${SHAREGRP} 0400
MANTIS_EG=	config_inc.php mantis.conf mantis_offline.php.sample

SUBST_CLASSES+=		conf
SUBST_STAGE.conf=	pre-install
SUBST_FILES.conf=	mantis.conf
SUBST_SED.conf=		-e "s|@MANTIS_HOME@|${MANTIS_HOME}|g"
SUBST_MESSAGE.conf=	Fixing configuration files.

post-extract:
	${CP} ${FILESDIR}/mantis.conf ${WRKSRC}

do-install:
	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mantis
	${INSTALL_DATA_DIR} ${EGDIR}
	${INSTALL_DATA_DIR} ${MANTIS_HOME}

	${INSTALL_DATA} ${WRKSRC}/doc/CUSTOMIZATION ${PREFIX}/share/doc/mantis
	${INSTALL_DATA} ${WRKSRC}/doc/INSTALL ${PREFIX}/share/doc/mantis
	${INSTALL_DATA} ${WRKSRC}/doc/README ${PREFIX}/share/doc/mantis
	${INSTALL_DATA} ${WRKSRC}/doc/UPGRADING ${PREFIX}/share/doc/mantis
	${MV} ${WRKSRC}/config_inc.php.sample ${WRKSRC}/config_inc.php

. 	for f in ${MANTIS_EG}
	${INSTALL_DATA} ${WRKSRC}/${f} ${EGDIR}
	${RM} ${WRKSRC}/${f}
.	endfor

	cd ${WRKSRC} && ${FIND} . -name .cvsignore -print | ${XARGS} ${RM}
	cd ${WRKSRC} && ${PAX} -rwpppm . ${MANTIS_HOME}

.include "../../mk/mysql.buildlink3.mk"
.include "../../lang/php/phpversion.mk"
.include "../../mk/apache.mk"
.include "../../mk/bsd.pkg.mk"