aboutsummaryrefslogtreecommitdiff
path: root/textproc/ecromedos/Makefile
blob: a3ea2aed748b60081478c8d435f067e49929a60b (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
# New ports collection makefile for:	ecromedos
# Date created:		2006-04-07
# Whom:			Nicola Vitale	<nivit@email.it>
#
# $FreeBSD$
#

PORTNAME=	ecromedos
PORTVERSION=	1.0.1
PORTREVISION=	4
CATEGORIES=	textproc print www
MASTER_SITES=	http://www.ecromedos.net/files/${PORTVERSION}/

MAINTAINER=	nivit@FreeBSD.org
COMMENT=	A document preparation system that allows concurrent publication

RUN_DEPENDS=	convert:${PORTSDIR}/graphics/ImageMagick \
		latex:${PORTSDIR}/print/teTeX \
		${PYTHON_SITELIBDIR}/libxml2.py:${PORTSDIR}/textproc/py-libxml2 \
		${PYTHON_SITELIBDIR}/libxslt.py:${PORTSDIR}/textproc/py-libxslt
LIB_DEPENDS=	xml2.5:${PORTSDIR}/textproc/libxml2 \
		xslt.2:${PORTSDIR}/textproc/libxslt

NO_BUILD=	yes
USE_PYTHON=	yes

FIND_DIRS=	-type d
FIND_DATA=	-type f -not \( -name "*.orig" -or -name "*.bak" \)

LN_OPTS=	-sf
RM_OPTS=	-r

ECMDS_CONF=	${WRKSRC}/etc/ecmds.conf
ECROMEDOC=	${DATADIR}/doc
ECROMEBIN=	${DATADIR}/bin/${PORTNAME}

post-patch:
	${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
		     -e 's|%%DATADIR%%|${DATADIR}|g' ${ECMDS_CONF}

do-install:
	${MKDIR} ${DATADIR}
	cd ${WRKSRC} && ${FIND} . ${FIND_DIRS} -exec ${MKDIR} ${DATADIR}/{} \;
	cd ${WRKSRC} && ${FIND} . ${FIND_DATA} -exec ${INSTALL_DATA} {} ${DATADIR}/{} \;
	${INSTALL_SCRIPT} ${WRKSRC}/bin/${PORTNAME} ${ECROMEBIN}
	${LN} ${LN_OPTS} ${ECROMEBIN} ${PREFIX}/bin/${PORTNAME}
	${LN} ${LN_OPTS} ${ECROMEBIN} ${PREFIX}/bin/ecmds
.if !defined(NOPORTDOCS)
	${MV} ${ECROMEDOC} ${DOCSDIR}
	${LN} ${LN_OPTS} ${DOCSDIR} ${ECROMEDOC}
.else
	${RM} ${RM_OPTS} ${ECROMEDOC}
.endif

.include <bsd.port.mk>