summaryrefslogtreecommitdiff
path: root/ports-mgmt/tinderbox-devel/Makefile
blob: fc5b776993b6934c95012e435b87800ada38fc7d (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Ports collection makefile for:	misc/tinderbox
# Whom:			Edwin Groothuis <edwin@mavetju.org>
# Date created:		31 december 2005
#
# $FreeBSD$

PORTNAME=	tinderbox
PORTVERSION=	2.3.1
CATEGORIES=	misc
MASTER_SITES=	http://tinderbox.marcuscom.com/

MAINTAINER=	andreas@syndrom23.de
COMMENT=	Port build tinderbox system

RUN_DEPENDS=	${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \
		${SITE_PERL}/Net/SMTP.pm:${PORTSDIR}/net/p5-Net \
		${LOCALBASE}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB \

OPTIONS=	PGSQL "With pgsql" Off \
		MYSQL "With mysql" On \
		CSUP  "Use csup for updates" On \
		CVSUP "Use cvsup for updates" Off

NO_BUILD=	yes
USE_APACHE=	1.3+
SUB_FILES=	pkg-message
PKGMESSAGE=	${WRKDIR}/pkg-message

MAN1=		tc-configCcache.1 tc-configDistfile.1 tc-configGet.1 \
		tc-configJail.1 tc-configTinderd.1 tc-init.1

.include <bsd.port.pre.mk>

.if defined(WITHOUT_PGSQL) && defined(WITHOUT_MYSQL)
IGNORE=	is useless without a database. Please (re)run 'make config' and choose one of PGSQL and MYSQL
.endif

USE_PHP=	session

.if defined(WITH_PGSQL)
USE_PGSQL=	yes
USE_PHP+=	pgsql
RUN_DEPENDS+=	${SITE_PERL}/${PERL_ARCH}/DBD/Pg.pm:${PORTSDIR}/databases/p5-DBD-Pg
.endif

.if !defined(WITHOUT_MYSQL)
USE_PHP+=	mysql
USE_MYSQL=	yes
RUN_DEPENDS+=	${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql${MYSQL_VER}
.endif

.if defined(WITH_CSUP)
RUN_DEPENDS+=	csup:${PORTSDIR}/net/csup
.endif

.if defined(WITH_CVSUP)
RUN_DEPENDS+=	cvsup:${PORTSDIR}/net/cvsup-without-gui
.endif

.include "${PORTSDIR}/Mk/bsd.php.mk"

post-extract:
.for f in inc_ds.php inc_tinderbox.php
	${MV} ${WRKSRC}/www-exp/${f} ${WRKSRC}/www-exp/${f}-dist
.endfor

post-patch:
.if defined(WITH_MYSQL)
	@${REINPLACE_CMD} \
		-e 's,DB_MAN_PREREQS=.*,DB_MAN_PREREQS="databases/p5-DBD-mysql${MYSQL_VER} databases/mysql${MYSQL_VER}-client",' \
		${WRKSRC}/lib/setup-mysql.sh
	@${RM} ${WRKSRC}/lib/setup-mysql.sh.bak
.endif

do-install:
	${MKDIR} ${PREFIX}/tinderbox/scripts
	${CP} -R ${WRKSRC}/* ${PREFIX}/tinderbox/scripts

post-install:
	cd ${WRKSRC}/man/man1 && ${INSTALL_MAN} ${MAN1} ${MAN1PREFIX}/man/man1
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>