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