wok view get-msttcorefonts/stuff/get-msttcorefonts @ rev 24979
Update some wget_url
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat May 07 20:53:56 2022 +0000 (2022-05-07) |
parents | 3fb94ab57a3c |
children |
line source
1 #!/bin/sh
3 . /lib/libtaz.sh
5 PACKAGE="msttcorefonts"
6 VERSION="3.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 andale arial arialb comic courie georgi impact times trebuc verdan webdin wd97vwr; do
19 busybox wget "http://downloads.sourceforge.net/corefonts/${filename}32.exe"
20 cabextract -L ${filename}32.exe
21 find "$fontdir" -type f -name '*.cab' -exec cabextract -L \{\} \;
22 find "$fontdir" -type f ! -name '*.ttf' -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="Microsoft's TrueType core fonts"
34 MAINTAINER="rocky@slitaz.org"
35 LICENSE="non-free"
36 WEB_SITE="http://sourceforge.net/projects/corefonts"
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