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