SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "noto-serif"

# SliTaz package receipt.

PACKAGE="noto-serif"
VERSION="1.06"
COMMIT="0af3d5f"
CATEGORY="fonts"
SHORT_DESC="Noto Serif TrueType fonts"
MAINTAINER="al.bobylev@gmail.com"
LICENSE="OFL"
WEB_SITE="http://www.google.com/get/noto/"
font=Regular
TARBALL="NotoSerif-$font-$VERSION.ttf"
EXTRA_SOURCE_FILES="NotoSerif-Bold-$VERSION.ttf NotoSerif-Italic-$VERSION.ttf NotoSerif-BoldItalic-$VERSION.ttf"
WGET_URL="https://github.com/googlei18n/noto-fonts/raw/$COMMIT/hinted/NotoSerif-$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/NotoSerif-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 "0af3d5f" bumped version of "NotoSerif-*" fonts to "1.06"
    # (NotoSerif-Italic was bumped to 1.07):
    # https://github.com/googlei18n/noto-fonts/commit/0af3d5fd0830eaeb1825044b2f4c04125eacf08f

    mv $TARBALL NotoSerif-Regular.ttf
    for font in Bold Italic BoldItalic; do
         get_file="NotoSerif-$font.ttf"
        save_file="NotoSerif-$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
}
6047 packages and 209931 files in current database (Mon Jul 1 15:25:36 2024)