From a0ab983f0147094d70a20a35d4e451f5d9ff36ba Mon Sep 17 00:00:00 2001 From: EnumDev Date: Wed, 25 Mar 2026 18:31:32 +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..397ae03 --- /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 '^Sans' | head -n1) + +# Trim prefix +VERSION=${TAG_NAME//Sans/} + +echo "$VERSION" diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..5bab24d --- /dev/null +++ b/pkg.info @@ -0,0 +1,18 @@ +name: noto-fonts-cjk-sans +description: Google Noto Sans CJK fonts +version: "2.004" +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/Sans${BPM_PKG_VERSION}/01_NotoSansCJK-OTF-VF.zip + extract_to: ${BPM_SOURCE}/variable + checksum: d5e33aebad9f8a0c0896a4a29199ef85ca966134db164426c74e83e6f13c43cd + - url: https://github.com/notofonts/noto-cjk/releases/download/Sans${BPM_PKG_VERSION}/03_NotoSansCJK-OTC.zip + extract_to: ${BPM_SOURCE}/static + checksum: 528f4e1b25ff3badb0321b38d015d954c4c0de926c7830ef50e4a1948f6a3eed diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..5aefd1e --- /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/*.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-sans/LICENSE +}