From: Don Armstrong Date: Sun, 27 Apr 2014 21:57:54 +0000 (-0700) Subject: properly handle symlink to directory X-Git-Tag: debian/2.18.0-1~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f6ccfa88d16b7ff7a9b8fb9a9d3ce4c1d3cecbbe;p=lilypond.git properly handle symlink to directory remove w3c callback image update standards version --- diff --git a/debian/changelog b/debian/changelog index b2b561d40c..fb339d0c76 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ lilypond (2.18.0-1) unstable; urgency=low * New upstream version (closes: #729817) + * Fix replacement of /usr/share/info/lilypond symlink with a directory + (Closes: #736306) -- Don Armstrong Tue, 31 Dec 2013 13:23:41 -0800 diff --git a/debian/control b/debian/control index b8f5c07344..959e1b279c 100644 --- a/debian/control +++ b/debian/control @@ -16,7 +16,7 @@ Build-Depends: debhelper (>= 9), quilt, python-all-dev (>= 2.6.6-3~), dh-python, Section: tex Priority: optional Maintainer: Don Armstrong -Standards-Version: 3.9.3 +Standards-Version: 3.9.5 Homepage: http://lilypond.org/ Vcs-Git: git://git.donarmstrong.com/lilypond.git Vcs-Browser: http://git.donarmstrong.com/lilypond.git diff --git a/debian/lilypond-doc.postinst b/debian/lilypond-doc.postinst new file mode 100644 index 0000000000..2559f962d6 --- /dev/null +++ b/debian/lilypond-doc.postinst @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +#DEBHELPER# + +if dpkg-maintscript-helper supports symlink_to_dir; then + dpkg-maintscript-helper symlink_to_dir \ + /usr/share/info/lilypond ../doc/lilypond/html/Documentation/user \ + 2.18.0-1~ lilypond-doc -- "$@" +fi; diff --git a/debian/lilypond-doc.postrm b/debian/lilypond-doc.postrm new file mode 100644 index 0000000000..2559f962d6 --- /dev/null +++ b/debian/lilypond-doc.postrm @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +#DEBHELPER# + +if dpkg-maintscript-helper supports symlink_to_dir; then + dpkg-maintscript-helper symlink_to_dir \ + /usr/share/info/lilypond ../doc/lilypond/html/Documentation/user \ + 2.18.0-1~ lilypond-doc -- "$@" +fi; diff --git a/debian/lilypond-doc.preinst b/debian/lilypond-doc.preinst new file mode 100644 index 0000000000..2559f962d6 --- /dev/null +++ b/debian/lilypond-doc.preinst @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +#DEBHELPER# + +if dpkg-maintscript-helper supports symlink_to_dir; then + dpkg-maintscript-helper symlink_to_dir \ + /usr/share/info/lilypond ../doc/lilypond/html/Documentation/user \ + 2.18.0-1~ lilypond-doc -- "$@" +fi; diff --git a/debian/remove_w3c_callback b/debian/remove_w3c_callback new file mode 100644 index 0000000000..9b70881f7e --- /dev/null +++ b/debian/remove_w3c_callback @@ -0,0 +1,33 @@ +#!/usr/bin/perl + +use warnings; +use strict; + +use IO::File; +use File::Find; + +# +# Valid HTML 4.01 Transitional + +file_find(\&fix_if_file,@ARGV) + +sub fix_if_file { + return unless -f $_; + my $fh = IO::File->new($_,'r') or + die "Unable to open $_ for reading: $!"; + local $/; + my $fc = <$fh>; + close($fh); + if (# strip out the w3c img callback; replace with alt text + $fc =~ s{]*?alt="([^"]+)"[^>]*>}{$1}img + or + # if it doesn't have alt text, just replace it with Valid HTML + $fc =~ s{]*>}{Valid HTML}img ) { + $fh = IO::File->new($_,'w') or + die "Unable to open $_ for writing: $!"; + print {$fh} $fc; + close($fh); + } +} diff --git a/debian/rules b/debian/rules index 19fca15689..7c652908cf 100755 --- a/debian/rules +++ b/debian/rules @@ -52,6 +52,7 @@ override_dh_auto_install-indep: $(MAKE) install-info $(DOC_OPTIONS) prefix=$(CURDIR)/debian/tmp/usr rm -rf $(CURDIR)/debian/tmp/usr/share/omf rm -rf $(CURDIR)/debian/tmp/usr/share/doc/lilypond/html/input + perl debian/remove_w3c_callback $(CURDIR)/debian/tmp/usr/share/doc/lilypond/ $(CURDIR)/debian/tmp/usr/share/info/ ## Unfortunately, lilypond is kind of broken, and installs the wrong ## info documentation (missing images) if we call their makefile