upgpkg: ocaml-integers 0.5.0-1
[arch-packages.git] / perl-xml-libxml / trunk / perl-xml-libxml.install
blob3a8eb1eddd9b60918ba2d372244199e0788fd475
1 post_install() {
2   echo ":: Installing SAX XML Parsers"
3   perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX::Parser))->save_parsers()"
4   perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX))->save_parsers()"
7 post_upgrade() {
8   if [[ ! -f /usr/share/perl5/vendor_perl/XML/SAX/ParserDetails.ini ]]; then
9     post_install
10   else
11     libxmlcount=`grep -c XML::LibXML::SAX /usr/share/perl5/vendor_perl/XML/SAX/ParserDetails.ini`
12     if [[ $libxmlcount == 0 ]]; then
13       post_install
14     fi
15   fi
18 pre_remove() {
19   if [[ -f /usr/share/perl5/vendor_perl/XML/SAX/ParserDetails.ini ]]; then
20     perl -MXML::SAX -e "XML::SAX->remove_parser(q(XML::LibXML::SAX::Parser))->save_parsers()"
21     perl -MXML::SAX -e "XML::SAX->remove_parser(q(XML::LibXML::SAX))->save_parsers()"
22   fi