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