diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2003-07-08 09:46:29 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2003-07-08 09:46:29 +0000 |
commit | 86e5aef105930a094b3cec4c8bd369db0376269c (patch) | |
tree | 154d88249ccf90a010b822e1b2a0f848e3f3d993 /textproc | |
parent | a8103b22851217aaaa5164c51f02831507a983f4 (diff) | |
download | ports-86e5aef105930a094b3cec4c8bd369db0376269c.tar.gz ports-86e5aef105930a094b3cec4c8bd369db0376269c.zip |
Notes
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/docbook-xsl/Makefile | 24 | ||||
-rw-r--r-- | textproc/docbook-xsl/files/pkg-deinstall.in | 12 | ||||
-rw-r--r-- | textproc/docbook-xsl/files/pkg-install.in | 43 | ||||
-rw-r--r-- | textproc/docbook-xsl/pkg-plist | 1 |
4 files changed, 76 insertions, 4 deletions
diff --git a/textproc/docbook-xsl/Makefile b/textproc/docbook-xsl/Makefile index fe66a1f7e1a7..b10b8f4eb454 100644 --- a/textproc/docbook-xsl/Makefile +++ b/textproc/docbook-xsl/Makefile @@ -7,6 +7,7 @@ PORTNAME= docbook-xsl PORTVERSION= 1.61.3 +PORTREVISION= 1 CATEGORIES= textproc MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= docbook @@ -14,15 +15,20 @@ MASTER_SITE_SUBDIR= docbook MAINTAINER= des@freebsd.org COMMENT= XSL DocBook stylesheets -RUN_DEPENDS= ${XMLDIR}/docbook/catalog:${PORTSDIR}/textproc/docbook-xml \ +RUN_DEPENDS= ${XMLDIR}/docbook/4.2/catalog.xml:${PORTSDIR}/textproc/docbook-xml \ ${XMLDIR}/sdocbook/catalog:${PORTSDIR}/textproc/sdocbook-xml XMLDIR= ${LOCALBASE}/share/xml -INSTDIR= ${PREFIX}/share/xsl/docbook +INSTDIR= share/xsl/docbook +PINSTDIR= ${PREFIX}/${INSTDIR} COPYDIRS= common fo extensions html htmlhelp images \ javahelp lib manpages params template xhtml +PKGINSTALL= ${WRKSRC}/pkg-install +PKGDEINSTALL= ${WRKSRC}/pkg-deinstall NO_BUILD= yes +XMLCATMGR= ${LOCALBASE}/bin/xmlcatmgr +CATALOG_PORTS= ${XMLDIR}/catalog.ports post-extract: ${FIND} ${WRKSRC} -name '.#*' -delete @@ -33,8 +39,18 @@ do-install: (cd ${WRKSRC}/doc && ${TAR} -cf - . |\ ${TAR} -xf - -C${DOCSDIR}) .endif - ${MKDIR} ${INSTDIR} + ${MKDIR} ${PINSTDIR} (cd ${WRKSRC} && ${TAR} -cf - VERSION ${COPYDIRS} |\ - ${TAR} -xf - -C${INSTDIR}) + ${TAR} -xf - -C${PINSTDIR}) + +post-install: + @${SED} -e 's,@INSTDIR@,${INSTDIR},g ; \ + s,@XMLCATMGR@,${XMLCATMGR},g ; \ + s,@CATALOG_PORTS_XML@,${CATALOG_PORTS},g' \ + < ${FILESDIR}/pkg-install.in > ${PKGINSTALL} + @${SED} -e 's,@XMLCATMGR@,${XMLCATMGR},g ; \ + s,@CATALOG_PORTS_XML@,${CATALOG_PORTS},g' \ + < ${FILESDIR}/pkg-deinstall.in > ${PKGDEINSTALL} + @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .include <bsd.port.mk> diff --git a/textproc/docbook-xsl/files/pkg-deinstall.in b/textproc/docbook-xsl/files/pkg-deinstall.in new file mode 100644 index 000000000000..0ae6bfa3379c --- /dev/null +++ b/textproc/docbook-xsl/files/pkg-deinstall.in @@ -0,0 +1,12 @@ +#!/bin/sh +# This script will remove the docbook-xsl entries added to xml catalog. +# -- Rui Lopes <rui@ruilopes.com> + +XMLCATMGR=@XMLCATMGR@ +CATALOG_PORTS_XML=@CATALOG_PORTS_XML@ + +if [ "$2" != "POST-DEINSTALL" ]; then + exit 0 +fi + +${XMLCATMGR} -c "${CATALOG_PORTS_XML}" remove http://docbook.sourceforge.net/release/xsl/ diff --git a/textproc/docbook-xsl/files/pkg-install.in b/textproc/docbook-xsl/files/pkg-install.in new file mode 100644 index 000000000000..a26b25a8b2f1 --- /dev/null +++ b/textproc/docbook-xsl/files/pkg-install.in @@ -0,0 +1,43 @@ +#!/bin/sh +# This script will create the docbook-xsl catalog and will add entries to xml catalog. +# WARNING: If you change this script, be sure to check pkg-deinstall.in! +# +# Based on http://xmlsoft.org/buildDocBookCatalog file. +# +# in vi/vim grab VERSIONS string with command: +# !!echo -n "VERSIONS='current ";fetch -qo - http://cvs.sf.net/cgi-bin/viewcvs.cgi/docbook/xsl/VERSION|sed -nE 's/.*Version (.*) released./\1/gp'|sort|sed -e '1,3d'|paste -sd ' ' -|tr \\n \' +# +# -- Rui Lopes <rui@ruilopes.com> + +XMLCATMGR=@XMLCATMGR@ +CATALOG_PORTS_XML=@CATALOG_PORTS_XML@ +XSL_DIR=${PKG_PREFIX}/@INSTDIR@ +CATALOG_XSL=${XSL_DIR}/catalog + +if [ "$2" != "POST-INSTALL" ]; then + exit 0 +fi + +VERSIONS='current 1.39 1.40 1.41 1.42 1.43 1.44 1.45 1.46 1.47 1.48 1.49 1.50.0 1.50.1-EXP 1.50.1-EXP2 1.51.0 1.51.1 1.52.0 1.52.1 1.52.2 1.53.0 1.54.0 1.54.1 1.55.0 1.56.0 1.56.1 1.57.0 1.58.0 1.58.1 1.59.0 1.59.1 1.59.2 1.60.0 1.60.1 1.60.1 1.61.0 1.61.1 1.61.2 1.61.3' + +if [ ! -f ${CATALOG_XSL} ]; then + ${XMLCATMGR} -c "${CATALOG_XSL}" create +fi + +for version in ${VERSIONS} +do + ${XMLCATMGR} -c "${CATALOG_XSL}" add rewriteSystem \ + http://docbook.sourceforge.net/release/xsl/$version \ + "file://${XSL_DIR}" + ${XMLCATMGR} -c "${CATALOG_XSL}" add rewriteURI \ + http://docbook.sourceforge.net/release/xsl/$version \ + "file://${XSL_DIR}" +done + +${XMLCATMGR} -c "${CATALOG_PORTS_XML}" add delegateSystem \ + http://docbook.sourceforge.net/release/xsl/ \ + "file://${CATALOG_XSL}" +${XMLCATMGR} -c "${CATALOG_PORTS_XML}" add delegateURI \ + http://docbook.sourceforge.net/release/xsl/ \ + "file://${CATALOG_XSL}" + diff --git a/textproc/docbook-xsl/pkg-plist b/textproc/docbook-xsl/pkg-plist index 36481714f924..4681084411f0 100644 --- a/textproc/docbook-xsl/pkg-plist +++ b/textproc/docbook-xsl/pkg-plist @@ -1328,6 +1328,7 @@ share/xsl/docbook/xhtml/titlepage.xsl share/xsl/docbook/xhtml/toc.xsl share/xsl/docbook/xhtml/verbatim.xsl share/xsl/docbook/xhtml/xref.xsl +@unexec rm -f %D/share/xsl/docbook/catalog @dirrm share/xsl/docbook/xhtml @dirrm share/xsl/docbook/template @dirrm share/xsl/docbook/params |