From 5c277b63b64310e2bff0318a022b7a220ae3a603 Mon Sep 17 00:00:00 2001 From: kuriyama Date: Mon, 30 Jun 2003 13:32:18 +0000 Subject: Add xmlcatmgr 0.2, SGML/XML catalog manager. PR: ports/53818 Submitted by: Hiroki Sato --- textproc/Makefile | 1 + textproc/xmlcatmgr/Makefile | 38 ++++++++++++++++++++++++++++++++++++++ textproc/xmlcatmgr/distinfo | 1 + textproc/xmlcatmgr/pkg-deinstall | 36 ++++++++++++++++++++++++++++++++++++ textproc/xmlcatmgr/pkg-descr | 11 +++++++++++ textproc/xmlcatmgr/pkg-install | 39 +++++++++++++++++++++++++++++++++++++++ textproc/xmlcatmgr/pkg-message | 21 +++++++++++++++++++++ textproc/xmlcatmgr/pkg-plist | 2 ++ 8 files changed, 149 insertions(+) create mode 100644 textproc/xmlcatmgr/Makefile create mode 100644 textproc/xmlcatmgr/distinfo create mode 100644 textproc/xmlcatmgr/pkg-deinstall create mode 100644 textproc/xmlcatmgr/pkg-descr create mode 100644 textproc/xmlcatmgr/pkg-install create mode 100644 textproc/xmlcatmgr/pkg-message create mode 100644 textproc/xmlcatmgr/pkg-plist (limited to 'textproc') diff --git a/textproc/Makefile b/textproc/Makefile index ce5d8cf32214..1643e857fbf7 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -446,6 +446,7 @@ SUBDIR += xml2rfc SUBDIR += xml4j SUBDIR += xmlada + SUBDIR += xmlcatmgr SUBDIR += xmlcharent SUBDIR += xmlenc SUBDIR += xmlindent diff --git a/textproc/xmlcatmgr/Makefile b/textproc/xmlcatmgr/Makefile new file mode 100644 index 000000000000..45dd9dee92d8 --- /dev/null +++ b/textproc/xmlcatmgr/Makefile @@ -0,0 +1,38 @@ +# Ports collection makefile for: xmlcatmgr +# Date created: Sat May 24, 2003 +# Whom: Hiroki Sato +# +# $FreeBSD$ +# + +PORTNAME= xmlcatmgr +PORTVERSION= 0.2 +CATEGORIES= textproc +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= ${PORTNAME:L} + +MAINTAINER= hrs@FreeBSD.org +COMMENT= SGML/XML catalog manager + +MAN1= xmlcatmgr.1 + +CATALOG_MASTER_SGML_DIR?= ${PREFIX}/share/sgml +CATALOG_MASTER_SGML?= ${CATALOG_MASTER_SGML_DIR}/catalog +CATALOG_PORTS_SGML?= ${CATALOG_MASTER_SGML_DIR}/catalog.ports +CATALOG_MASTER_XML_DIR?= ${PREFIX}/share/xml +CATALOG_MASTER_XML?= ${CATALOG_MASTER_XML_DIR}/catalog +CATALOG_PORTS_XML?= ${CATALOG_MASTER_XML_DIR}/catalog.ports + +MAKEFILE= Makefile.boot +MAKE_ENV+= BT_PREFIX="${PREFIX}" +MAKE_ENV+= BT_PROG_AWK="${AWK}" +MAKE_ENV+= BT_PROG_SH="${SH}" +MAKE_ENV+= BT_DIR_CATALOG="${CATALOG_MASTER_XML_DIR}" +MAKE_ENV+= BT_INSTALL_DIR="${MKDIR}" +MAKE_ENV+= BT_INSTALL_BIN="${INSTALL_SCRIPT}" +MAKE_ENV+= BT_INSTALL_DATA="${INSTALL_DATA}" + +post-install: + @${ENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + +.include diff --git a/textproc/xmlcatmgr/distinfo b/textproc/xmlcatmgr/distinfo new file mode 100644 index 000000000000..14e6e0b9da85 --- /dev/null +++ b/textproc/xmlcatmgr/distinfo @@ -0,0 +1 @@ +MD5 (xmlcatmgr-0.2.tar.gz) = cac49c33adf3d70ae5626cfe58d0aa6e diff --git a/textproc/xmlcatmgr/pkg-deinstall b/textproc/xmlcatmgr/pkg-deinstall new file mode 100644 index 000000000000..a33246f147d7 --- /dev/null +++ b/textproc/xmlcatmgr/pkg-deinstall @@ -0,0 +1,36 @@ +#!/bin/sh +# $FreeBSD$ + +PATH=${PATH}:/bin:/usr/bin:${LOCALBASE}/bin:${X11BASE}/bin +export PATH + +CATALOG_MASTER_SGML=${PKG_PREFIX}/share/sgml/catalog +CATALOG_MASTER_XML=${PKG_PREFIX}/share/xml/catalog +CATALOG_PORTS_SGML=${PKG_PREFIX}/share/sgml/catalog.ports +CATALOG_PORTS_XML=${PKG_PREFIX}/share/xml/catalog.ports + +XMLCATMGR=${PKG_PREFIX}/bin/xmlcatmgr + +case $2 in +DEINSTALL) + +${XMLCATMGR} -sc ${CATALOG_MASTER_SGML} remove catalog.ports +if [ ! -s ${CATALOG_MASTER_SGML} ]; then + rm -f ${CATALOG_MASTER_SGML} +fi +if [ ! -s ${CATALOG_PORTS_SGML} ]; then + rm -f ${CATALOG_PORTS_SGML} +fi + +T=`mktemp /tmp/_catalog_xml.XXXXXX` +${XMLCATMGR} -c ${CATALOG_MASTER_XML} remove ${CATALOG_PORTS_XML} +${XMLCATMGR} -c /dev/stdout create > ${T} +if cmp -s ${T} ${CATALOG_MASTER_XML} ]; then + rm -f ${CATALOG_MASTER_XML} +fi +if cmp -s ${T} ${CATALOG_PORTS_XML} ]; then + rm -f ${CATALOG_PORTS_XML} +fi +rm -f ${T} +;; +esac diff --git a/textproc/xmlcatmgr/pkg-descr b/textproc/xmlcatmgr/pkg-descr new file mode 100644 index 000000000000..4f18dd82fde7 --- /dev/null +++ b/textproc/xmlcatmgr/pkg-descr @@ -0,0 +1,11 @@ +xmlcatmgr is a command line script used to manipulate SGML and XML catalogs. +It is designed with simplicity in mind: it does not depend on external +programs nor libraries, so it is ideal to manage catalog files from inside +pkgsrc. It is also useful to handle shared directories like share/sgml and +share/xml. + +XML catalogs are files that contain mappings from public identifiers to +system identifiers. This allows XML parsers to locate public identifiers +in the local system. + +WWW: http://xmlcatmgr.sourceforge.net/ diff --git a/textproc/xmlcatmgr/pkg-install b/textproc/xmlcatmgr/pkg-install new file mode 100644 index 000000000000..a0ca1c47208a --- /dev/null +++ b/textproc/xmlcatmgr/pkg-install @@ -0,0 +1,39 @@ +#!/bin/sh +# $FreeBSD$ + +PATH=${PATH}:/bin:/usr/bin:${LOCALBASE}/bin:${X11BASE}/bin +export PATH + +CATALOG_MASTER_SGML=${PKG_PREFIX}/share/sgml/catalog +CATALOG_MASTER_XML=${PKG_PREFIX}/share/xml/catalog +CATALOG_PORTS_SGML=${PKG_PREFIX}/share/sgml/catalog.ports +CATALOG_PORTS_XML=${PKG_PREFIX}/share/xml/catalog.ports + +XMLCATMGR=${PKG_PREFIX}/bin/xmlcatmgr + +case $2 in +POST-INSTALL) + +if [ ! -r ${CATALOG_MASTER_SGML} ]; then + ${XMLCATMGR} -sc ${CATALOG_MASTER_SGML} create +fi + +${XMLCATMGR} -sc ${CATALOG_MASTER_SGML} remove catalog.ports +${XMLCATMGR} -sc ${CATALOG_MASTER_SGML} add CATALOG catalog.ports + +if [ ! -r ${CATALOG_PORTS_SGML} ]; then + ${XMLCATMGR} -sc ${CATALOG_PORTS_SGML} create +fi + +if [ ! -r ${CATALOG_MASTER_XML} ]; then + ${XMLCATMGR} -c ${CATALOG_MASTER_XML} create +fi + +${XMLCATMGR} -c ${CATALOG_MASTER_XML} remove ${CATALOG_PORTS_XML} +${XMLCATMGR} -c ${CATALOG_MASTER_XML} add nextCatalog ${CATALOG_PORTS_XML} + +if [ ! -r ${CATALOG_PORTS_XML} ]; then + ${XMLCATMGR} -c ${CATALOG_PORTS_XML} create +fi +;; +esac diff --git a/textproc/xmlcatmgr/pkg-message b/textproc/xmlcatmgr/pkg-message new file mode 100644 index 000000000000..860601ca29bb --- /dev/null +++ b/textproc/xmlcatmgr/pkg-message @@ -0,0 +1,21 @@ +The following catalogs are installed: + + 1) ${PREFIX}/share/sgml/catalog + + The top level catalog for SGML stuff. It is not changed + by any ports/packages except textproc/xmlcatmgr. + + 2) ${PREFIX}/share/sgml/catalog.ports + + This catalog is for handling SGML stuff installed under + ${PREFIX}/share/sgml. It is changed by ports/packages. + + 3) ${PREFIX}/share/xml/catalog + + The top level catalog for XML stuff. It is not changed + by any ports/packages except textproc/xmlcatmgr. + + 4) ${PREFIX}/share/xml/catalog.ports + + This catalog is for handling XML stuff installed under + ${PREFIX}/share/xml. It is changed by ports/packages. diff --git a/textproc/xmlcatmgr/pkg-plist b/textproc/xmlcatmgr/pkg-plist new file mode 100644 index 000000000000..104a4c67707c --- /dev/null +++ b/textproc/xmlcatmgr/pkg-plist @@ -0,0 +1,2 @@ +@comment $FreeBSD$ +bin/xmlcatmgr -- cgit