From 13bd61d1210b357a47bd03032ef6f29bd0a3e436 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Mon, 15 Jan 2024 16:14:45 +0100 Subject: [PATCH] add firacode nerdfont package --- .woodpecker/build.yml | 1 + srcpkgs/font-firacode-nf-ttf/template | 34 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 srcpkgs/font-firacode-nf-ttf/template diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml index 42118e1a279..243b49d2d2f 100644 --- a/.woodpecker/build.yml +++ b/.woodpecker/build.yml @@ -3,6 +3,7 @@ matrix: - brave-bin - tidal-hifi-bin - ferdium-bin + - font-firacode-nf-ttf when: - event: push diff --git a/srcpkgs/font-firacode-nf-ttf/template b/srcpkgs/font-firacode-nf-ttf/template new file mode 100644 index 00000000000..e83ea5152a9 --- /dev/null +++ b/srcpkgs/font-firacode-nf-ttf/template @@ -0,0 +1,34 @@ +# Template file for 'font-firacode-nf-ttf' +pkgname=font-firacode-nf-ttf +version=3.1.1 +revision=1 +homepage="https://nerdfonts.com/" +license="MIT" +depends="font-util" +short_desc="NerdFont patched Fira Code font" +maintainer="luca " +distfiles="https://github.com/ryanoasis/nerd-fonts/releases/download/v${version}/FiraCode.tar.xz" +conflicts="nerd-fonts-ttf" + +pre_fetch() { + if ! cd "$XBPS_SRCDISTDIR"; then + msg_error "$pkgver: cannot change dir to $XBPS_BUILDDIR!\n" + exit 1 + fi + + url="${distfiles}" + distfile="$(basename "$url")" + + flock "${distfile}.part" $fetch_cmd "$url" + flock -n "${distfile}.part" rm -f "${distfile}.part" + + checksum=$(${XBPS_DIGEST_CMD} "$distfile") + + mkdir -p "$XBPS_SRCDISTDIR/by_sha256" + mv "$distfile" "$XBPS_SRCDISTDIR/by_sha256/${checksum}_${distfile}" +} + +do_install() { + vmkdir usr/share/fonts/NerdFonts/ttf/symbols + vcopy "*.ttf" usr/share/fonts/NerdFonts/ttf/symbols +}