~ubuntu-branches/ubuntu/hardy/texlive-extra/hardy

« back to all changes in this revision

Viewing changes to debian/common.functions

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2006-05-11 00:12:10 UTC
  • Revision ID: james.westby@ubuntu.com-20060511001210-exigq6ozuc7qn0at
Tags: 2005-2
* first upload to unstable, sponsored by 
  Frank Küster <frank@debian.org>
* texdoc support
  - let tetex texdoc find documentation of texlive (Closes: #364776)
  - include tetex texdoc patches (following of symlinks, security
    fixes) (Closes: #356390)
* texlive-lang-polish conflicts with octave-forge as both provide
  /usr/bin/mex, this is preliminary, a better solution must be
  sought (Closes: #364059)
* change shell for the reportbug script to bash (Closes: #356391)
* fix installation of thumbpdf and pdfcrop (Closes: #352092)
* improve various descriptions (Closes: #354964)
* call the update-* programs in all postinst scripts, so that the
  config files do not contain left-overs (Closes: #355266)
* fix creation of formats which in turn depend on the latex format
  (Closes: #351707)
* remap the ibycus4.map TeX/MF input file from the fonts/map location
  to the fonts/source location (Closes: #354652)
* depend on the updated lmodern package, thus making the fonts
  available for X (Closes: #351727)
* lots of internal changes, important ones being:
  - texlive packages now do not include files which have been
    packaged for Debian already (eg cm-super, lmodern, musixtex)
  - most packages can be used together with teTeX
  - fix several upstream bugs
  - generate license information for each file from the
    TeX Catalogue (ongoing work)
  for detailed changes see CHANGES.packaging in texlive-common

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# common.functions start
 
2
 
 
3
#
 
4
# build_format_if_format_exists
 
5
# $1 = fmtutil mode switch: --byfmt | --byhyphen | --all
 
6
# $2 = name of the format
 
7
# $3 = possible additional options (byhyphen -> hyphenfile)
 
8
build_format_if_format_exists ()
 
9
{
 
10
    #X=`fmtutil-sys --listcfg | grep "^$2[[:space:]]" || true`
 
11
    v=`kpsewhich -var-value TEXMFSYSVAR`
 
12
    c=`kpsewhich -var-value TEXMFSYSCONFIG`
 
13
    TEXMFVAR="$v"
 
14
    TEXMFCONFIG="$c"
 
15
    export TEXMFVAR TEXMFCONFIG
 
16
    fmtcnffile=`kpsewhich --format='web2c files' fmtutil.cnf`
 
17
    X=`grep "^[[:space:]]*$2[[:space:]]" $fmtcnffile || true`
 
18
    if [ ! "X$X" = "X" ] ; then
 
19
        if [ "X$1" = "X--byhyphen" ] ; then
 
20
            build_format --byhyphen $3
 
21
        else
 
22
            build_format $1 $2
 
23
        fi
 
24
    fi
 
25
}
 
26
 
 
27
build_format_if_file_exists ()
 
28
{
 
29
    X=`kpsewhich $3 || true`
 
30
    if [ ! "X$X" = "X" ] ; then
 
31
        build_format $1 $2
 
32
    fi
 
33
}
 
34
 
 
35
build_format ()
 
36
{
 
37
    tempfile=`mktemp -p /tmp texlive.fmtutil.XXXXXXXX`
 
38
    printf "Building format(s) $1 `basename "$2"`. This may take some time..."
 
39
    if fmtutil-sys $1 $2 > $tempfile 2>&1 ; then
 
40
        rm -f $tempfile
 
41
        echo " done."
 
42
    else
 
43
        echo
 
44
        echo "fmtutil-sys failed. Output has been stored in"
 
45
        echo "$tempfile"
 
46
        echo "Please include this file if you report a bug."
 
47
        echo
 
48
        exit 1
 
49
    fi
 
50
}
 
51
 
 
52
check_run_without_errors ()
 
53
{
 
54
    tempfile=`mktemp -p /tmp texlive.checkrun.XXXXXXXX`
 
55
    if which $1  >/dev/null; then
 
56
        printf "Running $*. This may take some time..."
 
57
        set +e
 
58
        $* > $tempfile 2>&1
 
59
        if [ $? = 0 ] ; then
 
60
          rm -f $tempfile
 
61
          echo " done."
 
62
        else
 
63
          echo
 
64
          echo "$* failed. Output has been stored in"
 
65
          echo "$tempfile"
 
66
          echo "If tex-common is not configured you can ignore this error message!"
 
67
          echo "Otherwise please include this file if you report a bug."
 
68
          echo
 
69
        fi
 
70
        set -e
 
71
    else
 
72
        rm -f $tempfile
 
73
    fi
 
74
    return 0
 
75
}
 
76
 
 
77
# stolen from tetex common.functions.in
 
78
create_fontmaps ()
 
79
{
 
80
    tempfile=`mktemp -p /tmp texlive.updmap.XXXXXXXX`
 
81
    printf "Running updmap-sys. This may take some time..."
 
82
    if updmap-sys > $tempfile 2>&1 ; then
 
83
      rm -f $tempfile
 
84
      echo " done."
 
85
    else
 
86
      echo
 
87
      echo "updmap failed. Output has been stored in"
 
88
      echo "$tempfile"
 
89
      echo "Please include this file if you report a bug."
 
90
      echo
 
91
      exit 1
 
92
    fi
 
93
}
 
94
 
 
95
update_lsr_files ()
 
96
{
 
97
    tempfile=`mktemp -p /tmp texlive.mktexlsr.XXXXXXXX`
 
98
    printf "Running mktexlsr. This may take some time..."
 
99
    if mktexlsr /usr/share/texmf /usr/share/texmf-texlive /var/lib/texmf > $tempfile 2>&1 ; then
 
100
         rm -f $tempfile
 
101
         echo " done."
 
102
    else
 
103
          echo
 
104
          echo "mktexlsr failed. Output has been stored in"
 
105
          echo "$tempfile"
 
106
          echo "Please include this file if you report a bug."
 
107
          echo
 
108
          exit 1
 
109
    fi
 
110
}
 
111
 
 
112
# common.functions end