aboutsummaryrefslogtreecommitdiffstats
path: root/www/drupal7/Makefile
blob: 7ca6e627a6aaeb2548ebb35a9f8c21ef3c51f48a (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
# New ports collection makefile for:    Drupal
# Date Created:             10 Nov 2003
# Whom:                 Sebastian Yepes F. <esn@x123.info>
#
# $FreeBSD$
#

PORTNAME=   drupal
PORTVERSION=    4.6.5
PORTREVISION=   1
CATEGORIES= www
MASTER_SITES=   http://drupal.org/files/projects/

MAINTAINER= wxs@csh.rit.edu
COMMENT=    CMS that supports pgsql and mysql

USE_PHP=    session xml

.include <bsd.port.pre.mk>

.if exists(${LOCALBASE}/lib/libpq.so)
RUN_DEPENDS+=   ${LOCALBASE}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB
.endif

.if !defined(DRUPDIR)
pre-fetch:
    @${ECHO_MSG} ""
    @${ECHO_MSG} "Define DRUPDIR to override default of 'www/drupal'."
    @${ECHO_MSG} ""
.endif

DRUPDIR?=   www/drupal
WWWOWN?=    www
WWWGRP?=    www

NO_BUILD=   yes
DOCS=       CHANGELOG.txt INSTALL.txt LICENSE.txt MAINTAINERS.txt
PLIST_SUB+= DRUPDIR=${DRUPDIR}
SUB_LIST+=  DRUPDIR=${DRUPDIR}
SUB_FILES+= pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message

do-install:
    ${MKDIR} ${PREFIX}/${DRUPDIR}
    ${CP} ${WRKSRC}/.htaccess ${PREFIX}/${DRUPDIR}
    ${CP} ${WRKSRC}/cron.php ${PREFIX}/${DRUPDIR}
    ${CP} -R ${WRKSRC}/database ${PREFIX}/${DRUPDIR}
    ${CP} ${WRKSRC}/favicon.ico ${PREFIX}/${DRUPDIR}
    ${CP} -R ${WRKSRC}/includes ${PREFIX}/${DRUPDIR}
    ${CP} ${WRKSRC}/index.php ${PREFIX}/${DRUPDIR}
    ${CP} -R ${WRKSRC}/misc ${PREFIX}/${DRUPDIR}
    ${CP} -R ${WRKSRC}/modules ${PREFIX}/${DRUPDIR}
    ${CP} -R ${WRKSRC}/scripts ${PREFIX}/${DRUPDIR}
    ${MKDIR} ${PREFIX}/${DRUPDIR}/sites/default
    ${CP} ${WRKSRC}/sites/default/settings.php ${PREFIX}/${DRUPDIR}/sites/default/settings.php-dist
    @if [ ! -f ${PREFIX}/${DRUPDIR}/sites/default/settings.php ]; then \
        ${CP} -p ${PREFIX}/${DRUPDIR}/sites/default/settings.php-dist ${PREFIX}/${DRUPDIR}/sites/default/settings.php ; \
    fi
    ${CP} -R ${WRKSRC}/themes ${PREFIX}/${DRUPDIR}
    ${CP} ${WRKSRC}/update.php ${PREFIX}/${DRUPDIR}
    ${CP} ${WRKSRC}/xmlrpc.php ${PREFIX}/${DRUPDIR}
.if !defined(NOPORTDOCS)
    ${MKDIR} ${PREFIX}/${DRUPDIR}/doc
    ${CP} ${DOCS:S|^|${WRKSRC}/|} ${PREFIX}/${DRUPDIR}/doc
.endif
    ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${DRUPDIR}

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

.include <bsd.port.post.mk>