[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

arabtex: does not work with current tetex (and texlive) (patch included)



Package: arabtex
Version: 3.11-7
Severity: important
Tags: patch


Hi Clint!

arabtex does not work with the new tetex 3 layout, please see the TeX
Policy in the tex-common package for details.

I have taken the liberty to patch your packages so that it works with
current tetex (and with the upcoming texlive packages).

Attached is an diff on top of an unpacked arabtex package 3.11-7. I
included it here also with some comments:

updmap.cfg is deleted as map installation is done with
dh_installtexfonts to get all the features of the new system without any
hassles.
--- arabtex-3.11/debian/updmap.cfg
+++ arabtex-3.11.orig/debian/updmap.cfg
@@ -1,2 +0,0 @@
-# arabtex map file
-Map arabtex.map

The rules file is reworked for comapatibility level 4 and usage of
debhelper scripts, see the interdiff for the fulls stuff:

diff -u arabtex-3.11/debian/rules arabtex-3.11/debian/rules
--- arabtex-3.11/debian/rules
+++ arabtex-3.11/debian/rules
@@ -4,57 +4,44 @@
...
one comment: the files arabtex.tex and hebtex.tex should be installed
into tex/generic/arabtex as they are NOT latex input files but for plain
tex.

+	cp tex/latex/arabtex/* $(tmpdir)/usr/share/texmf/tex/latex/arabtex
+	mv $(tmpdir)/usr/share/texmf/tex/latex/arabtex/arabtex.tex $(tmpdir)/usr/share/texmf/tex/generic/arabtex
+	mv $(tmpdir)/usr/share/texmf/tex/latex/arabtex/hebtex.tex $(tmpdir)/usr/share/texmf/tex/generic/arabtex

the map file is moved from /etc/texmf/dvips FIRST to
/etc/texmf/fonts/map/dvips and as soon as tetex has moved all its map
files to /usr/share/texmf than it can be moved also to /usr/share/texmf.
It makes more sense there, as it can be overriden easily by putting a
copy into /etc/texmf/fonts/map

See also the preinst script which does the config file change.
+	cp fonts/type1/arabtex/arabtex.map $(tmpdir)/etc/texmf/fonts/map/dvips

The call to dh_installtexfonts installes the updmap.d config file and
the related file in /var/lib/tex-common/...

Furthermore, it should be a MixedMap and not a Map
+	dh_installtexfonts MixedMap=arabtex.map

Lots of your commands replaced by dh_ scripts.

+	dh_installchangelogs doc/arabtex/txt/changes.txt
+
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
 
control changed to depend on debhelper, on tex-common, and on either
tetex or texlive.

diff -u arabtex-3.11/debian/control arabtex-3.11/debian/control
--- arabtex-3.11/debian/control
+++ arabtex-3.11/debian/control
@@ -2,11 +2,12 @@
 Section: tex
 Priority: optional
 Maintainer: Clint Adams <schizo@debian.org>
-Standards-Version: 3.6.1
+Build-Depends-Indep: tex-common (>= 0.11), debhelper (>= 4)
+Standards-Version: 3.6.2.1
 
 Package: arabtex
 Architecture: all
-Depends: tetex-bin (>= 2), tetex-extra
+Depends: tex-common (>= 0.11), tetex-bin (>= 2) | texlive-latex-base, tetex-extra | texlive-latex-base
 Description: Arabic/Hebrew macros for TeX/LaTeX
  ArabTeX is a package extending the capabilities of TeX/LaTeX to generate 
  the arabic writing from an ASCII transliteration for texts in several 
reverted:

postrm and postinst is REMOVED as it is *automatically* generated from
debhelper/dh_installtexfonts. You don't have to care for this anymore.

--- arabtex-3.11/debian/postrm
+++ arabtex-3.11.orig/debian/postrm
@@ -1,7 +0,0 @@
-#!/bin/sh -e
-
-case "$1" in
-	remove|purge)
-	mktexlsr || true
-	;;
-esac



dirs adapted to the new layout

diff -u arabtex-3.11/debian/dirs arabtex-3.11/debian/dirs
--- arabtex-3.11/debian/dirs
+++ arabtex-3.11/debian/dirs
@@ -3,5 +3,6 @@
 usr/share/texmf/tex/latex/arabtex
+usr/share/texmf/tex/generic/arabtex
 usr/share/doc/arabtex
 usr/share/texmf/fonts/type1/arabtex
-etc/texmf/dvips
+etc/texmf/fonts/map/dvips
 etc/texmf/updmap.d


postinst removed, see above

--- arabtex-3.11/debian/postinst
+++ arabtex-3.11.orig/debian/postinst
@@ -1,7 +0,0 @@
-#!/bin/sh -e
-
-DVIPSCONFIG=/usr/share/texmf/dvips/config
-
-update-updmap
-mktexlsr
-updmap

changelog entry for my changes

diff -u arabtex-3.11/debian/changelog arabtex-3.11/debian/changelog
--- arabtex-3.11/debian/changelog
+++ arabtex-3.11/debian/changelog
@@ -1,3 +1,12 @@
+arabtex (3.11-7.1) unstable; urgency=low
+
+  * NMU upload to get it working with current tetex
+  * adaption to new tetex font configuration
+  * first move of map files to /etc/texmf/fonts/map/dvips
+  * dependency on texlive added
+
+ -- Norbert Preining <preining@logic.at>  Sat,  3 Dec 2005 00:12:30 +0100
+
 arabtex (3.11-7) unstable; urgency=low
 
   * Update apatch.sty to 3.11m.



fix an error/warning from lintian, this is a syntax error!

@@ -154,10 +163,10 @@
 
  -- Clint Adams <schizo@debian.org>  Sun, 28 Mar 1999 08:42:55 -0500
 
-arabtex (3.06-2) unstable; urgency=medium, closes=14014
+arabtex (3.06-2) unstable; urgency=medium
 
   * Renamed hcbase_p.mf to hcbase_pc.mf so that Hebrew support
-    will work properly with the hclassic font.
+    will work properly with the hclassic font. (Closes: #14014)
 
  -- Clint Adams <schizo@debian.org>  Tue, 17 Feb 1998 21:21:37 -0500
 

conffiles removed, with compat=4 this is done automatically

--- arabtex-3.11/debian/conffiles
+++ arabtex-3.11.orig/debian/conffiles
@@ -1,2 +0,0 @@
-/etc/texmf/dvips/arabtex.map
-/etc/texmf/updmap.d/10arabtex.cfg


new is the preinst script which tries to move changes done by the admin
to the new conf file location

only in patch2:
unchanged:
--- arabtex-3.11.orig/debian/preinst
+++ arabtex-3.11/debian/preinst
@@ -0,0 +1,46 @@
+#!/bin/sh -e
+
+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/arabtex.map 42298450172bb0f033c4844ded62280e /etc/texmf/fonts/map/dvips/
+	;;
+    abort-upgrade)
+	;;
+
+    *)
+	echo "preinst called with unknown argument \`$1'" >&2
+	exit 1
+	;;
+esac
+
+#DEBHELPER#
+
+exit 0
+


set the compatibility level to 4
only in patch2:
unchanged:
--- arabtex-3.11.orig/debian/compat
+++ arabtex-3.11/debian/compat
@@ -0,0 +1 @@
+4



That's it. I hope this is ok for you. I came around this since I want to
get most packages either working with tetex and texlive, or see what I
can leave out of texlive as it is in Debian already.

-- 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)
reverted:
--- arabtex-3.11/debian/updmap.cfg
+++ arabtex-3.11.orig/debian/updmap.cfg
@@ -1,2 +0,0 @@
-# arabtex map file
-Map arabtex.map
diff -u arabtex-3.11/debian/rules arabtex-3.11/debian/rules
--- arabtex-3.11/debian/rules
+++ arabtex-3.11/debian/rules
@@ -4,57 +4,44 @@
+tmpdir=$(CURDIR)/debian/$(package)
 
 build:
-	$(checkdir)
+	dh_testdir
 	touch build
 
 clean:
-	$(checkdir)
+	dh_testdir
+	dh_clean -k
 	-rm -f build
 	-rm -f `find . -name "*~"`
 	-rm -rf debian/tmp debian/files* core debian/substvars
 
-binary-indep:	checkroot build
-	$(checkdir)
-	-rm -rf debian/tmp
-	install -d debian/tmp
-	cd debian/tmp && install -d `cat ../dirs`
-	cp fonts/tfm/arabtex/*.tfm debian/tmp/usr/share/texmf/fonts/tfm/arabtex
-	cp fonts/source/arabtex/*.mf debian/tmp/usr/share/texmf/fonts/source/arabtex
-#	mv debian/tmp/usr/share/texmf/fonts/source/arabtex/hcbase_p.mf debian/tmp/usr/share/texmf/fonts/source/arabtex/hcbase_pc.mf
-	cp tex/latex/arabtex/* debian/tmp/usr/share/texmf/tex/latex/arabtex
-	cp fonts/type1/arabtex/*.pfb debian/tmp/usr/share/texmf/fonts/type1/arabtex
-	cp fonts/type1/arabtex/arabtex.map debian/tmp/etc/texmf/dvips
-	cp debian/updmap.cfg debian/tmp/etc/texmf/updmap.d/10arabtex.cfg
-
-	cp -a doc/arabtex/* debian/tmp/usr/share/doc/arabtex
-	install -g 0 -o 0 -m 644 -p debian/copyright debian/tmp/usr/share/doc/arabtex/copyright
-	install -g 0 -o 0 -m 644 -p doc/arabtex/txt/changes.txt debian/tmp/usr/share/doc/arabtex/changelog
-
-	install -d debian/tmp/DEBIAN
-	install -o 0 -g 0 -p -m755 debian/postinst debian/tmp/DEBIAN/postinst
-	install -o 0 -g 0 -p -m755 debian/postrm debian/tmp/DEBIAN/postrm
-	install -o 0 -g 0 -p -m644 debian/changelog debian/tmp/usr/share/doc/arabtex/changelog.Debian
-	install -p -m644 debian/conffiles debian/tmp/DEBIAN/conffiles
-
-	chmod a-x debian/tmp/usr/share/doc/arabtex/changelog.Debian debian/tmp/usr/share/doc/arabtex/changelog debian/tmp/usr/share/doc/arabtex/txt/arabtex.doc debian/tmp/usr/share/doc/arabtex/txt/arwindoc.tex debian/tmp/usr/share/doc/arabtex/txt/changes2.txt debian/tmp/usr/share/doc/arabtex/txt/hebrew.305 debian/tmp/usr/share/doc/arabtex/txt/readme.305 debian/tmp/usr/share/doc/arabtex/txt/sindhi.tex debian/tmp/usr/share/doc/arabtex/txt/readme.txt
-	gzip -9f debian/tmp/usr/share/doc/arabtex/changelog.Debian debian/tmp/usr/share/doc/arabtex/changelog debian/tmp/usr/share/doc/arabtex/txt/arabtex.doc debian/tmp/usr/share/doc/arabtex/txt/arwindoc.tex debian/tmp/usr/share/doc/arabtex/txt/changes2.txt debian/tmp/usr/share/doc/arabtex/txt/hebrew.305 debian/tmp/usr/share/doc/arabtex/txt/readme.305 debian/tmp/usr/share/doc/arabtex/txt/sindhi.tex debian/tmp/usr/share/doc/arabtex/txt/readme.txt
-
-	cd debian/tmp && find * -type f  ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum > DEBIAN/md5sums
-
-	dpkg-gencontrol -isp
-	chown -R root.root debian/tmp
-	chmod -R go=rX debian/tmp
-	dpkg --build debian/tmp ..
-
-define checkdir
-	test -f debian/rules
-endef
-
-# Below here is fairly generic really
+binary-indep:	build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+	cp fonts/tfm/arabtex/*.tfm $(tmpdir)/usr/share/texmf/fonts/tfm/arabtex
+	cp fonts/source/arabtex/*.mf $(tmpdir)/usr/share/texmf/fonts/source/arabtex
+	cp tex/latex/arabtex/* $(tmpdir)/usr/share/texmf/tex/latex/arabtex
+	mv $(tmpdir)/usr/share/texmf/tex/latex/arabtex/arabtex.tex $(tmpdir)/usr/share/texmf/tex/generic/arabtex
+	mv $(tmpdir)/usr/share/texmf/tex/latex/arabtex/hebtex.tex $(tmpdir)/usr/share/texmf/tex/generic/arabtex
+	cp fonts/type1/arabtex/*.pfb $(tmpdir)/usr/share/texmf/fonts/type1/arabtex
+	cp fonts/type1/arabtex/arabtex.map $(tmpdir)/etc/texmf/fonts/map/dvips
+	#
+	# install fonts
+	#
+	dh_installtexfonts MixedMap=arabtex.map
+
+	cp -a doc/arabtex/* $(tmpdir)/usr/share/doc/arabtex
+	dh_installdocs 
+	dh_installchangelogs doc/arabtex/txt/changes.txt
+
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
 
 binary:		binary-indep
 
-checkroot:
-	$(checkdir)
-	test root = "`whoami`"
-
-.PHONY: binary binary-arch binary-indep clean checkroot
+.PHONY: binary binary-arch binary-indep clean 
diff -u arabtex-3.11/debian/control arabtex-3.11/debian/control
--- arabtex-3.11/debian/control
+++ arabtex-3.11/debian/control
@@ -2,11 +2,12 @@
 Section: tex
 Priority: optional
 Maintainer: Clint Adams <schizo@debian.org>
-Standards-Version: 3.6.1
+Build-Depends-Indep: tex-common (>= 0.11), debhelper (>= 4)
+Standards-Version: 3.6.2.1
 
 Package: arabtex
 Architecture: all
-Depends: tetex-bin (>= 2), tetex-extra
+Depends: tex-common (>= 0.11), tetex-bin (>= 2) | texlive-latex-base, tetex-extra | texlive-latex-base
 Description: Arabic/Hebrew macros for TeX/LaTeX
  ArabTeX is a package extending the capabilities of TeX/LaTeX to generate 
  the arabic writing from an ASCII transliteration for texts in several 
reverted:
--- arabtex-3.11/debian/postrm
+++ arabtex-3.11.orig/debian/postrm
@@ -1,7 +0,0 @@
-#!/bin/sh -e
-
-case "$1" in
-	remove|purge)
-	mktexlsr || true
-	;;
-esac
diff -u arabtex-3.11/debian/dirs arabtex-3.11/debian/dirs
--- arabtex-3.11/debian/dirs
+++ arabtex-3.11/debian/dirs
@@ -3,5 +3,6 @@
 usr/share/texmf/tex/latex/arabtex
+usr/share/texmf/tex/generic/arabtex
 usr/share/doc/arabtex
 usr/share/texmf/fonts/type1/arabtex
-etc/texmf/dvips
+etc/texmf/fonts/map/dvips
 etc/texmf/updmap.d
reverted:
--- arabtex-3.11/debian/postinst
+++ arabtex-3.11.orig/debian/postinst
@@ -1,7 +0,0 @@
-#!/bin/sh -e
-
-DVIPSCONFIG=/usr/share/texmf/dvips/config
-
-update-updmap
-mktexlsr
-updmap
diff -u arabtex-3.11/debian/changelog arabtex-3.11/debian/changelog
--- arabtex-3.11/debian/changelog
+++ arabtex-3.11/debian/changelog
@@ -1,3 +1,12 @@
+arabtex (3.11-7.1) unstable; urgency=low
+
+  * NMU upload to get it working with current tetex
+  * adaption to new tetex font configuration
+  * first move of map files to /etc/texmf/fonts/map/dvips
+  * dependency on texlive added
+
+ -- Norbert Preining <preining@logic.at>  Sat,  3 Dec 2005 00:12:30 +0100
+
 arabtex (3.11-7) unstable; urgency=low
 
   * Update apatch.sty to 3.11m.
@@ -154,10 +163,10 @@
 
  -- Clint Adams <schizo@debian.org>  Sun, 28 Mar 1999 08:42:55 -0500
 
-arabtex (3.06-2) unstable; urgency=medium, closes=14014
+arabtex (3.06-2) unstable; urgency=medium
 
   * Renamed hcbase_p.mf to hcbase_pc.mf so that Hebrew support
-    will work properly with the hclassic font.
+    will work properly with the hclassic font. (Closes: #14014)
 
  -- Clint Adams <schizo@debian.org>  Tue, 17 Feb 1998 21:21:37 -0500
 
reverted:
--- arabtex-3.11/debian/conffiles
+++ arabtex-3.11.orig/debian/conffiles
@@ -1,2 +0,0 @@
-/etc/texmf/dvips/arabtex.map
-/etc/texmf/updmap.d/10arabtex.cfg
only in patch2:
unchanged:
--- arabtex-3.11.orig/debian/preinst
+++ arabtex-3.11/debian/preinst
@@ -0,0 +1,46 @@
+#!/bin/sh -e
+
+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/arabtex.map 42298450172bb0f033c4844ded62280e /etc/texmf/fonts/map/dvips/
+	;;
+    abort-upgrade)
+	;;
+
+    *)
+	echo "preinst called with unknown argument \`$1'" >&2
+	exit 1
+	;;
+esac
+
+#DEBHELPER#
+
+exit 0
+
only in patch2:
unchanged:
--- arabtex-3.11.orig/debian/compat
+++ arabtex-3.11/debian/compat
@@ -0,0 +1 @@
+4

Reply to: