aboutsummaryrefslogtreecommitdiffstats
path: root/www/yii/Makefile
blob: 30cc6b5806cf74fe91497a37b5e81b34cfd2eac6 (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
# Created by: Yi-Jheng Lin <yzlin@cs.nctu.edu.tw>
# $FreeBSD$

PORTNAME=   yii
PORTVERSION=    1.1.15
CATEGORIES= www

MAINTAINER= ports@FreeBSD.org
COMMENT=    High-performance component-based PHP framework

LICENSE=    BSD3CLAUSE

USE_GITHUB= yes
GH_ACCOUNT= yiisoft

NO_BUILD=   yes
USES=       cpe
CPE_PRODUCT=    yiiframework
USE_PHP=    pcre spl
WANT_PHP_WEB=   yes

SUB_FILES=  pkg-message

OPTIONS_DEFINE= MYSQL PGSQL SQLITE REQPHP DOCS EXAMPLES
OPTIONS_DEFAULT=    REQPHP
REQPHP_DESC=    PHP dependencies required by plugins

PORTDOCS=   CHANGELOG LICENSE README UPGRADE

INSTALL_DIRS=   framework

PGSQL_RUN_DEPENDS=  ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/pdo_pgsql.so:${PORTSDIR}/databases/php5-pdo_pgsql

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MREQPHP}
USE_PHP+=   apc dom gd mcrypt memcache pdo soap
.endif

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

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

post-patch:
    @${SED} -i "" -e "s,dirname(__FILE__),'${DATADIR}/framework'," ${WRKSRC}/framework/yiic

do-install:
    (cd ${WRKSRC} && ${COPYTREE_SHARE} "${INSTALL_DIRS}" ${STAGEDIR}${DATADIR})
    ${INSTALL_SCRIPT} ${WRKSRC}/framework/yiic ${STAGEDIR}${PREFIX}/bin
    (cd ${WRKSRC} && ${COPYTREE_SHARE} "demos requirements" ${STAGEDIR}${EXAMPLESDIR})
    ${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>