wok-next view ttf-dejavu-lgc/receipt @ rev 20784

update also: gpgme, libgpg-error and gpa
author Erkan Yilmaz <erkan@slitaz.org>
date Sat Jun 09 06:52:39 2018 +0000 (2018-06-09)
parents c4e53a39395a
children cd7906120828
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/"
11 TARBALL="dejavu-lgc-fonts-ttf-$VERSION.tar.bz2"
12 WGET_URL="$SF_MIRROR/dejavu/$TARBALL"
14 BUILD_DEPENDS="shared-mime-info fontforge"
15 SPLIT="ttf-dejavu-lgc-extra"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 # Install/repack fonts
22 f=$install/usr/share/fonts/truetype/ttf-dejavu
23 mkdir -p $f
24 for font in $src/ttf/*.ttf; do
25 size1=$(ls -l $font | awk '{print $5}')
26 a="$a\n$(printf "%-32s" $(basename $font .ttf)): $size1 B -> "
27 echo "Processing $(basename $font):"
28 # About FontForge scripting and this command, see:
29 # https://fontforge.github.io/scripting-alpha.html#Generate
30 fontforge -quiet -lang=ff -c 'Open($1); Generate($2,"",0x90)' \
31 $font $f/$(basename $font)
32 size2=$(ls -l $f/$(basename $font) | awk '{print $5}')
33 a="$a$size2 B ($(( $size2 - $size1 )) B)"
34 echo
35 done
36 echo -e "\nResults:\n========\n$a"
38 # Install available configurations
40 f=$install/usr/share/fontconfig/conf.avail
41 mkdir -p $f
42 cp $src/fontconfig/*.conf $f
44 tmp=$(mktemp)
46 # Strip *.conf files
47 for i in $install/usr/share/fontconfig/conf.avail/*; do
48 # <?xml version="1.0" encoding="UTF-8"?>
49 sed -i 's| encoding="UTF-8"||' $i # remove needless encoding
50 # <!DOCTYPE fontconfig SYSTEM "../fonts.dtd">
51 sed -i 's|\.\./||' $i # remove "../"
53 tr -d '\n' < $i | sed 's|[ \t][ \t]*| |g' | \
54 sed 's|<!--|\n&|g; s|-->|&\n|g' | sed '/<!--/d' | \
55 tr -d '\n' | sed 's|> *<|><|g' > $tmp
56 cat $tmp > $i
57 done
59 rm $tmp
61 # Use the configurations
62 f=$install/etc/fonts/conf.d
63 mkdir -p $f
64 for i in $src/fontconfig/*.conf; do
65 ln -s /usr/share/fontconfig/conf.avail/$(basename $i) $f/$(basename $i)
66 done
67 }
69 # Rules to gen a SliTaz package suitable for Tazpkg.
70 genpkg_rules()
71 {
72 case $PACKAGE in
73 ttf-dejavu-lgc)
74 copy DejaVuLGCSans.ttf DejaVuLGCSans-Bold.ttf DejaVuLGCSansMono.ttf \
75 *sans.conf *mono.conf
76 TAGS="font"
77 PROVIDE="ttf-dejavu"
78 ;;
79 ttf-dejavu-lgc-extra)
80 copy @std @rm
81 CAT="fonts|extra font styles"
82 TAGS="font"
83 PROVIDE="ttf-dejavu-extra"
84 ;;
85 esac
86 }