aboutsummaryrefslogtreecommitdiffstats
path: root/www/codeigniter/Makefile
blob: 552616a4926ccb6752d9c423d7573f5a76e59633 (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# Created by: Greg Larkin <glarkin@FreeBSD.org>
# $FreeBSD$

PORTNAME=   codeigniter
PORTVERSION=    2.2.4
CATEGORIES= www
MASTER_SITES=   http://downloads.codeigniter.com/reactor/ \
        http://www.codeigniter.org.tw/download_files/
DISTNAME=   CodeIgniter_${PORTVERSION}

MAINTAINER= appleboy.tw@gmail.com
COMMENT=    Framework for developing PHP web applications

USES=       zip

CONFLICTS=  codeigniter-1.[0-9]*

NO_ARCH=    yes
NO_BUILD=   yes
USE_PHP=    mcrypt pcre session
WANT_PHP_WEB=   yes
PLIST_SUB=  WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}

CI_SYS_DIR= system
CI_CONF_DIR=    application/config
WRKSRC=     ${WRKDIR}/CodeIgniter-${PORTVERSION}
PORTDOCS=   *

# These are all user-configurable files that we'll install
CI_CONF_FILES=  index.php ${CI_CONF_DIR}/autoload.php \
        ${CI_CONF_DIR}/config.php ${CI_CONF_DIR}/constants.php \
        ${CI_CONF_DIR}/database.php \
        ${CI_CONF_DIR}/doctypes.php \
        ${CI_CONF_DIR}/foreign_chars.php \
        ${CI_CONF_DIR}/hooks.php \
        ${CI_CONF_DIR}/mimes.php \
        ${CI_CONF_DIR}/migration.php \
        ${CI_CONF_DIR}/profiler.php \
        ${CI_CONF_DIR}/routes.php ${CI_CONF_DIR}/smileys.php \
        ${CI_CONF_DIR}/user_agents.php

# This is the rest of the CodeIgniter installation that doesn't change
STD_BITS=   ${CI_CONF_DIR}/index.html \
        application/cache \
        application/controllers \
        application/core \
        application/errors \
        application/helpers \
        application/hooks \
        application/index.html \
        application/language \
        application/libraries \
        application/logs \
        application/models \
        application/third_party \
        application/views \
        ${CI_SYS_DIR}/core \
        ${CI_SYS_DIR}/database \
        ${CI_SYS_DIR}/fonts \
        ${CI_SYS_DIR}/helpers \
        ${CI_SYS_DIR}/language \
        ${CI_SYS_DIR}/libraries

OPTIONS_DEFINE= APACHE DOCS MSSQL MYSQL MYSQLI ODBC PGSQL SQLITE

APACHE_DESC=    Configure for Apache-2.x
MSSQL_DESC= Install MSSQL support for PHP
MYSQL_DESC= Install MySQL support for PHP
MYSQLI_DESC=    Install MySQLi support for PHP
ODBC_DESC=  Install ODBC support for PHP
PGSQL_DESC= Install PostgreSQL support for PHP
SQLITE_DESC=    Install SQLite support for PHP

.include <bsd.port.pre.mk>

SUB_FILES=  pkg-message
.if ${PORT_OPTIONS:MAPACHE}
USE_APACHE_RUN= 22+
PLIST_SUB+= NOAPACHE="" CONFDIR=${CONFDIR_REL}
CONFDIR=    ${PREFIX}/${CONFDIR_REL}
CONFDIR_REL=    ${APACHEETCDIR}/Includes
.else
PLIST_SUB+= NOAPACHE="@comment "
.endif
PLIST_SUB+= ECHO_MSG=${ECHO_MSG} CI_CONF_DIR=${CI_CONF_DIR}

.if ${PORT_OPTIONS:MMSSQL}
USE_PHP+=   mssql
.endif

.if ${PORT_OPTIONS:MMYSQL}
USE_PHP+=   mysql
.endif

.if ${PORT_OPTIONS:MMYSQLI}
USE_PHP+=   mysqli
.endif

.if ${PORT_OPTIONS:MODBC}
USE_PHP+=   odbc
.endif

.if ${PORT_OPTIONS:MPGSQL}
USE_PHP+=   pgsql
.endif

.if ${PORT_OPTIONS:MSQLITE}
USE_PHP+=   sqlite3
.endif

.if ${PORT_OPTIONS:MDOCS}
SUB_LIST+=  HASHMARK=\#
.else
SUB_LIST+=  HASHMARK=
.endif

CONF=       codeigniter.conf
SUB_FILES+= ${CONF}

do-install:
    @cd ${WRKSRC} && ${COPYTREE_SHARE} "${STD_BITS}" ${STAGEDIR}${WWWDIR}
    @for i in ${CI_CONF_FILES}; do \
        ${INSTALL_DATA} ${WRKSRC}/$$i ${STAGEDIR}${WWWDIR}/$$i.sample; \
    done

post-install:
.if ${PORT_OPTIONS:MAPACHE}
      ${CP} ${WRKDIR}/${CONF} ${STAGEDIR}${CONFDIR}/codeigniter.conf;
.endif
.if ${PORT_OPTIONS:MDOCS}
    @cd ${WRKSRC}/user_guide && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
.endif

.include <bsd.port.post.mk>