wok-next view ttf-dejavu-lgc/receipt @ rev 21727
created recipe for vbindiff
author | Hans-G?nter Theisgen |
---|---|
date | Sat Nov 21 14:32:44 2020 +0100 (2020-11-21) |
parents | cd7906120828 |
children |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="ttf-dejavu-lgc"
4 VERSION="2.37"
5 CATEGORY="fonts"
6 SHORT_DESC="DejaVu LGC (Latin, Greek, Cyrillic) TrueType fonts"
7 MAINTAINER="al.bobylev@gmail.com"
8 LICENSE="other"
9 WEB_SITE="https://dejavu-fonts.github.io/"
10 REPOLOGY="fonts:dejavu-lgc"
12 TARBALL="dejavu-lgc-fonts-ttf-$VERSION.tar.bz2"
13 WGET_URL="$SF_MIRROR/dejavu/$TARBALL"
15 BUILD_DEPENDS="shared-mime-info fontforge"
16 SPLIT="$PACKAGE-extra"
18 compile_rules() {
19 # Install/repack fonts
21 f=$install/usr/share/fonts/truetype/ttf-dejavu
22 mkdir -p $f
23 for font in $src/ttf/*.ttf; do
24 size1=$(ls -l $font | awk '{print $5}')
25 a="$a\n$(printf "%-32s" $(basename $font .ttf)): $size1 B -> "
26 echo "Processing $(basename $font):"
27 # About FontForge scripting and this command, see:
28 # https://fontforge.github.io/scripting-alpha.html#Generate
29 fontforge -quiet -lang=ff -c 'Open($1); Generate($2,"",0x90)' \
30 $font $f/$(basename $font)
31 size2=$(ls -l $f/$(basename $font) | awk '{print $5}')
32 a="$a$size2 B ($(( $size2 - $size1 )) B)"
33 echo
34 done
35 echo -e "\nResults:\n========\n$a"
37 # Install available configurations
39 f=$install/usr/share/fontconfig/conf.avail
40 mkdir -p $f
41 cp $src/fontconfig/*.conf $f
43 tmp=$(mktemp)
45 # Strip *.conf files
46 for i in $install/usr/share/fontconfig/conf.avail/*; do
47 # <?xml version="1.0" encoding="UTF-8"?>
48 sed -i 's| encoding="UTF-8"||' $i # remove needless encoding
49 # <!DOCTYPE fontconfig SYSTEM "../fonts.dtd">
50 sed -i 's|\.\./||' $i # remove "../"
52 tr -d '\n' < $i | sed 's|[ \t][ \t]*| |g' | \
53 sed 's|<!--|\n&|g; s|-->|&\n|g' | sed '/<!--/d' | \
54 tr -d '\n' | sed 's|> *<|><|g' > $tmp
55 cat $tmp > $i
56 done
58 rm $tmp
60 # Use the configurations
61 f=$install/etc/fonts/conf.d
62 mkdir -p $f
63 for i in $src/fontconfig/*.conf; do
64 ln -s /usr/share/fontconfig/conf.avail/$(basename $i) $f/$(basename $i)
65 done
66 }
68 genpkg_rules() {
69 case $PACKAGE in
70 ttf-dejavu-lgc)
71 copy DejaVuLGCSans.ttf DejaVuLGCSans-Bold.ttf DejaVuLGCSansMono.ttf \
72 *sans.conf *mono.conf
73 TAGS="font"
74 PROVIDE="ttf-dejavu"
75 ;;
76 ttf-dejavu-lgc-extra)
77 copy @std @rm
78 CAT="fonts|extra font styles"
79 TAGS="font"
80 PROVIDE="ttf-dejavu-extra"
81 ;;
82 esac
83 }