# SliTaz package receipt. PACKAGE="noto-sans" VERSION="1.06" COMMIT="ad153f5" CATEGORY="fonts" SHORT_DESC="Noto Sans TrueType fonts" MAINTAINER="al.bobylev@gmail.com" LICENSE="OFL" WEB_SITE="http://www.google.com/get/noto/" font=Regular TARBALL="NotoSans-$font-$VERSION.ttf" EXTRA_SOURCE_FILES="NotoSans-Bold-$VERSION.ttf NotoSans-Italic-$VERSION.ttf NotoSans-BoldItalic-$VERSION.ttf" WGET_URL="https://github.com/googlei18n/noto-fonts/raw/$COMMIT/hinted/NotoSans-$font.ttf" TAGS="font" SIBLINGS="noto-serif" # What is the latest version available today? current_version() { wget -O - https://github.com/googlei18n/noto-fonts/releases 2>/dev/null | \ sed '/archive.*tar/!d;s|.*/[A-Za-z_-]*\(.*\).tar.*|\1|;q' } # Rules to configure and make the package. compile_rules() { # The Noto font web site provides downloads: # https://noto-website-2.storage.googleapis.com/pkgs/NotoSans-hinted.zip # But these files are not versioned, so we never know which version we are # currently to package. # In other hand, Github project provides versioned downloads, but only in # form of "all in one" huge file. # Solution: download individual versioned font files from Github project. # This commit "ad153f5" bumped version of "NotoSans-*" fonts to "1.06": # https://github.com/googlei18n/noto-fonts/commit/ad153f5a14c838afb16c83f0a02784c7605f1e21 mv $TARBALL NotoSans-Regular.ttf for font in Bold Italic BoldItalic; do get_file="NotoSans-$font.ttf" save_file="NotoSans-$font-$VERSION.ttf" url="https://github.com/googlei18n/noto-fonts/raw/$COMMIT/hinted/$get_file" [ -e "$SRC/$save_file" ] || wget -T 30 -O "$SRC/$save_file" $url [ -e "$SRC/$save_file" ] || exit 1 cp "$SRC/$save_file" "$src/$get_file" done # Install f=$install/usr/share/fonts/truetype/noto mkdir -p $f cp -a $src/*.ttf $f } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { cook_copy_files *.ttf }