2012-11-02 19:45:31 +01:00
|
|
|
# Created by: nectar@FreeBSD.org
|
2004-02-12 15:23:48 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= vuxml
|
2004-04-03 01:31:03 +02:00
|
|
|
PORTVERSION= 1.1
|
2014-05-17 19:58:38 +02:00
|
|
|
PORTREVISION= 2
|
2004-02-12 15:23:48 +01:00
|
|
|
CATEGORIES= security textproc
|
|
|
|
MASTER_SITES= http://www.vuxml.org/dtd/vuxml-1/
|
2004-04-03 01:31:03 +02:00
|
|
|
DISTFILES= vuxml-10.dtd vuxml-model-10.mod \
|
|
|
|
vuxml-11.dtd vuxml-model-11.mod \
|
2004-08-25 17:36:09 +02:00
|
|
|
xml1.dcl catalog catalog.xml
|
2004-04-03 01:31:03 +02:00
|
|
|
DIST_SUBDIR= vuxml
|
2004-02-12 15:23:48 +01:00
|
|
|
|
2013-11-12 14:09:18 +01:00
|
|
|
MAINTAINER= ports-secteam@FreeBSD.org
|
2004-02-12 15:23:48 +01:00
|
|
|
COMMENT= Vulnerability and eXposure Markup Language DTD
|
|
|
|
|
2014-05-17 19:58:38 +02:00
|
|
|
LICENSE= BSD2CLAUSE
|
|
|
|
|
2004-02-12 15:23:48 +01:00
|
|
|
RUN_DEPENDS= ${XMLCATMGR}:${PORTSDIR}/textproc/xmlcatmgr \
|
|
|
|
${LOCALBASE}/share/xml/dtd/xhtml-modularization/VERSION:${PORTSDIR}/textproc/xhtml-modularization \
|
|
|
|
${LOCALBASE}/share/xml/dtd/xhtml-basic/xhtml-basic10.dtd:${PORTSDIR}/textproc/xhtml-basic
|
|
|
|
|
2014-10-09 15:17:26 +02:00
|
|
|
USES= python:run
|
2013-06-19 23:20:50 +02:00
|
|
|
|
2015-10-19 22:22:29 +02:00
|
|
|
NO_MTREE= yes
|
|
|
|
NO_ARCH= yes
|
|
|
|
NO_BUILD= yes
|
2004-02-12 15:23:48 +01:00
|
|
|
WRKSRC= ${WRKDIR}
|
2014-05-17 19:58:38 +02:00
|
|
|
PLIST_SUB= XMLCAT_RM="${XMLCAT_RM}" XMLCAT_ADD="${XMLCAT_ADD}" \
|
|
|
|
SGMLCAT_RM="${SGMLCAT_RM}" SGMLCAT_ADD="${SGMLCAT_ADD}" \
|
|
|
|
dir_DTD="${dir_DTD}"
|
2004-02-12 15:23:48 +01:00
|
|
|
|
|
|
|
dir_DTD= share/xml/dtd/vuxml
|
|
|
|
|
|
|
|
XMLCATMGR= ${LOCALBASE}/bin/xmlcatmgr
|
|
|
|
SGMLCAT= ${PREFIX}/share/sgml/catalog.ports
|
|
|
|
XMLCAT= ${PREFIX}/share/xml/catalog.ports
|
|
|
|
|
|
|
|
XMLCAT_ADD= ${XMLCATMGR} -c ${XMLCAT} add nextCatalog \
|
|
|
|
${PREFIX}/${dir_DTD}/catalog.xml
|
|
|
|
XMLCAT_RM= ${XMLCATMGR} -c ${XMLCAT} remove nextCatalog \
|
|
|
|
${PREFIX}/${dir_DTD}/catalog.xml
|
|
|
|
SGMLCAT_ADD= ${XMLCATMGR} -sc ${SGMLCAT} add CATALOG \
|
2004-04-03 01:31:03 +02:00
|
|
|
${PREFIX}/${dir_DTD}/catalog
|
2004-02-12 15:23:48 +01:00
|
|
|
SGMLCAT_RM= ${XMLCATMGR} -sc ${SGMLCAT} remove CATALOG \
|
2004-04-03 01:31:03 +02:00
|
|
|
${PREFIX}/${dir_DTD}/catalog
|
2004-02-12 15:23:48 +01:00
|
|
|
|
|
|
|
CATALOG_PORTS_SGML= ${PREFIX}/share/sgml/catalog.ports
|
|
|
|
CATALOG_PORTS_XML= ${PREFIX}/share/xml/catalog.ports
|
|
|
|
|
|
|
|
VUXML_FILE?= ${PKGDIR}/vuln.xml
|
|
|
|
|
|
|
|
do-extract:
|
|
|
|
@${RM} -rf ${WRKDIR}
|
|
|
|
@${MKDIR} ${WRKDIR}
|
|
|
|
.for f in ${DISTFILES}
|
|
|
|
${CP} ${_DISTDIR}/${f} ${WRKDIR}/${f}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
do-install:
|
2014-05-17 19:58:38 +02:00
|
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/${dir_DTD}
|
2004-02-12 15:23:48 +01:00
|
|
|
.for f in ${DISTFILES}
|
2014-05-17 19:58:38 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/${dir_DTD}/${f}
|
2004-02-12 15:23:48 +01:00
|
|
|
.endfor
|
|
|
|
|
2012-04-12 02:16:50 +02:00
|
|
|
validate: tidy
|
2004-02-25 18:03:18 +01:00
|
|
|
@${SH} ${FILESDIR}/validate.sh "${VUXML_FILE}"
|
2012-04-12 02:16:50 +02:00
|
|
|
@${ECHO_MSG} Checking if tidy differs...
|
|
|
|
@if ${DIFF} -u "${VUXML_FILE}" "${VUXML_FILE}.tidy"; \
|
|
|
|
then \
|
|
|
|
${ECHO_MSG} ... seems okay; \
|
2012-05-26 05:15:46 +02:00
|
|
|
${RM} "${VUXML_FILE}.tidy"; \
|
2012-04-12 02:16:50 +02:00
|
|
|
else \
|
|
|
|
return 1; \
|
|
|
|
fi
|
2013-03-27 00:25:19 +01:00
|
|
|
@${ECHO_MSG} Checking for space/tab...
|
2013-03-27 21:44:50 +01:00
|
|
|
@unexpand "${VUXML_FILE}" | ${SED} -E 's,[[:space:]]*$$,,g' > "${VUXML_FILE}.unexpanded"
|
2013-03-27 00:25:19 +01:00
|
|
|
@if ${DIFF} -u "${VUXML_FILE}" "${VUXML_FILE}.unexpanded"; \
|
|
|
|
then \
|
|
|
|
${ECHO_MSG} ... seems okay; \
|
|
|
|
${RM} "${VUXML_FILE}.unexpanded"; \
|
|
|
|
else \
|
|
|
|
${ECHO_MSG} ... see above; \
|
|
|
|
${ECHO_CMD} Consider using ${VUXML_FILE}.unexpanded for final commit; \
|
|
|
|
return 1; \
|
|
|
|
fi
|
2015-05-22 09:04:28 +02:00
|
|
|
${PYTHON_CMD} ${FILESDIR}/extra-validation.py ${VUXML_FILE}
|
2012-04-12 02:16:50 +02:00
|
|
|
|
|
|
|
tidy: vuln.xml
|
2012-09-07 23:34:03 +02:00
|
|
|
@if [ ! -e ${LOCALBASE}/share/xml/dtd/vuxml/catalog.xml ]; \
|
|
|
|
then \
|
|
|
|
echo "Please install the VuXML port prior to running make validate/tidy."; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
2009-08-07 18:25:52 +02:00
|
|
|
${SH} ${FILESDIR}/tidy.sh "${FILESDIR}/tidy.xsl" "${VUXML_FILE}" > "${VUXML_FILE}.tidy"
|
2004-03-30 08:16:21 +02:00
|
|
|
|
2005-11-29 09:46:13 +01:00
|
|
|
newentry:
|
|
|
|
@${SH} ${FILESDIR}/newentry.sh "${VUXML_FILE}"
|
2005-01-08 16:43:23 +01:00
|
|
|
|
2015-07-12 21:40:07 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if defined(VID) && !empty(VID)
|
|
|
|
html: work/${VID}.html
|
|
|
|
work/${VID}.html: ${FILESDIR}/html.xsl ${FILESDIR}/common.css ${VUXML_FILE}
|
|
|
|
${MKDIR} work
|
|
|
|
xsltproc --stringparam vid "${VID}" \
|
|
|
|
--output ${.TARGET} \
|
|
|
|
${FILESDIR}/html.xsl ${VUXML_FILE}
|
|
|
|
${INSTALL_DATA} ${FILESDIR}/common.css work
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|