summaryrefslogtreecommitdiffstats
path: root/www/grail/Makefile
blob: 5604c573dde4efcc7934c04f8ef1f153dc16d349 (plain)
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
# Ports collection Makefile for:	Grail
# Version required:			0.5
# Date created:				1/11/1999
# Whom:					nectar@FreeBSD.org
#
# $FreeBSD$
#

DISTNAME=		grail-06
PKGNAME=		grail-0.6
CATEGORIES=		www python
MASTER_SITES=		http://grail.cnri.reston.va.us/grail/source/
EXTRACT_SUFX=		.tgz

MAINTAINER=		nectar@freebsd.org

BUILD_DEPENDS=		python:${PORTSDIR}/lang/python
RUN_DEPENDS=		${PREFIX}/lib/python1.5/site-packages/_tkinter.so:${PORTSDIR}/x11-toolkits/py-tkinter

WRKSRC=			${WRKDIR}/${PKGNAME}

GRAILSUBDIR=		share/grail
GRAILDIR=		${PREFIX}/${GRAILSUBDIR}
DIRS_CMD=		${CAT} ${PLIST} | ${GREP} '^@dirrm' | ${SED} 's,@dirrm ,,'
FILES_CMD=		${CAT} ${PLIST} | ${GREP} -v '^@' | ${SED} 's,${GRAILSUBDIR}/,,'

FIND?=find
PYTHON?=python

do-build:
	${PYTHON} -u -c 'from compileall import compile_dir; compile_dir("${WRKSRC}")'

do-install:
	@${ECHO} === Creating directories...
	@for dir in `${DIRS_CMD}`; do                                  \
		${ECHO} ${PREFIX}/$$dir;                               \
		${MKDIR} ${PREFIX}/$$dir;                              \
	done
	@${ECHO} === Installing grail files ...
	@for file in `${FILES_CMD}`; do                                \
		${ECHO} ${GRAILDIR}/$$file;                            \
		${INSTALL_DATA} ${WRKSRC}/$$file ${GRAILDIR}/$$file;   \
	done
	@${ECHO} === Installing grail script...
	@${SED} 's,%%GRAILDIR%%,${GRAILDIR},g' <${FILESDIR}/grail >    \
		${WRKDIR}/grail.tmp
	@${INSTALL_SCRIPT} ${WRKDIR}/grail.tmp ${PREFIX}/bin/grail
	@${RM} ${WRKDIR}/grail.tmp

.include <bsd.port.mk>
OpenPOWER on IntegriCloud