aboutsummaryrefslogtreecommitdiffstats
path: root/www/ojs2/Makefile
blob: 9d6995c110e60f1e6b6528464059b73b9ef4bf5c (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
# New ports collection makefile for:    ojs
# Date created:             4 March 2006
# Whom:                 Filipe Rocha <filiperocha@gmail.com>
#
# $FreeBSD$
#

PORTNAME=   ojs2
PORTVERSION=    2.2
CATEGORIES= www
MASTER_SITES=   http://pkp.sfu.ca/ojs/download/
DISTNAME=   ojs-2.2

MAINTAINER= filiperocha@gmail.com
COMMENT=    Open Journal Systems

DIST_SUBDIR=    ${PORTNAME}

NO_BUILD=   yes
USE_PHP=    mbstring
WANT_PHP_WEB=   yes

OJSDIR?=    www/ojs2

OPTIONS=    MYSQL "Use a MYSQL Database" on \
        PGSQL "Use a PostgreSQL Database" off \
        LDAP  "Use LDAP Authentication" off

pre-everything::
    @${ECHO_MSG} "=============================================================================================="
    @${ECHO_MSG} ""
    @${ECHO_MSG} "If you are upgrading please refer to docs/UPGRADE or browse to http://pkp.sfu.ca/ojs/UPGRADE"
    @${ECHO_MSG} ""
    @${ECHO_MSG} "=============================================================================================="

.include <bsd.port.pre.mk>

.if defined(WITHOUT_MYSQL) && !defined(WITH_PGSQL)
IGNORE=     needs at least least one DB backend; please run 'make config'
.endif

.ifndef(WITHOUT_MYSQL)
USE_PHP+=   mysql
.endif

.ifdef(WITH_PGSQL)
USE_PHP+=   pgsql
.endif

.ifdef(WITH_LDAP)
USE_PHP+=   ldap
.endif

do-install:
    @${INSTALL_DATA} -d ${PREFIX}/${OJSDIR}
    @${CP} -Rn ${WRKSRC}/* ${PREFIX}/${OJSDIR}
    @${FIND} ${PREFIX}/${OJSDIR} -type d -exec ${CHMOD} a+x {} \;
    @${FIND} ${PREFIX}/${OJSDIR}/cache/t_cache/ -type d -exec ${CHMOD} -R +rw {} \;
    @${FIND} ${PREFIX}/${OJSDIR}/cache/t_compile/ -type d -exec ${CHMOD} -R +rw {} \;
    @${FIND} ${PREFIX}/${OJSDIR}/cache/t_config/ -type d -exec ${CHMOD} -R +rw {} \;
    @${FIND} ${PREFIX}/${OJSDIR}/cache/_db/ -type d -exec ${CHMOD} -R +rw {} \;
    @${FIND} ${PREFIX}/${OJSDIR}/config.inc.php -type d -exec ${CHMOD} -R +rw {} \;
    @${FIND} ${PREFIX}/${OJSDIR}/public/ -type d -exec ${CHMOD} -R +rw {} \;
    @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${OJSDIR}

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

.include <bsd.port.post.mk>