2008-07-23 00:37:20 +02:00
|
|
|
# New ports collection makefile for: docbook-450
|
|
|
|
# Date created: 14 Jul 2008
|
|
|
|
# Whom: Gabor Kovesdan <gabor@kovesdan.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= docbook
|
|
|
|
PORTVERSION= 5.0
|
2008-08-08 00:23:54 +02:00
|
|
|
PORTREVISION= 1
|
2008-07-23 00:37:20 +02:00
|
|
|
CATEGORIES= textproc
|
|
|
|
MASTER_SITES= http://www.docbook.org/xml/5.0/
|
|
|
|
|
|
|
|
MAINTAINER= gabor@FreeBSD.org
|
|
|
|
COMMENT= DocBook 5.0, designed for technical documentation
|
|
|
|
|
2008-08-08 00:23:54 +02:00
|
|
|
RUN_DEPENDS= ${XMLCATMGR}:${PORTSDIR}/textproc/xmlcatmgr
|
2008-07-23 00:37:20 +02:00
|
|
|
|
|
|
|
USE_ZIP= yes
|
|
|
|
NO_BUILD= yes
|
|
|
|
LATEST_LINK= ${PORTNAME}-500
|
|
|
|
|
|
|
|
DOCBOOKDIR= share/xml/${PORTNAME}/${PORTVERSION}
|
|
|
|
DOCSDIR= ${PREFIX}/${DOCBOOKDIR}/docs
|
|
|
|
|
2008-08-08 00:23:54 +02:00
|
|
|
PLIST_SUB+= XMLCAT_ADD="${XMLCAT_ADD}" \
|
|
|
|
XMLCAT_RM="${XMLCAT_RM}"
|
|
|
|
|
2008-07-23 00:37:20 +02:00
|
|
|
XMLCATMGR= ${LOCALBASE}/bin/xmlcatmgr
|
2008-08-08 00:23:54 +02:00
|
|
|
XMLCAT= ${PREFIX}/share/xml/catalog.ports
|
|
|
|
|
|
|
|
XMLCAT_ADD= ${XMLCATMGR} -c ${XMLCAT} add nextCatalog \
|
|
|
|
${PREFIX}/${DOCBOOKDIR}/catalog.xml
|
|
|
|
XMLCAT_RM= ${XMLCATMGR} -c ${XMLCAT} remove \
|
|
|
|
${PREFIX}/${DOCBOOKDIR}/catalog.xml
|
2008-07-23 00:37:20 +02:00
|
|
|
|
|
|
|
OPTIONS= DTD "XML DTD" on \
|
|
|
|
SCHEMA "W3C XML Schema" on \
|
|
|
|
RELAX_NG "RELAX NG Schema" on \
|
|
|
|
SCHEMATRON "Schematron constraints" on \
|
|
|
|
NVDL "NVDL description" on \
|
2008-08-08 00:23:54 +02:00
|
|
|
TOOLS "Tools for working with DocBook" on \
|
|
|
|
XMLCHARENT "Install ISO 8879 XML entites" on
|
2008-07-23 00:37:20 +02:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if defined(WITH_DTD)
|
|
|
|
PLIST_SUB+= DTD=""
|
2008-08-08 00:23:54 +02:00
|
|
|
MODULES+= dtd
|
2008-07-23 00:37:20 +02:00
|
|
|
.else
|
|
|
|
PLIST_SUB+= DTD="@comment "
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_SCHEMA)
|
|
|
|
PLIST_SUB+= SCHEMA=""
|
2008-08-08 00:23:54 +02:00
|
|
|
MODULES+= xsd
|
2008-07-23 00:37:20 +02:00
|
|
|
.else
|
|
|
|
PLIST_SUB+= SCHEMA="@comment "
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_RELAX_NG)
|
|
|
|
PLIST_SUB+= RELAXNG=""
|
2008-08-08 00:23:54 +02:00
|
|
|
MODULES+= rng
|
2008-07-23 00:37:20 +02:00
|
|
|
.else
|
|
|
|
PLIST_SUB+= RELAXNG="@comment "
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_SCHEMATRON)
|
|
|
|
PLIST_SUB+= SCHEMATRON=""
|
2008-08-08 00:23:54 +02:00
|
|
|
MODULES+= sch
|
2008-07-23 00:37:20 +02:00
|
|
|
.else
|
|
|
|
PLIST_SUB+= SCHEMATRON="@comment "
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_NVDL)
|
|
|
|
PLIST_SUB+= NVDL=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= NVDL="@comment "
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_TOOLS)
|
|
|
|
PLIST_SUB+= TOOLS=""
|
2008-08-08 00:23:54 +02:00
|
|
|
MODULES+= tools
|
2008-07-23 00:37:20 +02:00
|
|
|
.else
|
|
|
|
PLIST_SUB+= TOOLS="@comment "
|
|
|
|
.endif
|
2008-08-08 00:23:54 +02:00
|
|
|
.if defined(WITH_XMLCHARENT)
|
|
|
|
RUN_DEPENDS+= ${LOCALBASE}/share/xml/xmlcharent/catalog:${PORTSDIR}/textproc/xmlcharent
|
2008-07-23 00:37:20 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
${MKDIR} ${PREFIX}/${DOCBOOKDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/catalog.xml ${PREFIX}/${DOCBOOKDIR}
|
2008-08-08 00:23:54 +02:00
|
|
|
.for m in ${MODULES}
|
|
|
|
${MKDIR} ${PREFIX}/${DOCBOOKDIR}/${m}
|
|
|
|
files=$$(${FIND} ${WRKSRC}/${m} -type f); \
|
|
|
|
for i in $${files}; do \
|
|
|
|
${INSTALL_DATA} $${i} ${PREFIX}/${DOCBOOKDIR}/${m}; \
|
|
|
|
done
|
2008-07-23 00:37:20 +02:00
|
|
|
.endfor
|
|
|
|
.if defined(WITH_NVDL)
|
|
|
|
${MKDIR} ${PREFIX}/${DOCBOOKDIR}/nvdl
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/docbook.nvdl ${PREFIX}/${DOCBOOKDIR}/nvdl
|
|
|
|
.endif
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
${MKDIR} ${DOCSDIR}
|
2010-07-17 07:54:14 +02:00
|
|
|
files1=$$(${FIND} ${WRKSRC} -type f -depth 1| ${GREP} -v -e '.xml$$' -e '.nvdl$$'); \
|
2008-08-08 00:23:54 +02:00
|
|
|
files2=$$(${FIND} ${WRKSRC}/docs -type f -depth 1); \
|
|
|
|
for i in $${files1} $${files2}; do \
|
|
|
|
${INSTALL_DATA} $${i} ${DOCSDIR}; \
|
|
|
|
done
|
2008-07-23 00:37:20 +02:00
|
|
|
${MKDIR} ${DOCSDIR}/images
|
2008-08-08 00:23:54 +02:00
|
|
|
files=$$(${FIND} ${WRKSRC}/docs/images -type f); \
|
|
|
|
for i in $${files}; do \
|
|
|
|
${INSTALL_DATA} $${i} ${DOCSDIR}/images; \
|
|
|
|
done
|
2008-07-23 00:37:20 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
post-install:
|
2008-08-08 00:23:54 +02:00
|
|
|
-${XMLCAT_ADD}
|
2008-07-23 00:37:20 +02:00
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|