aboutsummaryrefslogtreecommitdiff
path: root/devel/viewvc/Makefile
blob: c7b153d3122551d8dccf98fc0fc3e1b13a364230 (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
# New ports collection makefile for:	viewcvs
# Date created:				Sun 02 Jul 2000
# Whom:					will
#
# $FreeBSD$
#

PORTNAME=	viewvc
PORTVERSION=	1.0.7
CATEGORIES=	devel python
MASTER_SITES=	http://viewvc.tigris.org/files/documents/3330/44050/

MAINTAINER=	pgollucci@FreeBSD.org
COMMENT=	Web-based Version Control Repository Browsing

OPTIONS=	SUBVERSION 	"use svn binding" 			on \
		APACHE2 	"use Apache as webserver" 		on \
		LIGHTTPD 	"use Lighttp as webserver" 		off \
		MODPYTHON3 	"enable mod_python3 support" 		off \
		MYSQL 		"enable experimental MYSQL support" 	off

NO_BUILD=	yes
USE_PYTHON=	yes
SUB_FILES=	pkg-message
SUB_LIST=	INSTDIR="${PREFIX}/${INSTDIR}"

INSTDIR?=	${PORTNAME}
PLIST_SUB=	INSTDIR=${INSTDIR}

.include <bsd.port.pre.mk>

.if !defined(WITH_APACHE2) && !defined(WITH_LIGHTTPD)
USE_RC_SUBR=	viewvc
.endif

# viewvc can support CVS or SVN, controlled with the parameter
# cvs_roots (for CVS), svn_roots (for Subversion) in viewvc.conf
.if defined (WITH_SUBVERSION)
RUN_DEPENDS+=	${PYTHON_LIBDIR}/site-packages/svn/__init__.py:${PORTSDIR}/devel/py-subversion
.endif

.if defined (WITH_APACHE2)
USE_APACHE=	2.0+
.endif

.if defined(WITH_LIGHTTPD)
RUN_DEPENDS+=	lighttpd:${PORTSDIR}/www/lighttpd
.endif

.if defined(WITH_MODPYTHON3)
RUN_DEPENDS+=	${LOCALBASE}/${APACHEMODDIR}/mod_python.so:${PORTSDIR}/www/mod_python3
.endif

# This feature is a clone of the Mozilla Project's Bonsai database.
# It catalogs every commit in the CVS or Subversion repository into a SQL database.
# In fact, the databases are 100% compatible.
.if defined(WITH_MYSQL)
RUN_DEPENDS+=	${PYTHON_LIBDIR}/site-packages/_mysql.so:${PORTSDIR}/databases/py-MySQLdb
.endif

pre-everything::
.if defined(WITH_APACHE2) && defined(WITH_LIGHTTPD)
	@${ECHO_CMD} "It doesn't make sense to depend on Apache *and* LighHTTPD choose only one."
	@${FALSE}
.endif

.if defined(WITH_MODPYTHON3) && !defined(WITH_APACHE2) && defined(WITH_LIGHTTPD)
	@${ECHO_CMD} "mod_python3 needs Apache, please select Apache and deselect LighHTTPD"
	@${FALSE}
.elif defined(WITH_MODPYTHON3) && !defined(WITH_APACHE2)
	@${ECHO_CMD} "mod_python3 needs Apache, please select Apache"
	@${FALSE}
.endif

do-install:
	@(cd ${WRKSRC} && ${PYTHON_CMD} viewvc-install --prefix=${PREFIX}/${INSTDIR} --destdir="" --clean-mode=false)

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

.include <bsd.port.post.mk>