summaryrefslogtreecommitdiff
path: root/textproc/asciidoc/Makefile
blob: f0335d4caee4657d312f8dcaf3b9550eeeab1226 (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
# $NetBSD: Makefile,v 1.2 2006/11/17 20:43:48 reed Exp $
#

DISTNAME=		asciidoc-8.1.0
CATEGORIES=		textproc
MASTER_SITES=		${HOMEPAGE}	\
			${MASTER_SITE_SOURCEFORGE:=asciidoc/}

MAINTAINER=		rillig@NetBSD.org
HOMEPAGE=		http://www.methods.co.nz/asciidoc/
COMMENT=		ASCII to formatted document converter

DEPENDS+=		docbook-xsl-[0-9]*:../../textproc/docbook-xsl

REPLACE_BASH+=		a2x
USE_TOOLS+=		bash:run
PYTHON_PATCH_SCRIPTS=	asciidoc.py
NO_BUILD=		yes

SUBST_CLASSES+=		ad
SUBST_STAGE.ad=		pre-configure
SUBST_MESSAGE.ad=	Fixing hard-coded paths.
SUBST_FILES.ad=		asciidoc.py
SUBST_SED.ad=		-e 's,^\(GLOBAL_CONFIG_DIR\).*=.*,\1 = "${PREFIX}/share/asciidoc",'

INSTALLATION_DIRS=	bin share/asciidoc share/asciidoc/filters \
			share/asciidoc/docbook-xsl share/asciidoc/stylesheets \
			share/asciidoc/javascripts \
			share/asciidoc/images/icons/callouts \
			${PKGMANDIR}/man1

do-install:
	${INSTALL_SCRIPT} ${WRKSRC}/asciidoc.py ${PREFIX}/bin/asciidoc
	${INSTALL_SCRIPT} ${WRKSRC}/a2x ${PREFIX}/bin/a2x
	${INSTALL_MAN} ${WRKSRC}/doc/asciidoc.1 ${PREFIX}/${PKGMANDIR}/man1/
	${INSTALL_MAN} ${WRKSRC}/doc/a2x.1 ${PREFIX}/${PKGMANDIR}/man1/
	cd ${WRKSRC} && ${PAX} -wr -pma *.conf stylesheets filters/*.py \
		filters/*.conf docbook-xsl/*.xsl stylesheets/*.css	\
		javascripts/*.js images/icons/callouts/* images/icons/*.png \
		${PREFIX}/share/asciidoc/.

do-test:
	cd ${WRKSRC} && ./asciidoc.py -v doc/asciidoc.txt

# requires Python 2.3 or newer
.include "../../lang/python/application.mk"
.include "../../textproc/libxslt/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"