summaryrefslogtreecommitdiff
path: root/news/pyne/Makefile
blob: edb6057561c3e62e13030739c40a53912a2de4ae (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
# ex:ts=8
# New ports collection makefile for:	pyne
# Date created:			Dec 10, 2001
# Whom:				ijliao
#
# $FreeBSD$
#

PORTNAME=	pyne
PORTVERSION=	1.1.0
PORTREVISION=	1
CATEGORIES=	news python mail
MASTER_SITES=	http://www.soul-less.pwp.blueyonder.co.uk/pyne/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	An X11 offline Newsreader/Emailer

BUILD_WRKSRC=	${WRKDIR}/${DISTNAME}/src/po
INSTALL_WRKSRC=	${WRKDIR}/${DISTNAME}/src/po

USE_GNOME=	pygtk2
USE_PYTHON=	yes

pre-build:
	@${ECHO_CMD} "#!/bin/sh" > ${WRKDIR}/pyne.sh
	@${ECHO_CMD} "exec ${PYTHON_CMD} -O ${PYTHON_SITELIBDIR}/pyne/pyne.py \$$*" >> ${WRKDIR}/pyne.sh

post-build:
	cd ${WRKSRC} && ${CC} ${CFLAGS} yencdec.c -o yencdec

post-install:
	${INSTALL_SCRIPT} ${WRKDIR}/pyne.sh ${PREFIX}/bin/pyne
	${INSTALL_PROGRAM} ${WRKSRC}/yencdec  ${PREFIX}/bin/yencdec
	@${MKDIR} ${PYTHON_SITELIBDIR}/pyne
	${TAR} -C ${WRKSRC}/src --exclude po --exclude test -cf - . | \
		${TAR} -C ${PYTHON_SITELIBDIR}/pyne --unlink -xf -
	@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PYTHON_SITELIBDIR}/pyne
	${PYTHON_CMD} -O -c "import compileall ; compileall.compile_dir(\"${PYTHON_SITELIBDIR}/pyne\")"

.include <bsd.port.mk>