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