Bug#335990: patch for making tipa conforming to current TeX policy
Package: tipa
Version: 1.2-2
Followup-For: Bug #335990
Hi Rafael!
In the course of checking how to get all TeX packages to work nicely
with tetex3 and texlive, I took the tipa package and fixed some things.
Attached is an interdiff between an updated version and the current
version Debian, but I include it here with some comments.
Only two things have changed:
. use dh_installtexfonts for the installation of tipa.map
this allows the removal of postrm and postinst for tipa as they
are automatically generated from dh_installtexfonts/debhelper
thus also the calls to updmap-sys etc are correct
. new location of map file
this is a two step process to move the map file from /etc/texmf/map/..
FIRST to /etc/texmf/fonts/map/dvips, and after tetex has moved all
the maps to /usr/share/texmf/fonts/map (and thus /u/s/t/fonts/map is
not a link to /etc/texmf/map anymore), a SECOND move to /u/s/t/f/m
Please check wether the code in preinst is actually what you want!!!
I have put packages (source and bin) build from this on the tug server
(where also texlive resided):
deb http://www.tug.org/texlive/Debian/ updpkg/
deb-src http://www.tug.org/texlive/Debian/ updpkg/
Best wishes
Norbert
the annotated interdiff:
changelog entry
diff -u tipa-1.2/debian/changelog tipa-1.2/debian/changelog
--- tipa-1.2/debian/changelog
+++ tipa-1.2/debian/changelog
@@ -1,3 +1,10 @@
+tipa (2:1.2-2.1) unstable; urgency=low
+
+ * NMU to work with new tetex3 (updmap-sys) and texlive
+ * use dh_installtexfonts, move map file to /etc/texmf/fonts/map/dvips
+
+ -- Norbert Preining <preining@logic.at> Sat, 3 Dec 2005 12:37:52 +0100
+
tipa (2:1.2-2) unstable; urgency=low
* debian/control: tipa depends on tetex-bin. This will avoid the problem
postinst and postrm scripts are removed as they are automatically
generated by debhelper and dh_installtexfonts
reverted:
--- tipa-1.2/debian/postinst
+++ tipa-1.2.orig/debian/postinst
@@ -1,27 +0,0 @@
-#!/bin/sh -
-# postinst of package tipa
-# Rafael Laboissiere <rafael@debian.org>
-
-set -e
-
-case "$1" in
- configure)
- if [ -x /usr/bin/texhash ] ; then \
- /usr/bin/texhash ; \
- fi
- if [ -x /usr/sbin/update-updmap ] ; then \
- /usr/sbin/update-updmap ; \
- fi
- if [ -x /usr/bin/updmap ] ; then \
- /usr/bin/updmap ; \
- fi
- ;;
- abort-upgrade | abort-deconfigure | abort-remove)
- ;;
- *)
- echo "$0: incorrect arguments: $*" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
reverted:
--- tipa-1.2/debian/postrm
+++ tipa-1.2.orig/debian/postrm
@@ -1,36 +0,0 @@
-#!/bin/sh -
-# postrm of package tipa
-# Rafael Laboissiere <rafael@debian.org>
-
-set -e
-
-case "$1" in
- purge | remove)
- if [ -x /usr/bin/texhash ] ; then \
- /usr/bin/texhash ; \
- fi
- case "$1" in
- remove)
- mv /etc/texmf/updmap.d/10tipa.cfg /etc/texmf/updmap.d/10tipa.bak
- ;;
- purge)
- rm -f /etc/texmf/updmap.d/10tipa.*
- ;;
- esac
- if [ -x /usr/sbin/update-updmap ] ; then \
- /usr/sbin/update-updmap ; \
- fi
- if [ -x /usr/bin/updmap ] ; then \
- /usr/bin/updmap ; \
- fi
- ;;
- upgrade | failed-upgrade | abort-upgrade | abort-install)
- ;;
- *)
- echo "$0: incorrect arguments: $*" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
control file fixes. You can leave the Build-Depends-Indep as it is, I
only changed it so that I can build the package on my system.
The Depends line adds alternatives on texlive
diff -u tipa-1.2/debian/control tipa-1.2/debian/control
--- tipa-1.2/debian/control
+++ tipa-1.2/debian/control
@@ -3,11 +3,11 @@
Priority: optional
Maintainer: Rafael Laboissiere <rafael@debian.org>
Standards-Version: 3.5.7
-Build-Depends-Indep: debhelper (>= 3.4.1), tetex-bin, tetex-extra, gs-common, perl, sharutils
+Build-Depends-Indep: tex-common (>= 0.11), debhelper (>= 3.4.1), tetex-bin | texlive-latex-recommended, tetex-extra | texlive-fonts-recommended, gs-common, perl, sharutils
Package: tipa
Architecture: all
-Depends: tetex-base, tetex-bin
+Depends: tetex-base | texlive-latex-base, tetex-bin | texlive-base-bin
Conflicts: tipa-type1
Replaces: tipa-type1
Description: System for processing phonetic symbols in LaTeX
The rule files has been slightly modified in two ways:
. install the map file into /etc/texmf/fonts/map/dvips
. use dh_installtexfonts to generate the updmap.d and related list file
diff -u tipa-1.2/debian/rules tipa-1.2/debian/rules
--- tipa-1.2/debian/rules
+++ tipa-1.2/debian/rules
@@ -52,7 +52,7 @@
dh_clean -k
dh_installdirs
- $(MAKE) install PREFIX=$(debtexmf) MAPDIR=$(debetc)/texmf/dvips
+ $(MAKE) install PREFIX=$(debtexmf) MAPDIR=$(debetc)/texmf/fonts/map/dvips
# Fixes bug reported by lintian
chmod +x $(debtexmf)/fonts/source/fkr/tipa/*.sh
cp 00README changelog
@@ -67,7 +67,8 @@
debian/xfonts-tipa.defoma-hints
install --mode=644 debian/silipa.enc $(debxenc)
- install --mode=644 debian/tipa.updmap $(debupdm)/10tipa.cfg
+ #install --mode=644 debian/tipa.updmap $(debupdm)/10tipa.cfg
+ dh_installtexfonts MixedMap=tipa.map
dh_movefiles
# dh_movefiles does not remove empty empty dirs. Grrr....
new location of map file
diff -u tipa-1.2/debian/conffiles tipa-1.2/debian/conffiles
--- tipa-1.2/debian/conffiles
+++ tipa-1.2/debian/conffiles
@@ -1,2 +1,2 @@
-/etc/texmf/dvips/tipa.map
+/etc/texmf/fonts/map/dvips/tipa.map
/etc/texmf/updmap.d/10tipa.cfg
tipa.updmap is not needed anymore and is replaced by a call to
dh_installtexfonts MixedMap=tipa.map
reverted:
--- tipa-1.2/debian/tipa.updmap
+++ tipa-1.2.orig/debian/tipa.updmap
@@ -1 +0,0 @@
-MixedMap tipa.map
preinst new: code for moving the conf file tipa.map to an alernative
location. See above for rational
only in patch2:
unchanged:
--- tipa-1.2.orig/debian/preinst
+++ tipa-1.2/debian/preinst
@@ -0,0 +1,53 @@
+#!/bin/sh -e
+
+#
+# we have to move the map and dvips config file into /u/s/texmf
+# but want to preserve changes done by the user!
+#
+config_move ()
+{
+ oldfile=$1
+ oldmd5sum=$2
+ newloc=$3
+
+ if ! [ -r $oldfile ] ; then
+ return 0
+ fi
+ oldloc=`dirname $1`
+ newmd5sum=`md5sum $oldfile | cut -d ' ' -f 1`
+ if [ "$newmd5sum" = "$oldmd5sum" ] ; then
+ echo "Removing obsolete, unchanged conffile $oldfile"
+ rm $oldfile
+ else
+ if [ "X$newloc" = "X" ] ; then
+ echo "Conffile $oldfile was changed, leaving it at the same place"
+ else
+ echo "Conffile $oldfile was changed, moving it to new location $newloc"
+ mkdir -p $newloc
+ mv $oldfile $newloc
+ fi
+ fi
+ test -d $oldloc && rmdir --ignore-fail-on-non-empty $oldloc || true
+}
+
+
+
+case "$1" in
+ upgrade|install)
+ set -e
+ config_move /etc/texmf/dvips/tipa.map 26588041bd830288c5d8258cbf09bcf1 /etc/texmf/fonts/map/dvips
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+
+#DEBHELPER#
+
+exit 0
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (100, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-rc3-mm1
Locale: LANG=de_AT@euro, LC_CTYPE=de_AT@euro (charmap=ISO-8859-15)
Reply to: