update Tue Jun 22 06:37:08 PDT 2010
[pkgsrc.git] / textproc / asciidoc / Makefile
1 # $NetBSD: Makefile,v 1.22 2010/05/17 15:31:56 wiz Exp $
2 #
3
4 DISTNAME=               asciidoc-8.5.3
5 PKGREVISION=            1
6 CATEGORIES=             textproc
7 MASTER_SITES=           ${HOMEPAGE:Q} \
8                         ${MASTER_SITE_SOURCEFORGE:=asciidoc/}
9
10 MAINTAINER=             gdt@NetBSD.org
11 HOMEPAGE=               http://www.methods.co.nz/asciidoc/
12 COMMENT=                ASCII to formatted document converter
13
14 PKG_DESTDIR_SUPPORT=    user-destdir
15
16 DEPENDS+=               docbook-xsl-[0-9]*:../../textproc/docbook-xsl
17 DEPENDS+=               getopt-[0-9]*:../../misc/getopt
18
19 USE_TOOLS+=             pax
20 PYTHON_PATCH_SCRIPTS=   a2x.py asciidoc.py
21 PYTHON_PATCH_SCRIPTS+=  filters/code/code-filter.py
22 PYTHON_PATCH_SCRIPTS+=  filters/music/music2png.py
23 PYTHON_PATCH_SCRIPTS+=  filters/graphviz/graphviz2png.py
24
25 NO_BUILD=               yes
26
27 SUBST_CLASSES+=         ad
28 SUBST_STAGE.ad=         pre-configure
29 SUBST_MESSAGE.ad=       Fixing hard-coded config file paths.
30 SUBST_FILES.ad=         a2x.py asciidoc.py
31 SUBST_SED.ad=           -e 's,^\(CONF_DIR\).*=.*,\1="${PREFIX}/share/asciidoc",'
32
33 SUBST_CLASSES+=         ae
34 SUBST_STAGE.ae=         pre-configure
35 SUBST_MESSAGE.ae=       Fixing hard-coded Python interpreter paths.
36 SUBST_FILES.ae=         a2x.py asciidoc.conf
37 SUBST_SED.ae=           -e 's,python,${PYTHONBIN},'
38
39 INSTALLATION_DIRS=      bin share/asciidoc share/asciidoc/filters \
40                         share/asciidoc/docbook-xsl share/asciidoc/stylesheets \
41                         share/asciidoc/javascripts \
42                         share/asciidoc/images/icons/callouts \
43                         ${PKGMANDIR}/man1 ${DOCDIR} \
44
45 DOCDIR=         ${PREFIX}/share/doc/asciidoc
46
47 do-install:
48         ${INSTALL_SCRIPT} ${WRKSRC}/asciidoc.py ${DESTDIR}${PREFIX}/bin/asciidoc
49         ${INSTALL_SCRIPT} ${WRKSRC}/a2x.py ${DESTDIR}${PREFIX}/bin/a2x
50         ${INSTALL_MAN} ${WRKSRC}/doc/asciidoc.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/
51         ${INSTALL_MAN} ${WRKSRC}/doc/a2x.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/
52         ${INSTALL_DATA} ${WRKSRC}/doc/asciidoc.txt ${DESTDIR}${DOCDIR}
53         ${INSTALL_DATA} ${WRKSRC}/doc/asciidoc.html ${DESTDIR}${DOCDIR}
54
55         cd ${WRKSRC} && pax -wr -pma *.conf filters \
56                 filters docbook-xsl/*.xsl stylesheets/*.css     \
57                 javascripts/*.js images/icons/callouts/* images/icons/*.png \
58                 images/icons/README \
59                 ${DESTDIR}${PREFIX}/share/asciidoc/.
60
61 do-test:
62         cd ${WRKSRC} && ./asciidoc.py -v doc/asciidoc.txt
63
64 .include "../../lang/python/application.mk"
65 .include "../../textproc/libxslt/buildlink3.mk"
66 .include "../../mk/bsd.pkg.mk"