aboutsummaryrefslogtreecommitdiffstats
path: root/www/drupal7/Makefile
blob: 121d7467c5e6b830081f8d501c65ffc664a75dcb (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
# Created by: Nick Hilliard <nick@foobar.org>
# $FreeBSD$

PORTNAME=   drupal7
PORTVERSION=    7.28
CATEGORIES= www
MASTER_SITES=   http://ftp.drupal.org/files/projects/
DISTNAME=   drupal-${PORTVERSION}
DIST_SUBDIR=    drupal

MAINTAINER= miwi@FreeBSD.org
COMMENT=    Database driven web content management system (CMS)

LICENSE=    GPLv2 GPLv3
LICENSE_COMB=   dual

USE_DRUPAL= yes
DRUPAL_PORT=    yes
DRUPAL_VERSION= 7

USE_PHP=    dom filter gd hash json mbstring pcre pdo session simplexml xml
WANT_PHP_WEB=   yes

OPTIONS_DEFINE=     MYSQL SQLITE3 PGSQL
OPTIONS_DEFAULT=    MYSQL

NO_BUILD=   yes
DOCS=       CHANGELOG.txt INSTALL.mysql.txt INSTALL.sqlite.txt \
        LICENSE.txt README.txt COPYRIGHT.txt INSTALL.pgsql.txt \
        INSTALL.txt MAINTAINERS.txt UPGRADE.txt

SUB_FILES+= pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MSQLITE3}
USE_PHP+=   pdo_sqlite
.endif
.if ${PORT_OPTIONS:MMYSQL}
USE_MYSQL=  yes
USE_PHP+=   pdo_mysql
.endif
.if ${PORT_OPTIONS:MPGSQL}
USE_PGSQL=  yes
USE_PHP+=   pdo_pgsql
.endif

do-install:
    ${MKDIR} ${STAGEDIR}${DRUPAL_DIR}
    ${CP} ${WRKSRC}/.htaccess ${STAGEDIR}${DRUPAL_DIR}
    ${CP} ${WRKSRC}/cron.php ${STAGEDIR}${DRUPAL_DIR}
    ${CP} ${WRKSRC}/authorize.php ${STAGEDIR}${DRUPAL_DIR}
    ${CP} -R ${WRKSRC}/includes ${STAGEDIR}${DRUPAL_DIR}
    ${CP} ${WRKSRC}/index.php ${STAGEDIR}${DRUPAL_DIR}
    ${CP} ${WRKSRC}/install.php ${STAGEDIR}${DRUPAL_DIR}
    ${CP} -R ${WRKSRC}/misc ${STAGEDIR}${DRUPAL_DIR}
    ${CP} -R ${WRKSRC}/modules ${STAGEDIR}${DRUPAL_DIR}
    ${CP} -R ${WRKSRC}/profiles ${STAGEDIR}${DRUPAL_DIR}
    ${CP} ${WRKSRC}/robots.txt ${STAGEDIR}${DRUPAL_DIR}
    ${CP} -R ${WRKSRC}/scripts ${STAGEDIR}${DRUPAL_DIR}
    ${MKDIR} ${STAGEDIR}${DRUPAL_DIR}/sites/all
    ${MKDIR} ${STAGEDIR}${DRUPAL_DIR}/sites/all/libraries
    ${CP} ${WRKSRC}/sites/example.sites.php ${STAGEDIR}${DRUPAL_DIR}/sites/
    ${CP} -R ${WRKSRC}/sites/all ${STAGEDIR}${DRUPAL_DIR}/sites/
    ${MKDIR} ${STAGEDIR}${DRUPAL_DIR}/sites/default
    ${MKDIR} ${STAGEDIR}${DRUPAL_DIR}/sites/default/files
    ${CP} ${WRKSRC}/sites/default/default.settings.php ${STAGEDIR}${DRUPAL_DIR}/sites/default/default.settings.php-dist
    @if [ ! -f ${STAGEDIR}${DRUPAL_DIR}/sites/default/default.settings.php ]; then \
        ${CP} -p ${STAGEDIR}${DRUPAL_DIR}/sites/default/default.settings.php-dist ${STAGEDIR}${DRUPAL_DIR}/sites/default/default.settings.php ; \
    fi
    ${CP} -R ${WRKSRC}/themes ${STAGEDIR}${DRUPAL_DIR}
    ${CP} ${WRKSRC}/update.php ${STAGEDIR}${DRUPAL_DIR}
    ${CP} ${WRKSRC}/web.config ${STAGEDIR}${DRUPAL_DIR}
    ${CP} ${WRKSRC}/xmlrpc.php ${STAGEDIR}${DRUPAL_DIR}
    ${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${CP} ${DOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
    ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${STAGEDIR}${DRUPAL_DIR}

.include <bsd.port.mk>