aboutsummaryrefslogtreecommitdiffstats
path: root/www/google-appengine/Makefile
blob: 01c911fb3d535243029ea3c2b8d37b6b4d538363 (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
# Created by: Nicola Vitale <nivit@FreeBSD.org>
# $FreeBSD$

PORTNAME=   google-appengine
PORTVERSION=    1.9.51
PORTREVISION=   1
CATEGORIES= www devel python
MASTER_SITES=   https://storage.googleapis.com/appengine-sdks/featured/
DISTFILES=  ${PORTNAME:S|-|_|}_${PORTVERSION}.zip

MAINTAINER= nivit@FreeBSD.org
COMMENT=    Development tools for Google App Engine (SDK)

LICENSE=    APACHE20 BSD3CLAUSE GPLv2 LGPL21 MIT MPL11 PSFL
LICENSE_COMB=   multi

RUN_DEPENDS=    ${PYTHON_PKGNAMEPREFIX}sqlite3>=${PYTHON_VER}:databases/py-sqlite3@${PY_FLAVOR} \
        ${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow@${PY_FLAVOR} \
        ${PYTHON_PKGNAMEPREFIX}pycrypto>=2.6:security/py-pycrypto@${PY_FLAVOR}

NO_BUILD=   yes

OPTIONS_DEFINE= EXAMPLES MYSQL PHP
OPTIONS_DEFAULT=    MYSQL

PORTDATA=   *
PORTEXAMPLES=   *
PLIST_FILES=    ${GAESCRIPTS:C,^| ,bin/&,g}

USES=       gettext python:2.7 shebangfix zip
SHEBANG_FILES=  ${GAESCRIPTS}

WRKSRC= ${WRKDIR}/${PORTNAME:S,-,_,}

LN_OPTS=    -sf

GAEDATADIR= google lib new_project_template tools
GAESCRIPTS= _php_runtime.py _python_runtime.py appcfg.py \
        backends_conversion.py bulkload_client.py bulkloader.py \
        dev_appserver.py download_appstats.py endpointscfg.py \
        gen_protorpc.py php_cli.py remote_api_shell.py \
        run_tests.py wrapper_util.py

MYSQL_RUN_DEPENDS=  ${PYTHON_PKGNAMEPREFIX}MySQLdb>=1.2.3:databases/py-MySQLdb@${PY_FLAVOR}

PHP_USE=    mysql=server
PHP_VARS=   gaedatadir+=php want_mysql_ver=55

do-install:
    @${MKDIR} ${STAGEDIR}${DATADIR}
    (cd ${WRKSRC} && ${COPYTREE_SHARE} "${GAEDATADIR}" ${STAGEDIR}${DATADIR})
    @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
    (cd ${WRKSRC}/demos && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
    (cd ${STAGEDIR}${PREFIX}/bin && \
    for S in ${GAESCRIPTS}; do \
    ${INSTALL_SCRIPT} ${WRKSRC}/$${S} ${STAGEDIR}${DATADIR}; \
    ${LN} ${LN_OPTS} ../${DATADIR_REL}/$${S} $${S}; \
    done)
    ${INSTALL_DATA} ${WRKSRC}/VERSION ${STAGEDIR}${DATADIR}

    (cd ${STAGEDIR}${DATADIR} && \
    ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py -d ${DATADIR} -f ${GAEDATADIR:Nphp} -q)

.include <bsd.port.mk>