From 703ef2c02e18bff257d28eeff89cb6567be4529b Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 16 Jun 2011 12:22:32 +0200 Subject: [PATCH] docbook-xml: do not use $xml_catalogs, directly use $xml_entries. Use bsdtar to unpack. --- srcpkgs/docbook-xml/template | 39 ++++++++++++++---------------------- 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/srcpkgs/docbook-xml/template b/srcpkgs/docbook-xml/template index f4a3fac64e..beea7bb569 100644 --- a/srcpkgs/docbook-xml/template +++ b/srcpkgs/docbook-xml/template @@ -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 }