From: Adam Dickmeiss Date: Fri, 27 Jun 2014 13:01:01 +0000 (+0200) Subject: Use dpkg-maintscript-helper rm_conffile to remove XSL files X-Git-Tag: v1.7.0~1 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=43b4b1061afce184d36f938600a6fa8b53c63a0d;p=pazpar2-moved-to-github.git Use dpkg-maintscript-helper rm_conffile to remove XSL files These are now part of pazpar2-xsl. --- diff --git a/debian/pazpar2.postinst b/debian/pazpar2.postinst index c5862f4..3be43ea 100644 --- a/debian/pazpar2.postinst +++ b/debian/pazpar2.postinst @@ -4,19 +4,19 @@ set -e if [ "$1" != "configure" ]; then exit 0 fi +for i in cf.xsl marc21.xsl pp2out-to-carrot2.xsl solr-pz2.xsl \ + dads-pz2.xsl marc22.xsl primo-pz2.xsl tmarc.xsl danmarc2.xsl \ + MarcXML2TurboMarc.xsl pz2-ourl-base.xsl unimarc.xsl dc.xsl \ + oai_dc.xsl pz2-ourl-marc21.xsl usmarc.xsl dkabm.xsl opac_turbomarc.xsl \ + pz2-solr.xsl marc21-ourl.xsl opac.xsl server-status-nagios.xsl ; do + dpkg-maintscript-helper rm_conffile /etc/pazpar2/$i 1.6.40.-1.indexdata -- "$@" +done + # add default.xml if there are no enabled services no_services=true for f in /etc/pazpar2/services-enabled/*.xml; do test -e $f && no_services=false done -for f in /usr/share/pazpar2/xsl/*.xsl; do - e=/etc/pazpar2/`basename $f` - if test -f $e; then - if diff $e $f >/dev/null; then - rm $e - fi - fi -done if ${no_services}; then ln -sf ../services-available/default.xml \ /etc/pazpar2/services-enabled/default.xml diff --git a/debian/pazpar2.postrm b/debian/pazpar2.postrm index 911bac3..54d4193 100644 --- a/debian/pazpar2.postrm +++ b/debian/pazpar2.postrm @@ -1,6 +1,14 @@ #!/bin/sh set -e +for i in cf.xsl marc21.xsl pp2out-to-carrot2.xsl solr-pz2.xsl \ + dads-pz2.xsl marc22.xsl primo-pz2.xsl tmarc.xsl danmarc2.xsl \ + MarcXML2TurboMarc.xsl pz2-ourl-base.xsl unimarc.xsl dc.xsl \ + oai_dc.xsl pz2-ourl-marc21.xsl usmarc.xsl dkabm.xsl opac_turbomarc.xsl \ + pz2-solr.xsl marc21-ourl.xsl opac.xsl server-status-nagios.xsl ; do + dpkg-maintscript-helper rm_conffile /etc/pazpar2/$i 1.6.40-1.indexdata -- "$@" +done + if [ "$1" = "purge" ] ; then update-rc.d pazpar2 remove >/dev/null || exit $? rm -f /var/log/pazpar2.log diff --git a/debian/pazpar2.preinst b/debian/pazpar2.preinst new file mode 100644 index 0000000..045a819 --- /dev/null +++ b/debian/pazpar2.preinst @@ -0,0 +1,10 @@ +#!/bin/sh -e + +for i in cf.xsl marc21.xsl pp2out-to-carrot2.xsl solr-pz2.xsl \ + dads-pz2.xsl marc22.xsl primo-pz2.xsl tmarc.xsl danmarc2.xsl \ + MarcXML2TurboMarc.xsl pz2-ourl-base.xsl unimarc.xsl dc.xsl \ + oai_dc.xsl pz2-ourl-marc21.xsl usmarc.xsl dkabm.xsl opac_turbomarc.xsl \ + pz2-solr.xsl marc21-ourl.xsl opac.xsl server-status-nagios.xsl ; do + dpkg-maintscript-helper rm_conffile /etc/pazpar2/$i 1.6.40-1.indexdata -- "$@" +done +