-lilypond for DEBIAN
+lilypond for Debian
-------------------
-Starting with version 0.1.12, LilyPond comes with some new MF fonts.
-These fonts are not currently listed in /usr/lib/texmf/fontname/special.map
-(from the teTeX package), therefore the fonts will be created in a
-non-standard directory somewhere under /var/spool/texmf. The problem is
-usually only aesthetic. TeTeX can create and find the *.tfm and *.pk files
-without any problems.
-
-However, if you experience any font problems (such as the note heads
-not showing up, characters in the wrong places, error messages from
-TeX), especially after upgrading to a new version of LilyPond, you may
-need to delete the relevant *.tfm and *.pk files under the directory
-/var/spool/texmf. You may also file a bug report about this if you
-like.
-
-LilyPond is still in active development, and many things may still change.
-When it is stablized in the future, these new fonts will probably be
-added into the standard special.map file.
-
-Anthony Fok <foka@debian.org>, Thu, 23 Oct 1997 16:59:32 -0600
+Dear music lover:
+
+ Welcome to the wonderful world of music typesetting! ^_^
+ This is the Debian package of GNU LilyPond.
+ Hope you enjoy producing beautiful music scores with GNU LilyPond
+ and other related packages! ^_^
+
+
+Old LilyPond Fonts Issue:
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ If you installed the lilypond_0.1.48-1 or previous versions of the
+ Debian GNU LilyPond package, please note the following:
+
+ LilyPond comes with its own MF fonts starting with version 0.1.12.
+
+ The old lilypond fonts were not listed in
+ /usr/lib/texmf/fontname/special.map (from the teTeX 0.4 package),
+ therefore the fonts were created in a non-standard directory
+ somewhere under /var/spool/texmf. The problem was usually only
+ aesthetic. TeTeX could create and find the *.tfm and *.pk files
+ without any problems.
+
+ However, if you experience any font problems (such as the note
+ heads not showing up, characters in the wrong places, error
+ messages from TeX), especially after upgrading to a new version of
+ LilyPond, you may need to delete the relevant *.tfm and *.pk files
+ under the directory /var/spool/texmf. You may also file a bug
+ report about this if you like.
+
+ Nonetheless, GNU LilyPond now comes with the standard "feta" fonts,
+ and they are already listed in the latest teTeX 0.9 / Web2C 7.2
+ /usr/lib/texmf/fontname/special.map file, so there shouldn't be any
+ more problems! Enjoy! :-)
+
+
+Anthony Fok <foka@debian.org>, Wed, 22 Apr 1998 03:37:00 -0600
-#!/usr/bin/perl -w
+#!/bin/sh
#
# postinst script for the Debian GNU/Linux lilypond package
#
# by Anthony Fok <foka@debian.org>
# Initial release: Sun, 26 Oct 1997 03:23:00 -0700
-# Last modified: Mon, 5 Jan 1998 18:36:51 -0700
+# Last modified: Wed, 22 Apr 1998 03:14:10 -0600
-use strict;
-use File::Copy;
+set -e
-my ($package, $pkg_name, $font_supplier, $font_typeface, $std_TEXMF, $TEXMF,
- $TEXINPUTS, $MFINPUTS, $TFMFONTS, @fonts);
+package=lilypond # This is used for filenames! Don't change it!
+pkg_name="GNU LilyPond"
-sub correct_opus_fonts ($$);
-sub check_texmfcnf ();
-sub run_texhash ();
-sub add_fonts ($$$$@);
-sub check_specialmap ();
+std_TEXMFMAIN=/usr/lib/texmf # Debian's standard $TEXMFMAIN
-$| = 1;
+TEXMFMAIN=`/usr/bin/kpsewhich -expand-var '$TEXMFMAIN'`
+: ${TEXMFMAIN:=$std_TEXMFMAIN}
+echo " Running /usr/bin/mktexlsr ..."
+/usr/bin/mktexlsr
-#######################
-# Variables
-#######################
-
-$package = "lilypond"; # This is used for filenames! Don't change it!
-$pkg_name = "GNU LilyPond";
-
-$font_supplier = "public";
-$font_typeface = "lilypond";
-@fonts = qw( feta );
-
-$std_TEXMF = "/usr/lib/texmf"; # Debian's standard $TEXMF
-$TEXINPUTS = "$std_TEXMF/tex/$package//";
-$MFINPUTS = "$std_TEXMF/fonts/source/$font_supplier/$font_typeface//";
-$TFMFONTS = "$std_TEXMF/fonts/tfm/$font_supplier/$font_typeface//";
-
-
-#######################
-# Subroutine
-#######################
-
-#----- Fix Opus font entries in special.map (called by check_specialmap()) ---
-# I goofed up the Opus font entries in special.map, hence this fix.
-# Note: This is a temporary fix. Consider removing this in 1998. ^_^
-
-sub correct_opus_fonts ($$) {
- my $specialmap = $_[1];
- my $supplier = "opustex";
- my $typeface = "opus";
- my @opusfonts = qw( opus opusline opusnum opussps osl );
- my $font = "";
- my $entries = "";
-
- if ($_[0] =~ /(^\w+\s+public\s+$typeface\n)+/m) {
- print " Correcting old font entries ...";
- foreach $font (@opusfonts) {
- if (length($font) < 8) { $font .= "\t"; }
- $entries .= "$font\t$supplier\t\t$typeface\n";
- }
-
- ($_[0] =~ s/(^\w+\s+public\s+$typeface\n)+/$entries/m)
- or die " Can't correct font entries in $specialmap: $!";
-
- system(": \${MAKETEXDIR=$TEXMF/maketex}; " .
- "test -r \$MAKETEXDIR/maketex.site && . \$MAKETEXDIR/maketex.site; " .
- ": \${MT_DESTROOT=$TEXMF/fonts}; " .
- "rm -rf \$MT_DESTROOT/pk/*/public/$typeface");
-
- print "\n";
- return 1;
- } else {
- return 0;
- }
-}
-
-#-------------------- Check/Modify texmf.cnf for custom teTeX installation ---
-# Edit texmf.cnf to add search path /usr/lib/texmf
-# for non-Debian teTeX installation
-
-sub check_texmfcnf () {
- my $texmfcnf;
-
- print "\n You have a custom teTeX installation in $TEXMF.\n";
-
- chop($texmfcnf = `kpsewhich cnf texmf.cnf`);
-
- if ($? == 0 and $texmfcnf ne "") {
- my($filebuf, $line);
- my $new = "$texmfcnf.new";
- my $bak = "$texmfcnf.bak";
-
- open(OLD, "< $texmfcnf") or die " Can't open $texmfcnf for reading: $!";
-
- undef $/;
- if ($filebuf = <OLD>) {
- if ($filebuf =~ /^(TEXMFL.*)$/m) {
- $line = $1;
- if ($line =~ /TEXMFL\s*=.*$std_TEXMF/) {
- print " Found $std_TEXMF in \$TEXMFL. Leaving $texmfcnf untouched.\n";
- } else {
- print " Adding $std_TEXMF to \$TEXMFL, updating $texmfcnf ...";
-
- $filebuf =~ s/^(TEXMFL\s*=\s*\S*)/$1,$std_TEXMF/m;
- open(NEW, "> $new") or die "\n Can't open $new for writing: $!";
- (print NEW $filebuf) or die "\n Can't write to $new: $!";
- close(NEW);
- copy($texmfcnf, $bak) or die "\n Can't backup $texmfcnf: $!";
- rename($new, $texmfcnf)
- or ( copy($new, $texmfcnf), unlink($new) )
- or die "\n Can't update $texmfcnf: $!";
- print " done.\n";
- }
- }
- } else {
- warn " **\n";
- warn " ** Can't read from $texmfcnf: $!\n";
- warn " ** Please verify the content of $texmfcnf!\n";
- warn " **\n";
- }
- $/ = "\n";
- close(OLD);
- } else {
- warn " **\n";
- warn " ** Can't find texmf.cnf!\n";
- warn " ** Please add $std_TEXMF to \$TEXMFL in your texmf.cnf.\n";
- warn " **\n";
- }
-}
-
-#------------------------------------------------------------- Run texhash ---
-
-sub run_texhash () {
- print " Running texhash to update $TEXMF/ls-R ...\n";
-
- if ( `which texhash` and -e "$TEXMF/ls-R" ) {
- system("texhash");
- } else {
- warn " Error: texhash or $TEXMF/ls-R not found!\n";
- }
- print "\n";
-}
-
-#---------- Add font entries to special.map (called by check_specialmap()) ---
-
-sub add_fonts ($$$$@) {
- my ($specialmap, $supplier, $typeface, $fonts) = @_[1..4];
- my $font = "";
- my $entries = "";
- foreach $font (@fonts) {
- if (length($font) < 8) { $font .= "\t"; }
- $entries .= "$font\t$supplier\t\t$typeface\n";
- }
-
- $_[0] =~ /((^\w+\s+$supplier\s+$typeface\n)+)/m;
-
- if ($1 ne $entries) {
- ($_[0] =~ s/(^\w+\s+$supplier\s+$typeface\n)+/$entries/m)
- or ($_[0] =~ s/(?=^beam\s+public\s+music\n)/$entries/m)
- or die " Can't add font entries to $specialmap: $!";
- return 1;
- } else {
- return 0;
- }
-}
-
-#---------------------------------- Check special.map and add font entries ---
-
-sub check_specialmap () {
- my $fontmap;
- my $specialmap = "$TEXMF/fontname/special.map";
- my $new = "$specialmap.new";
- my $bak = "$specialmap.bak";
-
- print " Checking font entries in $specialmap ...\n";
-
- open(OLD, "< $specialmap") or die " Can't open $specialmap for reading: $!";
- undef $/;
- if ($fontmap = <OLD>) {
- if (correct_opus_fonts($fontmap, $specialmap) |
- add_fonts($fontmap, $specialmap, $font_supplier, $font_typeface, @fonts))
- {
- print " Adding $pkg_name font entries to $specialmap ...\n";
- open(NEW, "> $new") or die " Can't open $new for writing: $!";
- (print NEW $fontmap) or die " Can't write to $new: $!";
- close(NEW);
- copy($specialmap, $bak) or die " Can't backup $specialmap: $!";
- rename($new, $specialmap)
- or ( copy($new, $specialmap), unlink($new) )
- or die " Can't update $specialmap: $!";
- } else {
- print " Entries okay. Leaving $specialmap untouched.\n";
- }
- undef $fontmap;
- } else {
- warn " **\n";
- warn " ** Can't read from $specialmap: $!\n";
- warn " ** Please verify the content of $specialmap!\n";
- warn " **\n";
- }
- $/ = "\n";
- close(OLD);
- print "\n";
-}
-
-
-
-#######################
-# Main program
-#######################
-
-print " Checking teTeX directory \$TEXMF ...";
-
-chop($TEXMF = `kpsetool -v '\$TEXMF'`);
-
-if ($? == 0 and $TEXMF ne "") {
- print " okay.";
-} else {
- warn "\n Error: kpsetool not found or \$TEXMF not set!\n";
- warn " Assuming \$TEXMF=$std_TEXMF\n";
- $TEXMF = $std_TEXMF;
- if (not -d $TEXMF) {
- warn " ... but directory '$TEXMF' does not exist either!\n";
- die " Please check your teTeX configuration.\n"
- }
-}
-
-if ($TEXMF ne $std_TEXMF) {
- check_texmfcnf();
-}
-
-print "\n";
-
-run_texhash();
-check_specialmap();
-
-print " $pkg_name configuration completed.\n";
-print " Please read /usr/doc/$package/README.Debian to get started.\n";
-
-print << `EOF`
#DEBHELPER#
-EOF
+
+echo
+echo " $pkg_name configuration completed."
+echo " Please read /usr/doc/$package/README.Debian to get started."
# by Anthony Fok <foka@debian.org>
# This is free software; see the GNU General Public Licence
# version 2 or later for copying conditions. There is NO warranty.
-# Last modified: Mon, 5 Jan 1998 18:38:11 -0700
+# Last modified: Wed, 22 Apr 1998 05:55:58 -0600
set -e
package=lilypond
font_supplier=public
font_typeface=lilypond
-std_TEXMF=/usr/lib/texmf
+std_TEXMFMAIN=/usr/lib/texmf
+std_VARTEXFONTS=/var/spool/texmf
#DEBHELPER#
-if [ "`which kpsetool`" ]; then
- TEXMF=`kpsetool -v '$TEXMF'`
-fi
-: ${TEXMF:=$std_TEXMF}
-
+TEXMFMAIN=`/usr/bin/kpsewhich -expand-var '$TEXMFMAIN'`
+: ${TEXMFMAIN:=$std_TEXMFMAIN}
+VARTEXFONTS=`/usr/bin/kpsewhich -expand-var '$VARTEXFONTS'`
+: ${VARTEXFONTS=$std_VARTEXFONTS}
case "$1" in
remove)
- if [ "`kpsetool -w tex lilyponddefs.tex 2>/dev/null`" -a "`which texhash`" ]; then
- texhash
- fi
+ /usr/bin/mktexlsr
;;
upgrade)
# Clear out the old TFM and PK files in case the fonts were modified
- : ${MAKETEXDIR=$TEXMF/maketex}
- test -r $MAKETEXDIR/maketex.site && . $MAKETEXDIR/maketex.site
- : ${MT_DESTROOT=$TEXMF/fonts}
- rm -rf $MT_DESTROOT/tfm/$font_supplier/$font_typeface
- rm -rf $MT_DESTROOT/pk/*/$font_supplier/$font_typeface
+ rm -rf $VARTEXFONTS/tfm/$font_supplier/$font_typeface
+ rm -rf $VARTEXFONTS/pk/*/$font_supplier/$font_typeface
;;
purge)
- : ${MAKETEXDIR=$TEXMF/maketex}
- test -r $MAKETEXDIR/maketex.site && . $MAKETEXDIR/maketex.site
- : ${MT_DESTROOT=$TEXMF/fonts}
- rm -rf $MT_DESTROOT/tfm/$font_supplier/$font_typeface
- rm -rf $MT_DESTROOT/pk/*/$font_supplier/$font_typeface
+ # Clear out the old TFM and PK files in case the fonts were modified
+ rm -rf $VARTEXFONTS/tfm/$font_supplier/$font_typeface
+ rm -rf $VARTEXFONTS/pk/*/$font_supplier/$font_typeface
+ /usr/bin/mktexlsr
;;
failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
- echo "postrm called with unknown argument \`$1'" >&2
- exit 0
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 0
;;
esac