[subversion-commit] SVN tetex commit + diffs: r458 -
make-texfontpkg/trunk/scripts
Ralf Stubner
stubner-guest at costa.debian.org
Sun Jan 15 15:42:59 UTC 2006
Author: stubner-guest
Date: 2006-01-15 15:42:59 +0000 (Sun, 15 Jan 2006)
New Revision: 458
Modified:
make-texfontpkg/trunk/scripts/mk-tex-fontpack
Log:
* use dh_installtexfonts
* don't treat map files as config files
* some sanity checks
Modified: make-texfontpkg/trunk/scripts/mk-tex-fontpack
===================================================================
--- make-texfontpkg/trunk/scripts/mk-tex-fontpack 2006-01-13 11:49:26 UTC (rev 457)
+++ make-texfontpkg/trunk/scripts/mk-tex-fontpack 2006-01-15 15:42:59 UTC (rev 458)
@@ -84,6 +84,8 @@
mapfiles=""
fontfiles=""
afmfiles=""
+
+echo "Copying files to $tmproot."
for f in `find $tdsdir -type f` ; do
# $nn: final location of $f without leading slash
# $mapfiles: list of .map files
@@ -91,7 +93,7 @@
# relative to TEXMF
case $f in
$tdsdir/fonts/map/dvips/*)
- nn=`echo $f | sed -e "s|$tdsdir/fonts|etc/texmf|"`
+ nn=`echo $f | sed -e "s|$tdsdir|usr/share/texmf|"`
mapfiles="$mapfiles `basename $f`"
;;
@@ -126,24 +128,12 @@
# configure map files for Debian
if [ ! "X$mapfiles" = "X" ] ; then
- mkdir -p $tmproot/etc/texmf/updmap.d
- cat > $tmproot/etc/texmf/updmap.d/50$packname.cfg <<EOF
-#
-# 50$packname.cfg
-# You can change/add entries to this file and changes will be preserved
-# over upgrades, even if you have removed the main package prior
-# (not if you purged it). You should leave the following pseudo comment
-# present in the file!
-# -_- DebPkgProvidedMaps -_-
-#
-EOF
-
for m in $mapfiles ; do
- echo "Map $m" >> $tmproot/etc/texmf/updmap.d/50$packname.cfg
+ echo "Map $m" >> $tmpdir/debian/$packname.maps
done
-
- mkdir -p $tmproot/var/lib/tex-common/fontmap-cfg
- echo "50$packname" > $tmproot/var/lib/tex-common/fontmap-cfg/$packname.list
+else
+ echo "No map files found. Exiting ..."
+ exit 0
fi
if [ ! "X$fontfiles" = "X" ] ; then
@@ -179,9 +169,13 @@
defoma-hints --no-question type1 \
$tmproot/usr/share/fonts/type1/$packname/*.pf[ab] | \
sed -e "s|$tmproot||" > $tmpdir/debian/$packname.defoma-hints
+else
+ echo "No font files found. Exiting ..."
+ exit 0
fi
# create essential debian/* files
+# maintainer scripts are created by debhelper scripts
cat > $tmpdir/debian/copyright <<EOF
This package was debianized by $name <$email>
@@ -210,86 +204,18 @@
Package: $packname
Architecture: all
-Depends: tex-common, defoma (>= 0.7.0), xutils (>= 4.0.3)
+Depends: defoma (>= 0.7.0), \${misc:Depends}
Description: Font Pack $2
This package provides the fonts from font pack $2.
EOF
-cat > $tmpdir/debian/postinst <<EOF
-#!/bin/sh
-set -e
-update_fontmaps()
-{
- update-updmap --quiet
- if which mktexlsr >/dev/null; then mktexlsr; fi
- if which updmap-sys >/dev/null; then
- printf "Running updmap... "
- updmap-sys --quiet
- echo "done."
- fi
-
- return 0
-}
-
-case "\$1" in
- configure|abort-upgrade|abort-remove|abort-deconfigure)
- update_fontmaps
- ;;
-
- *)
- echo "postinst called with unknown argument '\$1'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-exit 0
-EOF
-
-cat > $tmpdir/debian/postrm <<EOF
-#!/bin/sh
-set -e
-
-try_to_update_fontmaps()
-{
- update-updmap --quiet || true
- mktexlsr || true
- printf "Running updmap... "
- updmap-sys --quiet || true
- echo "done."
-
- return 0
-}
-
-case "\$1" in
- remove|disappear)
- try_to_update_fontmaps
- ;;
-
- purge)
- # No need to call try_to_update_fontmaps, since 'remove' is called
- # before 'purge'.
- ;;
-
- upgrade|failed-upgrade|abort-upgrade|abort-install)
- ;;
-
- *)
- echo "postrm called with unknown argument '\$1'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-exit 0
-EOF
-
echo "Changing to $tmpdir."
cd $tmpdir
fakeroot dh_testdir
fakeroot dh_testroot
fakeroot dh_link
+fakeroot dh_installtexfonts
fakeroot dh_installxfonts
fakeroot dh_installdefoma
fakeroot dh_installdocs
More information about the Pkg-tetex-commits
mailing list