From: Ian Jackson Date: Mon, 9 Jan 2012 04:18:44 +0000 (+0000) Subject: more packaging X-Git-Url: https://git.distorted.org.uk/~mdw/xfonts-traditional/commitdiff_plain/12fa1ef82427acbdd0b55b8dc3454dbffac47be2 more packaging --- diff --git a/debian/control b/debian/control index 30b5065..3fc9dec 100644 --- a/debian/control +++ b/debian/control @@ -14,12 +14,12 @@ Description: Traditional fixed-with fonts for X These are a set of 6x13 fonts (including "fixed"), with foundry name "trad" instead of "misc", with several glyphs replaced with earlier versions from before Markus Kuhn's changes: - - balanced ` and ' - - less tall [ ] ( ) { } - - centred * - - high ~ - - slightly higher & - - traditional appearance of: a W + - balanced ` ' + - less tall [ ] ( ) { } + - centred * + - high ~ + - slightly higher & + - traditional appearance of W a . These changes make the fonts compatible with the US-ASCII character set. (UTF-8 is not compatible with ASCII in its usage of the @@ -32,4 +32,4 @@ Description: Traditional fixed-with fonts for X . (This package does not actually contain the bulk of the font data; rather, it automatically generates the required modified fonts for - each font you have installed.) + each relevant font you have installed.) diff --git a/debian/xfonts-traditional.config b/debian/xfonts-traditional.config new file mode 100644 index 0000000..86c93bf --- /dev/null +++ b/debian/xfonts-traditional.config @@ -0,0 +1,32 @@ +#!/bin/sh +set -e + +. /usr/share/debconf/confmodule + +check_aliasfile () { + aliasfile=/etc/X11/fonts/misc/xfonts-base.alias + if ! test -f $aliasfile; then return; fi + if test -e $aliasfile.not-trad; then return; fi + + perl -pe ' + s/^(fixed\s+)\-misc\-(fixed-medium-r-semicondensed)/$1-trad-$2$/ + ' <$aliasfile >$aliasfile.trad + if cmp -s $aliasfile $aliasfile.trad; then + rm $aliasfile.trad + return + fi + db_get xfonts-traditional/remap-fixed + if [ $RET != true ]; then return; fi + + ln $aliasfile $aliasfile.not-trad + mv -f $aliasfile.trad $aliasfile +} + +db_get xfonts-traditional/generate +if [ "$RET" = true ]; then + + update-xfonts-traditional --update + + check_aliasfile + +fi diff --git a/debian/xfonts-traditional.postinst b/debian/xfonts-traditional.postinst new file mode 100644 index 0000000..fe81215 --- /dev/null +++ b/debian/xfonts-traditional.postinst @@ -0,0 +1,6 @@ +#!/bin/sh +set -e +. /usr/share/debconf/confmodule +db_input low xfonts-traditional/generate || true +db_input high xfonts-traditional/remap-fixed || true +db_go || true diff --git a/debian/xfonts-traditional.prerm b/debian/xfonts-traditional.prerm new file mode 100644 index 0000000..4dc7f2c --- /dev/null +++ b/debian/xfonts-traditional.prerm @@ -0,0 +1,37 @@ +#!/bin/sh +set -e + +. /usr/share/debconf/confmodule + +case "$1" in + +remove) + + echo 'Checking that "fixed" is not from xfonts-traditional..." + + if grep '^fixed[ ][ ]*-trad-'; then + cat >&2 <