summaryrefslogtreecommitdiff
path: root/textproc/dtdparse/Makefile
blob: 3c7957f7635bbeeb8968d5e80ba4b41fb9a08dbb (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
# $NetBSD: Makefile,v 1.7 2005/06/17 03:50:36 jlam Exp $
#

DISTNAME=	dtdparse-2.0beta6
PKGREVISION=	2
CATEGORIES=	textproc
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=dtdparse/}

MAINTAINER=	minskim@NetBSD.org
HOMEPAGE=	http://dtdparse.sourceforge.net/
COMMENT=	Reads an SGML or XML DTD and constructs an XML database

DEPENDS+=	p5-XML-Parser-[0-9]*:../../textproc/p5-XML-Parser
DEPENDS+=	p5-XML-DOM-[0-9]*:../../textproc/p5-XML-DOM
DEPENDS+=	p5-Text-DelimMatch-[0-9]*:../../textproc/p5-Text-DelimMatch


DOCDIR=		${PREFIX}/share/doc/dtdparse
EGDIR=		${PREFIX}/share/examples/dtdparse
XMLDIR=		${PREFIX}/share/xml/dtdparse
XML_CATALOGS=	${XMLDIR}/catalog
SCRIPTS=	dtdflatten dtdformat dtdparse \
		tools/contentmodel tools/dtdstats tools/elements

INSTALLATION_DIRS=	bin

do-build:
	cd ${WRKSRC}; \
		${PERL5} -pi -e 's,/usr/local/bin/perl5,${PERL5},' ${SCRIPTS}
	${PERL5} -pi -e 's,modules/,XML/DTDParse/,' ${WRKSRC}/dtdformat

do-install:
	cd ${WRKSRC}; ${INSTALL_SCRIPT} ${SCRIPTS} ${PREFIX}/bin
	${MKDIR} ${PERL5_SITELIB}/XML/DTDParse
	${INSTALL_DATA} ${WRKSRC}/XML/DTDParse/*.pm ${WRKSRC}/modules/*.pl \
		${PERL5_SITELIB}/XML/DTDParse
	${MKDIR} ${XMLDIR}
	${INSTALL_DATA} ${WRKSRC}/dtd.dtd ${XMLDIR}
	${INSTALL_DATA} ${FILESDIR}/catalog ${XMLDIR}/catalog

post-install:
	${MKDIR} ${EGDIR}
	cd ${WRKSRC}/sample; \
		${INSTALL_DATA} sample* simple* ${EGDIR}
	${MKDIR} ${DOCDIR}
	cd ${WRKSRC}; ${INSTALL_DATA} README WhatsNew ${DOCDIR}

.include "../../lang/perl5/module.mk"
.include "../../textproc/xmlcatmgr/catalogs.mk"
.include "../../mk/bsd.pkg.mk"