wok-current view get-msttcorefonts2/stuff/get-msttcorefonts2 @ rev 23728

updated vzquota (3.0.12 -> 3.1)
author Hans-G?nter Theisgen
date Fri May 01 06:58:50 2020 +0100 (2020-05-01)
parents
children
line source
1 #!/bin/sh
3 . /lib/libtaz.sh
5 PACKAGE="msttcorefonts2"
6 VERSION="1.0"
7 CUR_DIR=$(pwd)
8 TEMP_DIR="$(mktemp -d)"
9 ROOT="$1"
11 # Check if we are root
12 check_root
14 fontdir="$TEMP_DIR/$PACKAGE-$VERSION/fs/usr/share/fonts/truetype/$PACKAGE"
15 mkdir -p "$fontdir"
16 cd "$fontdir"
18 for filename in EUupdate.EXE PowerPointViewer.exe; do
19 busybox wget "http://downloads.sourceforge.net/mscorefonts2/$filename"
20 cabextract -L $filename
21 find "$fontdir" -type f -name '*.cab' -exec cabextract -L \{\} \;
22 find "$fontdir" -type f ! \( -name '*.ttf' -o -name '*.ttc' \) -delete
23 done
25 cd $TEMP_DIR
27 cat > $PACKAGE-$VERSION/receipt <<EOT
28 # SliTaz package receipt.
30 PACKAGE="$PACKAGE"
31 VERSION="$VERSION"
32 CATEGORY="non-free"
33 SHORT_DESC="Updated Microsoft's TrueType core fonts"
34 MAINTAINER="al.bobylev@gmail.com"
35 LICENSE="non-free"
36 WEB_SITE="http://sourceforge.net/projects/mscorefonts2/"
37 TAGS="fonts"
39 DEPENDS="fontconfig"
41 # Pre and post install commands for Tazpkg.
42 post_install()
43 {
44 chroot "\$1/" /usr/bin/fc-cache /usr/share/fonts/truetype/$PACKAGE
45 }
46 EOT
48 # Pack
49 tazpkg pack $PACKAGE-$VERSION gzip
51 # Clean to save RAM memory
52 rm -rf $PACKAGE-$VERSION
54 # Install pseudo package
55 yes y | tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
57 # Clean
58 cd $CUR_DIR
59 rm -rf $TEMP_DIR