docbook-xml: do not use $xml_catalogs, directly use $xml_entries. Use bsdtar to unpack.

This commit is contained in:
Juan RP 2011-06-16 12:22:32 +02:00
parent c912ce0eef
commit 703ef2c02e

View file

@ -30,24 +30,19 @@ noarch=yes
noextract=yes
Add_dependency full xmlcatmgr
Add_dependency build unzip
Add_dependency build bsdtar
xml_catalogs="
/usr/share/xml/docbook/4.2/catalog
/usr/share/xml/docbook/4.3/catalog
/usr/share/xml/docbook/4.4/catalog
/usr/share/xml/docbook/4.5/catalog
/usr/share/xml/docbook/4.2/catalog-4.1.2"
xml_entries="
export xml_entries="
rewriteSystem http://www.oasis-open.org/docbook/xml/4.2 /usr/share/xml/docbook/4.2
rewriteSystem http://www.oasis-open.org/docbook/xml/4.3 /usr/share/xml/docbook/4.3
rewriteSystem http://www.oasis-open.org/docbook/xml/4.4 /usr/share/xml/docbook/4.4
rewriteSystem http://www.oasis-open.org/docbook/xml/4.5 /usr/share/xml/docbook/4.5
rewriteSystem http://www.oasis-open.org/docbook/xml/4.1.2 /usr/share/xml/docbook/4.2"
export xml_catalogs="${xml_catalogs}"
export xml_entries="${xml_entries}"
rewriteSystem http://www.oasis-open.org/docbook/xml/4.1.2 /usr/share/xml/docbook/4.2
nextCatalog /usr/share/xml/docbook/4.2/catalog --
nextCatalog /usr/share/xml/docbook/4.3/catalog --
nextCatalog /usr/share/xml/docbook/4.4/catalog --
nextCatalog /usr/share/xml/docbook/4.5/catalog --
nextCatalog /usr/share/xml/docbook/4.2/catalog-4.1.2 --"
do_install()
{
@ -58,26 +53,22 @@ do_install()
for ver in ${versions}; do
dir=${DESTDIR}/usr/share/xml/docbook/${ver}
install -d -m755 ${dir}
unzip -q -x ${XBPS_SRCDISTDIR}/docbook-xml-${ver}.zip \
-d ${dir} && mv ${dir}/catalog.xml ${dir}/catalog \
|| return 1
bsdtar xf ${XBPS_SRCDISTDIR}/docbook-xml-${ver}.zip \
-C ${dir} && mv ${dir}/catalog.xml ${dir}/catalog
done
dir=${DESTDIR}/usr/share/xml/docbook/4.2
sed -e 's|V4.2|V4.1.2|g' < ${dir}/catalog > ${dir}/catalog-4.1.2
chmod 644 ${dir}/catalog-4.1.2
}
post_install()
post_stow()
{
#
# Run the trigger to register its XML catalog entries.
#
cd ${XBPS_MASTERDIR}
${XBPS_TRIGGERSDIR}/xml-catalog run post-install
# Register XML catalogs.
cd ${XBPS_MASTERDIR} && ${XBPS_TRIGGERSDIR}/xml-catalog run post-install
}
pre_remove()
{
cd ${XBPS_MASTERDIR}
${XBPS_TRIGGERSDIR}/xml-catalog run pre-remove
# Unregister XML catalogs.
cd ${XBPS_MASTERDIR} && ${XBPS_TRIGGERSDIR}/xml-catalog run pre-remove
}