aboutsummaryrefslogtreecommitdiff
path: root/www/redmine/Makefile
blob: 2010e00579e36b85aac71e9183bfe6bbba006c4e (plain) (blame)
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
# New ports collection makefile for:	redmine
# Date created:		2009-02-24
# Whom:			Bernhard Froehlich <decke@bluelife.at>
#
# $FreeBSD$
#

PORTNAME=	redmine
PORTVERSION=	0.9.3
PORTREVISION=	2
CATEGORIES=	www
MASTER_SITES=	${MASTER_SITE_RUBYFORGE}
MASTER_SITE_SUBDIR=	${PORTNAME}

MAINTAINER=	decke@bluelife.at
COMMENT=	A flexible project management web application

RUN_DEPENDS=	rackup:${PORTSDIR}/www/rubygem-rack \
		thin:${PORTSDIR}/www/rubygem-thin

USE_RUBY=	yes
USE_RUBY_FEATURES=	iconv
USE_RAKE=	yes
NO_BUILD=	yes
USE_RC_SUBR=	redmine
SUB_LIST+=	RUBY_NAME=${RUBY_NAME}

OPTIONS=	MYSQL	"Enable MySQL Support" on \
		POSTGRESQL "Enable PostgreSQL Support" off

.include <bsd.port.pre.mk>

.if defined(WITH_MYSQL)
RUN_DEPENDS+=	${RUBY_SITEARCHLIBDIR}/mysql.so:${PORTSDIR}/databases/ruby-mysql
.endif

.if defined(WITH_POSTGRESQL)
RUN_DEPENDS+=	${RUBY_SITEARCHLIBDIR}/pg.so:${PORTSDIR}/databases/ruby-pg
.endif

do-install:
	${MKDIR} ${WWWDIR}
	(cd ${WRKSRC}/ && ${COPYTREE_SHARE} "*" ${WWWDIR} "! -name *.orig")

	${MKDIR} ${WWWDIR}/public/plugin_assets
	${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}

	${FIND} ${WWWDIR}/script -type f -exec ${CHMOD} 755 {} \;

post-install:
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>