[subversion-commit] SVN tetex commit + diffs: r164 -
make-texfontpkg/trunk/scripts tex-common/trunk/scripts
Ralf Stubner
stubner-guest at costa.debian.org
Wed Aug 24 14:55:57 UTC 2005
Author: stubner-guest
Date: 2005-08-24 14:55:57 +0000 (Wed, 24 Aug 2005)
New Revision: 164
Added:
make-texfontpkg/trunk/scripts/mk-tex-fontpack
Removed:
tex-common/trunk/scripts/mk-tex-fontpack
Log:
move mk-tex-fontpack to its own directory
Copied: make-texfontpkg/trunk/scripts/mk-tex-fontpack (from rev 163, tex-common/trunk/scripts/mk-tex-fontpack)
Deleted: tex-common/trunk/scripts/mk-tex-fontpack
===================================================================
--- tex-common/trunk/scripts/mk-tex-fontpack 2005-08-24 14:55:18 UTC (rev 163)
+++ tex-common/trunk/scripts/mk-tex-fontpack 2005-08-24 14:55:57 UTC (rev 164)
@@ -1,190 +0,0 @@
-#!/bin/bash
-#
-# mk-tex-fontpack
-#
-# generate a debian package of a font pack, i.e. from a TDS 1.1 compliant tree
-# of fonts
-#
-# (C) 2005 Norbert Preining
-# GPL
-#
-
-if [ "$DEBFULLNAME" ] ; then
- name=$DEBFULLNAME
-else
- name=`awk -F : "/$LOGNAME/ {print \\$5}" /etc/passwd`
-fi
-
-if [ "$DEBEMAIL" ] ; then
- email=$DEBEMAIL
-else
- email="$LOGNAME@`hostname`"
-fi
-
-shopt -s nullglob
-
-usage() {
- echo "usage: `basename $0` [-r n] tds-dir packname"
-}
-
-revision=1
-
-if [ "X$1" = "X-r" ] ; then
- shift
- revision=$1
- shift
-fi
-
-tdsdir=`echo $1 | sed "s|/$||"`
-packname="tex-fontpack-$2"
-
-if [ "X$tdsdir" = "X" -o "X$2" = "X" ] ; then
- usage
- exit 1
-fi
-
-
-tmpdir=`mktemp -d`
-mkdir -p $tmpdir/debian/$packname/usr/share/texmf
-
-mapfiles=""
-fontfiles=""
-afmfiles=""
-for f in `find $tdsdir -type f` ; do
- # $nn: final location of $f without leading slash
- # $mapfiles: list of .map files
- # $fontfiles, $afmfiles: list of font and .afm files *with path*
- # relative to TEXMF
- case $f in
- $tdsdir/fonts/map/*)
- nn=`echo $f | sed -e "s|$tdsdir/fonts|etc/texmf|"`
- mapfiles="$mapfiles `basename $f`"
- ;;
- $tdsdir/fonts/type1/*)
- nn=`echo $f | sed -e "s|$tdsdir/||"`
- fontfiles="$fontfiles $nn"
- nn="usr/share/texmf/$nn"
- ;;
- $tdsdir/fonts/afm/*)
- nn=`echo $f | sed -e "s|$tdsdir/||"`
- afmfiles="$afmfiles $nn"
- nn="usr/share/texmf/$nn"
- ;;
- $tdsdir/doc/*)
- nn=`echo $f | sed -e "s|$tdsdir/doc|usr/share/doc/texmf|"`
- ;;
- *)
- nn=`echo $f | sed -e "s|$tdsdir|usr/share/texmf|"`
- ;;
- esac
- mkdir -p `dirname "$tmpdir/debian/$packname/$nn"`
- cp -p $f `dirname "$tmpdir/debian/$packname/$nn"`
-done
-
-# configure map files for Debian
-if [ ! "X$mapfiles" = "X" ] ; then
- mkdir -p $tmpdir/debian/$packname/etc/texmf/updmap.d
- cat > $tmpdir/debian/$packname/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" >> $tmpdir/debian/$packname/etc/texmf/updmap.d/50$packname.cfg
- done
-
- mkdir -p $tmpdir/debian/$packname/var/lib/tex-common/fontmap-cfg
- echo "50$packname" > $tmpdir/debian/$packname/var/lib/tex-common/fontmap-cfg/$packname.list
-fi
-
-# create links in /usr/X11R6/lib/X11/fonts/Type1 and fonts.scale
-if [ ! "X$fontfiles" = "X" ] ; then
- mkdir -p $tmpdir/debian/$packname/usr/X11R6/lib/X11/fonts/Type1
- mkdir -p $tmpdir/debian/$packname/etc/X11/fonts/Type1
- for f in $fontfiles $afmfiles ; do
- ln -s ../../../../../share/texmf/$f \
- $tmpdir/debian/$packname/usr/X11R6/lib/X11/fonts/Type1
- done
- mkfontscale $tmpdir/debian/$packname/usr/X11R6/lib/X11/fonts/Type1
- mv $tmpdir/debian/$packname/usr/X11R6/lib/X11/fonts/Type1/fonts.scale \
- $tmpdir/debian/$packname/etc/X11/fonts/Type1/$packname.scale
-fi
-
-# create essential debian/* files
-
-cat > $tmpdir/debian/copyright <<EOF
-This package was debianized by $name <$email>
-on `date -R` with the help of `basename $0`.
-
-Most likely it contains commercial fonts which one is not allowed to
-distribute.
-EOF
-
-cat > $tmpdir/debian/changelog <<EOF
-$packname ($revision) unstable; urgency=low
-
- * packed by `basename $0`
-
- -- $name <$email> `date -R`
-EOF
-
-echo "4" > $tmpdir/debian/compat
-
-cat > $tmpdir/debian/control <<EOF
-Source: $packname
-Section: non-free/tex
-Priority: optional
-Maintainer: $name <$email>
-Standards-Version: 3.6.2.1
-
-Package: $packname
-Architecture: all
-Depends: tex-common, tetex-base | texlive-basic, xutils (>= 4.0.3)
-Description: Font Pack $2
- This package provides the fonts from font pack $2.
-EOF
-
-cat > $tmpdir/debian/postinst <<EOF
-#!/bin/sh
-test -e /usr/bin/mktexlsr && mktexlsr /usr/share/texmf
-update-updmap --quiet
-updmap-sys --quiet
-#DEBHELPER#
-exit 0
-EOF
-
-cat > $tmpdir/debian/postrm <<EOF
-#!/bin/sh
-test -e /usr/bin/mktexlsr && mktexlsr /usr/share/texmf
-if [ ! "X$1" = "Xupgrade" ] ; then
- update-updmap --quiet
- echo -n "Running updmap... "
- updmap-sys --quiet
- echo "done."
-fi
-#DEBHELPER#
-exit 0
-EOF
-
-echo "Changing to $tmpdir."
-cd $tmpdir
-fakeroot dh_testdir
-fakeroot dh_testroot
-fakeroot dh_installxfonts
-fakeroot dh_installdocs
-fakeroot dh_installchangelogs
-fakeroot dh_compress
-fakeroot dh_fixperms
-fakeroot dh_installdeb
-fakeroot dh_gencontrol
-fakeroot dh_md5sums
-fakeroot dh_builddeb
-
-#rm -rf $tmpdir
-
More information about the Pkg-tetex-commits
mailing list