wok view noto-serif/receipt @ rev 25037

Up glza (0.11.4)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat May 21 21:38:29 2022 +0000 (23 months ago)
parents ba1e68274f76
children 7364ffdaaa60
line source
1 # SliTaz package receipt.
3 PACKAGE="noto-serif"
4 VERSION="1.06"
5 COMMIT="0af3d5f"
6 CATEGORY="fonts"
7 SHORT_DESC="Noto Serif TrueType fonts"
8 MAINTAINER="al.bobylev@gmail.com"
9 LICENSE="OFL"
10 WEB_SITE="http://www.google.com/get/noto/"
11 font=Regular
12 TARBALL="NotoSerif-$font-$VERSION.ttf"
13 EXTRA_SOURCE_FILES="NotoSerif-Bold-$VERSION.ttf NotoSerif-Italic-$VERSION.ttf NotoSerif-BoldItalic-$VERSION.ttf"
14 WGET_URL="https://github.com/googlei18n/noto-fonts/raw/$COMMIT/hinted/NotoSerif-$font.ttf"
15 TAGS="font"
17 SIBLINGS="noto-serif"
19 # What is the latest version available today?
20 current_version()
21 {
22 wget -O - https://github.com/googlei18n/noto-fonts/releases 2>/dev/null | \
23 sed '/archive.*tar/!d;s|.*/[A-Za-z_-]*\(.*\).tar.*|\1|;q'
24 }
26 # Rules to configure and make the package.
27 compile_rules()
28 {
29 # The Noto font web site provides downloads:
30 # https://noto-website-2.storage.googleapis.com/pkgs/NotoSerif-hinted.zip
31 # But these files are not versioned, so we never know which version we are
32 # currently to package.
34 # In other hand, Github project provides versioned downloads, but only in
35 # form of "all in one" huge file.
37 # Solution: download individual versioned font files from Github project.
38 # This commit "0af3d5f" bumped version of "NotoSerif-*" fonts to "1.06"
39 # (NotoSerif-Italic was bumped to 1.07):
40 # https://github.com/googlei18n/noto-fonts/commit/0af3d5fd0830eaeb1825044b2f4c04125eacf08f
42 mv $TARBALL NotoSerif-Regular.ttf
43 for font in Bold Italic BoldItalic; do
44 get_file="NotoSerif-$font.ttf"
45 save_file="NotoSerif-$font-$VERSION.ttf"
46 url="https://github.com/googlei18n/noto-fonts/raw/$COMMIT/hinted/$get_file"
47 [ -e "$SRC/$save_file" ] || wget -T 30 -O "$SRC/$save_file" $url
48 [ -e "$SRC/$save_file" ] || exit 1
49 cp "$SRC/$save_file" "$src/$get_file"
50 done
52 # Install
54 f=$install/usr/share/fonts/truetype/noto
55 mkdir -p $f
56 cp -a $src/*.ttf $f
57 }
59 # Rules to gen a SliTaz package suitable for Tazpkg.
60 genpkg_rules()
61 {
62 cook_copy_files *.ttf
63 }