aboutsummaryrefslogtreecommitdiffstats
path: root/www/google-appengine/Makefile
blob: 1b4067a2a868016daa2fe58929271894b262b822 (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
# New ports collection makefile for:    google-appengine
# Date created:     2008-04-09
# Whom:         Nicola Vitale   <nivit@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   google-appengine
PORTVERSION=    1.0.2
#PORTREVISION=  0
#PORTEPOCH= 0
CATEGORIES= www devel python
MASTER_SITES=   ${MASTER_SITE_GOOGLE_CODE}
PROJECTHOST=    googleappengine
DISTNAME=   ${PORTNAME:S|-|_|}_${PORTVERSION}

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

NO_BUILD=   yes

USE_PYTHON= 2.5+
USE_ZIP=    yes

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

FIND_FILES= ${WRKSRC} -type f -name "*.py" -print0
FIND_FILES_BAK= ${WRKSRC} -type f -and \( -name "*.orig" -or -name "*.bak" \)

LN_OPTS=    -s

XARGS_ARGS= -0
REINPLACE_ARGS= -i.bak -e 's,/usr/bin/env python,&${PYTHON_VER},'

GAEDATADIR= google lib new_project_template templates tools

post-patch:
    @${FIND} ${FIND_FILES} | ${XARGS} ${XARGS_ARGS} ${REINPLACE_CMD}
    @${FIND} ${FIND_FILES_BAK} -delete

do-install:
    ${MKDIR} ${DATADIR}
    cd ${WRKSRC} && ${COPYTREE_SHARE} "${GAEDATADIR}" ${DATADIR} "-not -path './demos*' -and -mindepth 1"
.if !defined(NOPORTEXAMPLES)
    cd ${WRKSRC} && ${COPYTREE_SHARE} demos ${EXAMPLESDIR}
.endif
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/LICENSE ${WRKSRC}/README ${DOCSDIR}
.endif
    ${INSTALL_SCRIPT} ${WRKSRC}/dev_appserver.py ${DATADIR}
    ${INSTALL_SCRIPT} ${WRKSRC}/appcfg.py ${DATADIR}
    ${INSTALL_DATA} ${WRKSRC}/VERSION ${DATADIR}
    ${LN} ${LN_OPTS} ${DATADIR}/dev_appserver.py ${PREFIX}/bin/dev_appserver.py
    ${LN} ${LN_OPTS} ${DATADIR}/appcfg.py ${PREFIX}/bin/appcfg.py

.include <bsd.port.mk>