summaryrefslogtreecommitdiff
path: root/textproc/troffcvt/Makefile
blob: 506d294e401387e0c0219d1dc8ccaca77777cd83 (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
53
54
55
56
57
58
59
60
61
# $NetBSD: Makefile,v 1.20 2013/05/31 12:42:24 wiz Exp $
#

DISTNAME=		troffcvt-1.04
PKGREVISION=		3
CATEGORIES=		textproc
MASTER_SITES=		http://www.snake.net/software/troffcvt/

MAINTAINER=		pkgsrc-users@NetBSD.org
HOMEPAGE=		${MASTER_SITES}
COMMENT=		Troff/groff to RTF/HTML/TEXT converter

MAKE_JOBS_SAFE=		no

USE_TOOLS+=		perl:run

INSTALL_TARGET=		install install.man
INSTALLATION_DIRS=	bin ${PKGMANDIR}/man1 lib/troffcvt

post-patch:
	for i in `${FIND} ${WRKSRC} -name Makefile -print`; do \
		${MV} $$i $$i.bak;\
		${SED} <$$i.bak >$$i \
			-e "s| -Dsun -DSVR4||" \
			-e "s| -lsocket -lnsl -lw||" \
			-e "s| -Xc||" \
			-e "s|/usr/include/sys/feature_tests.h||" \
			-e "s|/usr/tmp|/tmp|g" \
			-e "s|/usr/local|${PREFIX}|g" \
			-e "s|/usr/local/man|${PREFIX}/man|" ;\
	done

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/troffcvt/troffcvt ${DESTDIR}${PREFIX}/bin
	${INSTALL_SCRIPT} ${WRKSRC}/tblcvt/tblcvt ${DESTDIR}${PREFIX}/bin
	cd ${WRKSRC}/post && ${INSTALL_PROGRAM} tc2null tc2html tc2rtf tc2text \
		${DESTDIR}${PREFIX}/bin
	cd ${WRKSRC}/post && ${INSTALL_SCRIPT} troff2null tc2html-toc \
		troff2html troff2rtf unroff ${DESTDIR}${PREFIX}/bin
	cd ${WRKSRC}/troffcvt && ${INSTALL_DATA} actions actions-html \
		tc.man tc.man-html tc.me tc.me-html tc.mm tc.mm-html tc.ms \
		tc.ms-html tc.mdoc tc.mdoc-html ${DESTDIR}${PREFIX}/lib/troffcvt
	cd ${WRKSRC}/post && ${INSTALL_DATA} tcr-fonts html-fonts \
		html-specials rtf-fonts rtf-spec-ansi rtf-spec-mac \
		rtf-spec-pc rtf-spec-pca text-specials text-8-specials \
		${DESTDIR}${PREFIX}/lib/troffcvt
	${INSTALL_MAN} ${WRKSRC}/man/tblcvt.man ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/tblcvt.1
	${INSTALL_MAN} ${WRKSRC}/man/unroff.man ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/unroff.1
	${INSTALL_MAN} ${WRKSRC}/man/troff2rtf.man \
		${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/troff2rtf.1
	${INSTALL_MAN} ${WRKSRC}/man/tc2html-toc.man \
		${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/tc2html-toc.1
	${INSTALL_MAN} ${WRKSRC}/man/troff2html.man \
		${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/troff2html.1
	${INSTALL_MAN} ${WRKSRC}/man/tc2html.man ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/tc2html.1
	${INSTALL_MAN} ${WRKSRC}/man/troffcvt.man ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/troffcvt.1

.include "../../devel/libmemmgr/buildlink3.mk"
.include "../../devel/libportlib/buildlink3.mk"
.include "../../devel/libts/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"