diff --git a/templates/xmlcatmgr-runstuff-after-install.sh b/templates/xmlcatmgr-runstuff-after-install.sh new file mode 100644 index 00000000000..57458739dd0 --- /dev/null +++ b/templates/xmlcatmgr-runstuff-after-install.sh @@ -0,0 +1,23 @@ +# +# Install the XML/SGML catalog files. +# + +echo "=> Installing XML/SGML catalogs." + +$chmod_cmd 644 $wrksrc/catalog.* +[ ! -d $PKGFS_SYSCONFDIR/sgml ] && $mkdir_cmd $PKGFS_SYSCONFDIR/sgml +[ ! -d $PKGFS_DESTDIR/$pkgname-$version/share/sgml ] && \ + $mkdir_cmd $PKGFS_DESTDIR/$pkgname-$version/share/sgml +[ ! -d $PKGFS_SYSCONFDIR/xml ] && $mkdir_cmd $PKGFS_SYSCONFDIR/xml +[ ! -d $PKGFS_DESTDIR/$pkgname-$version/share/xml ] && \ + $mkdir_cmd $PKGFS_DESTDIR/$pkgname-$version/share/xml +[ ! -f $PKGFS_SYSCONFDIR/sgml/catalog ] && \ + $cp_cmd $wrksrc/catalog.etc.sgml $PKGFS_SYSCONFDIR/sgml/catalog +[ ! -f $PKGFS_SYSCONFDIR/xml/catalog ] && \ + $cp_cmd $wrksrc/catalog.etc.xml $PKGFS_SYSCONFDIR/xml/catalog +[ ! -f $PKGFS_DESTDIR/$pkgname-$version/share/sgml/catalog ] && \ + $cp_cmd $wrksrc/catalog.sgml \ + $PKGFS_DESTDIR/$pkgname-$version/share/sgml/catalog +[ ! -f $PKGFS_DESTDIR/$pkgname-$version/share/xml/catalog ] && \ + $cp_cmd $wrksrc/catalog.xml \ + $PKGFS_DESTDIR/$pkgname-$version/share/xml/catalog diff --git a/templates/xmlcatmgr-runstuff-before-install.sh b/templates/xmlcatmgr-runstuff-before-install.sh new file mode 100644 index 00000000000..e2c7208c0f4 --- /dev/null +++ b/templates/xmlcatmgr-runstuff-before-install.sh @@ -0,0 +1,14 @@ +# +# Create XML and SGML catalogs once built. +# + +echo "=> Creating SGML catalogs..." +$wrksrc/xmlcatmgr -sc $wrksrc/catalog.etc.sgml create +$wrksrc/xmlcatmgr -sc $wrksrc/catalog.sgml create +$wrksrc/xmlcatmgr -sc $wrksrc/catalog.etc.sgml add CATALOG \ + $PKGFS_MASTERDIR/share/sgml/catalog +echo "=> Creating XML catalogs..." +$wrksrc/xmlcatmgr -c $wrksrc/catalog.etc.xml create +$wrksrc/xmlcatmgr -c $wrksrc/catalog.xml create +$wrksrc/xmlcatmgr -c $wrksrc/catalog.etc.xml add nextCatalog \ + $PKGFS_MASTERDIR/share/xml/catalog diff --git a/templates/xmlcatmgr.tmpl b/templates/xmlcatmgr.tmpl new file mode 100755 index 00000000000..4a37ca2d7f4 --- /dev/null +++ b/templates/xmlcatmgr.tmpl @@ -0,0 +1,28 @@ +# Template build file for 'xmlcatmgr'. +pkgname=xmlcatmgr +version=2.2 +extract_sufx=".tar.gz" +url=http://kent.dl.sourceforge.net/sourceforge/xmlcatmgr +build_style=gnu_configure +make_cmd="$PKGFS_MASTERDIR/bin/gmake" +short_desc="XML and SGML catalog manager" +maintainer="Juan RP " +checksum=6d01a88defccd086758f78d345a2abdf4be5c970 +long_desc=" + 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, + specially designed to be run from packaging systems. Basically, it allows + adding and removing entries from catalogs in a completely automated way. + + A catalog is a lookup mechanism used to translate entities into other + different entities. They can, for example, map public identifiers to + local files or URIs. This allows you to tell the parser where to look + for entities without having to modify the original document source." + +# Prepare and install the catalogs. +run_stuff_after="install" +run_stuff_after_install_file=" +$PKGFS_TEMPLATESDIR/$pkgname-runstuff-after-install.sh" +run_stuff_before="install" +run_stuff_before_install_file=" +$PKGFS_TEMPLATESDIR/$pkgname-runstuff-before-install.sh"