summaryrefslogtreecommitdiff
path: root/textproc/rtf-tools/Makefile
blob: d561a405a4f611f1427b212e43d675ecac72a1f0 (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
51
52
# $NetBSD: Makefile,v 1.11 2003/12/13 16:20:09 ben Exp $
#

DISTNAME=		RTF-1.10
PKGNAME=		rtf-tools-1.10
PKGREVISION=		1
WRKSRC=			${WRKDIR}/rtf
CATEGORIES=		textproc
MASTER_SITES=		http://www.snake.net/software/RTF/
EXTRACT_SUFX=		.tar.Z

MAINTAINER=		collver1@comcast.net
HOMEPAGE=		${MASTER_SITES}
COMMENT=		RTF to troff/groff/text converter

BUILD_DEPENDS+=		libts-1.08:../../devel/libts

INSTALL_TARGET=		install install.man

post-patch:
	for i in `${FIND} ${WRKSRC} -name Makefile`; do \
		${MV} $$i $$i.bak;\
		${SED} <$$i.bak >$$i \
			-e "s|-DVARARGS|-DSTDARGS|g" \
			-e "s|/usr/local|${PREFIX}|g" \
			-e "s|/usr/man|${PREFIX}/man|" \
			-e "s|\(LOCALBINDIR =.*\)|\1/bin|" ;\
	done

do-install:
	${INSTALL_DATA_DIR} ${PREFIX}/lib/rtf-tools
	${INSTALL_DATA} ${WRKSRC}/h/standard-names ${PREFIX}/lib/rtf-tools
	cd ${WRKSRC}/lib && ${INSTALL_DATA} ansi-gen ansi-sym \
		mac-gen mac-sym pc-gen pc-sym pca-gen pca-sym \
		${PREFIX}/lib/rtf-tools
	${INSTALL_DATA} ${WRKSRC}/rtf2text/text-map ${PREFIX}/lib/rtf-tools
	cd ${WRKSRC}/rtf2troff && ${INSTALL_DATA} troff-map groff-map \
		xroff-map dwbtroff-map troff-man-map troff-me-map \
		troff-mm-map troff-ms-map ${PREFIX}/lib/rtf-tools
	${INSTALL_SCRIPT} ${WRKSRC}/util/rtfchkmap ${PREFIX}/bin
	${INSTALL_SCRIPT} ${WRKSRC}/util/rtfmaptortf ${PREFIX}/bin
	${INSTALL_PROGRAM} ${WRKSRC}/rtf2null/rtf2null ${PREFIX}/bin
	${INSTALL_PROGRAM} ${WRKSRC}/rtf2text/rtf2text ${PREFIX}/bin
	${INSTALL_PROGRAM} ${WRKSRC}/rtf2troff/rtf2troff ${PREFIX}/bin
	${INSTALL_SCRIPT} ${WRKSRC}/rtf2troff/rtf2groff ${PREFIX}/bin
	${INSTALL_PROGRAM} ${WRKSRC}/rtfdiag/rtfdiag ${PREFIX}/bin
	${INSTALL_PROGRAM} ${WRKSRC}/rtfindent/rtfindent ${PREFIX}/bin
	${INSTALL_PROGRAM} ${WRKSRC}/rtfwc/rtfwc ${PREFIX}/bin
	${INSTALL_MAN} ${WRKSRC}/man/rtf2troff.man \
		${PREFIX}/man/manl/rtf2troff.l

.include "../../mk/bsd.pkg.mk"