From 77ff518d374cc57eead5062aace02ce8d73c8f00 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Wed, 25 Mar 2026 18:23:22 +0200 Subject: [PATCH] Initial commit --- .gitignore | 3 +++ check-version.sh | 12 ++++++++++++ pkg.info | 18 ++++++++++++++++++ source.sh | 15 +++++++++++++++ 4 files changed, 48 insertions(+) create mode 100644 .gitignore create mode 100644 check-version.sh create mode 100644 pkg.info create mode 100644 source.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9d96df7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# Ignore BPM archives and signatures +*.bpm +*.bpm.sig diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..791a320 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Github repository +REPO="notofonts/noto-cjk" + +# Get tag name using Github Rest API +TAG_NAME=$(curl -s -L -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/"$REPO"/releases | jq -r '.[].tag_name' | grep '^Serif' | head -n1) + +# Trim prefix +VERSION=${TAG_NAME//Serif/} + +echo "$VERSION" diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..b6cc99d --- /dev/null +++ b/pkg.info @@ -0,0 +1,18 @@ +name: noto-fonts-cjk-serif +description: Google Noto Serif CJK fonts +version: "2.003" +revision: 1 +url: https://fonts.google.com/noto +license: OFL-1.1 +maintainers: + - enumdev@enumerated.dev +architecture: any +output_architecture: any +type: source +downloads: + - url: https://github.com/notofonts/noto-cjk/releases/download/Serif${BPM_PKG_VERSION}/02_NotoSerifCJK-OTF-VF.zip + extract_to: ${BPM_SOURCE}/variable + checksum: 7898cfb54156cc0d8a2f2c00d5645c573ff367d03d29085bb495966d99d2529e + - url: https://github.com/notofonts/noto-cjk/releases/download/Serif2.003/04_NotoSerifCJKOTC.zip + extract_to: ${BPM_SOURCE}/static + checksum: c76ed8fd491ce98182ec6430238b90a1eabea8857c7db64e9037efa38e198a31 diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..49b1311 --- /dev/null +++ b/source.sh @@ -0,0 +1,15 @@ +# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package +# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE +# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT + +# The package function is executed in the source directory +# This function is used to move the compiled files into the output directory +package() { + # Install fonts + install -d "$BPM_OUTPUT"/usr/share/fonts/noto + install -m644 static/OTC/*.ttc -t "$BPM_OUTPUT"/usr/share/fonts/noto + install -m644 variable/Variable/OTC/*.ttc -t "$BPM_OUTPUT"/usr/share/fonts/noto + + # Install package license + install -Dm644 "$BPM_SOURCE"/variable/LICENSE "$BPM_OUTPUT"/usr/share/licenses/noto-fonts-cjk-serif/LICENSE +}