Update to 2.0alpha1 release. [1]
Correctly support NOPORTDOCS. PR: 61254 [1] Submitted by: hrs Approved by: nork (mentor)
This commit is contained in:
parent
f36c521a00
commit
cfb3808ed9
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=98026
9 changed files with 139 additions and 98 deletions
|
@ -6,28 +6,57 @@
|
|||
#
|
||||
|
||||
PORTNAME= xmlcatmgr
|
||||
PORTVERSION= 1.2
|
||||
PORTVERSION= 2.0.a1
|
||||
CATEGORIES= textproc
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= ${PORTNAME}
|
||||
DISTNAME= ${PORTNAME}-${PORTVERSION:S/.a/alpha/}
|
||||
|
||||
MAINTAINER= hrs@FreeBSD.org
|
||||
COMMENT= SGML and XML catalog manager
|
||||
|
||||
BUILD_DEPENDS= buildtool:${PORTSDIR}/devel/buildtool
|
||||
|
||||
MAN1= xmlcatmgr.1
|
||||
|
||||
do-configure:
|
||||
cd ${WRKSRC} && buildtool config -p ${PREFIX} \
|
||||
--dir-catalog=${PREFIX}/share/xml \
|
||||
--dir-doc=${DOCSDIR}
|
||||
HAS_CONFIGURE= yes
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC} && buildtool build
|
||||
CONFIGURE_SCRIPT= configure.sh
|
||||
CONFIGURE_ARGS= -D
|
||||
CONFIGURE_ARGS+= -p ${PREFIX}
|
||||
CONFIGURE_ARGS+= -d ${DOCSDIR}
|
||||
CONFIGURE_ARGS+= -c ${CATALOG_PORTS_XML}
|
||||
CONFIGURE_ENV= SED="${SED}"
|
||||
CONFIGURE_ENV+= INSTALL_DATA="${INSTALL_DATA}"
|
||||
CONFIGURE_ENV+= INSTALL_DIR="${INSTALL_DATA_DIR}"
|
||||
CONFIGURE_ENV+= INSTALL_PROGRAM="${INSTALL_PROGRAM}"
|
||||
CONFIGURE_ENV+= NOPORTDOCS="${NOPORTDOCS}"
|
||||
|
||||
do-install:
|
||||
cd ${WRKSRC} && buildtool install
|
||||
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
||||
BUILD_WRKSRC= ${WRKSRC}/work
|
||||
INSTALL_WRKSRC= ${WRKSRC}/work
|
||||
|
||||
COMMONVARS= ${WRKDIR}/commonvars.sh
|
||||
XMLCATMGR?= ${PREFIX}/bin/xmlcatmgr
|
||||
CATALOG_MASTER_SGML?= ${PREFIX}/share/sgml/catalog
|
||||
CATALOG_PORTS_SGML?= ${PREFIX}/share/sgml/catalog.ports
|
||||
CATALOG_MASTER_XML?= ${PREFIX}/share/xml/catalog
|
||||
CATALOG_PORTS_XML?= ${PREFIX}/share/xml/catalog.ports
|
||||
|
||||
PKGINSTALL= ${WRKDIR}/pkg-install.sh
|
||||
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall.sh
|
||||
|
||||
post-build:
|
||||
${TOUCH} ${COMMONVARS}
|
||||
${ECHO} '#!/bin/sh' >> ${COMMONVARS}
|
||||
${ECHO} 'PATH=$${PATH}:/bin:/usr/bin:${LOCALBASE}/bin:${X11BASE}/bin' >> ${COMMONVARS}
|
||||
${ECHO} 'export PATH;' >> ${COMMONVARS}
|
||||
.for V in XMLCATMGR CATALOG_MASTER_SGML CATALOG_MASTER_XML CATALOG_PORTS_SGML CATALOG_PORTS_XML
|
||||
${ECHO} '${V}=${${V}}' >> ${COMMONVARS}
|
||||
.endfor
|
||||
${CAT} ${COMMONVARS} ${FILESDIR}/pkg-install.in > ${PKGINSTALL}
|
||||
${CAT} ${COMMONVARS} ${FILESDIR}/pkg-deinstall.in > ${PKGDEINSTALL}
|
||||
${CHMOD} 0555 ${PKGINSTALL} ${PKGDEINSTALL}
|
||||
|
||||
post-install:
|
||||
@${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1 +1 @@
|
|||
MD5 (xmlcatmgr-1.2.tar.gz) = 1a1b0f869d7a45b93c8270e88fd93550
|
||||
MD5 (xmlcatmgr-2.0alpha1.tar.gz) = a0b81617f6a979b00871df13ee6a9704
|
||||
|
|
22
textproc/xmlcatmgr/files/patch-configure.sh
Normal file
22
textproc/xmlcatmgr/files/patch-configure.sh
Normal file
|
@ -0,0 +1,22 @@
|
|||
--- configure.sh.orig Tue Dec 23 11:27:37 2003
|
||||
+++ configure.sh Mon Jan 12 17:37:47 2004
|
||||
@@ -462,16 +462,18 @@
|
||||
install: all
|
||||
EOF
|
||||
|
||||
-install_dir ${DIR_DOC} >> ${mkfile}
|
||||
install_dir ${DIR_EXEC} >> ${mkfile}
|
||||
install_dir ${DIR_MAN}/man1 >> ${mkfile}
|
||||
install_program xmlcatmgr ${DIR_EXEC}/xmlcatmgr >> ${mkfile}
|
||||
install_data xmlcatmgr.1 ${DIR_MAN}/man1/xmlcatmgr.1 >> ${mkfile}
|
||||
+if [ ! ${NOPORTDOCS} ]; then
|
||||
+install_dir ${DIR_DOC} >> ${mkfile}
|
||||
install_data ${TOPDIR}/CHANGES ${DIR_DOC}/CHANGES >> ${mkfile}
|
||||
install_data ${TOPDIR}/COPYING ${DIR_DOC}/COPYING >> ${mkfile}
|
||||
install_data ${TOPDIR}/PEOPLE ${DIR_DOC}/PEOPLE >> ${mkfile}
|
||||
install_data ${TOPDIR}/README ${DIR_DOC}/README >> ${mkfile}
|
||||
install_data ${TOPDIR}/TODO ${DIR_DOC}/TODO >> ${mkfile}
|
||||
+fi
|
||||
|
||||
echo "# End of generated Makefile." >> ${mkfile}
|
||||
|
32
textproc/xmlcatmgr/files/pkg-deinstall.in
Normal file
32
textproc/xmlcatmgr/files/pkg-deinstall.in
Normal file
|
@ -0,0 +1,32 @@
|
|||
# $FreeBSD$
|
||||
|
||||
case $2 in
|
||||
DEINSTALL)
|
||||
|
||||
T=/tmp/catalog.$$
|
||||
|
||||
${XMLCATMGR} -sc ${CATALOG_MASTER_SGML} remove catalog.ports
|
||||
${XMLCATMGR} -sc ${T} create
|
||||
if cmp -s ${T} ${CATALOG_MASTER_SGML} ]; then
|
||||
echo " + Removing ${CATALOG_MASTER_SGML}. It is empty."
|
||||
rm -f ${CATALOG_MASTER_SGML}
|
||||
fi
|
||||
if cmp -s ${T} ${CATALOG_PORTS_SGML} ]; then
|
||||
echo " + Removing ${CATALOG_PORTS_SGML}. It is empty."
|
||||
rm -f ${CATALOG_PORTS_SGML}
|
||||
fi
|
||||
rm -f ${T}
|
||||
|
||||
${XMLCATMGR} -c ${CATALOG_MASTER_XML} remove ${CATALOG_PORTS_XML}
|
||||
${XMLCATMGR} -c ${T} create
|
||||
if cmp -s ${T} ${CATALOG_MASTER_XML} ]; then
|
||||
echo " + Removing ${CATALOG_MASTER_XML}. It is empty."
|
||||
rm -f ${CATALOG_MASTER_XML}
|
||||
fi
|
||||
if cmp -s ${T} ${CATALOG_PORTS_XML} ]; then
|
||||
echo " + Removing ${CATALOG_PORTS_XML}. It is empty."
|
||||
rm -f ${CATALOG_PORTS_XML}
|
||||
fi
|
||||
rm -f ${T}
|
||||
;;
|
||||
esac
|
36
textproc/xmlcatmgr/files/pkg-install.in
Normal file
36
textproc/xmlcatmgr/files/pkg-install.in
Normal file
|
@ -0,0 +1,36 @@
|
|||
# $FreeBSD$
|
||||
|
||||
case $2 in
|
||||
POST-INSTALL)
|
||||
|
||||
if [ ! -r ${CATALOG_MASTER_SGML} ]; then
|
||||
echo " + Creating ${CATALOG_MASTER_SGML}"
|
||||
${XMLCATMGR} -sc ${CATALOG_MASTER_SGML} create
|
||||
fi
|
||||
|
||||
if ! ${XMLCATMGR} -sc ${CATALOG_MASTER_SGML} lookup catalog.ports > /dev/null 2>&1; then
|
||||
echo " + Registering CATALOG catalog.ports (SGML)"
|
||||
${XMLCATMGR} -sc ${CATALOG_MASTER_SGML} add CATALOG catalog.ports
|
||||
fi
|
||||
|
||||
if [ ! -r ${CATALOG_PORTS_SGML} ]; then
|
||||
echo " + Creating ${CATALOG_PORTS_SGML}"
|
||||
${XMLCATMGR} -sc ${CATALOG_PORTS_SGML} create
|
||||
fi
|
||||
|
||||
if [ ! -r ${CATALOG_MASTER_XML} ]; then
|
||||
echo " + Creating ${CATALOG_MASTER_XML}"
|
||||
${XMLCATMGR} -c ${CATALOG_MASTER_XML} create
|
||||
fi
|
||||
|
||||
if ! ${XMLCATMGR} -c ${CATALOG_MASTER_XML} lookup ${CATALOG_PORTS_XML} > /dev/null 2>&1 ; then
|
||||
echo " + Registering nextCatalog catalog.ports (XML)"
|
||||
${XMLCATMGR} -c ${CATALOG_MASTER_XML} add nextCatalog ${CATALOG_PORTS_XML}
|
||||
fi
|
||||
|
||||
if [ ! -r ${CATALOG_PORTS_XML} ]; then
|
||||
echo " + Creating ${CATALOG_PORTS_XML}"
|
||||
${XMLCATMGR} -c ${CATALOG_PORTS_XML} create
|
||||
fi
|
||||
;;
|
||||
esac
|
|
@ -1,36 +0,0 @@
|
|||
#!/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
|
|
@ -1,11 +1,7 @@
|
|||
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.
|
||||
XML Catalog Manager (xmlcatmgr in its short form) is a small utility
|
||||
used to manipulate SGML and XML catalogs. It is extremely small and
|
||||
lightweight, requiring no more dependancies than an awk and a shell
|
||||
interpreter. Basically, it allows adding and removing entries from
|
||||
catalogs, in a completely automated way.
|
||||
|
||||
WWW: http://xmlcatmgr.sourceforge.net/
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
#!/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
|
|
@ -4,4 +4,5 @@ bin/xmlcatmgr
|
|||
%%PORTDOCS%%%%DOCSDIR%%/COPYING
|
||||
%%PORTDOCS%%%%DOCSDIR%%/PEOPLE
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README
|
||||
@dirrm %%PORTDOCS%%%%DOCSDIR%%
|
||||
%%PORTDOCS%%%%DOCSDIR%%/TODO
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
||||
|
|
Loading…
Reference in a new issue