From 35c271ed762a51023dda2728a4ac2ed166ebae32 Mon Sep 17 00:00:00 2001 From: windowsboy111 Date: Wed, 4 Jan 2023 14:35:26 +0800 Subject: [PATCH] Add nerd-fonts; Move discord-{canary,ptb} apps/ --- anda/{ => apps}/discord-canary/anda.hcl | 0 .../discord-canary/discord-canary.spec | 0 anda/{ => apps}/discord-canary/update.rhai | 0 anda/{ => apps}/discord-ptb/anda.hcl | 0 anda/{ => apps}/discord-ptb/discord-ptb.spec | 0 anda/{ => apps}/discord-ptb/update.rhai | 0 anda/{others => apps}/tectonic/anda.hcl | 0 anda/{others => apps}/tectonic/tectonic.spec | 0 anda/{others => apps}/tectonic/update.rhai | 0 anda/fonts/nerd-fonts/anda.hcl | 6 ++ anda/fonts/nerd-fonts/nerd-fonts.spec | 74 +++++++++++++++++++ anda/fonts/nerd-fonts/update.rhai | 1 + 12 files changed, 81 insertions(+) rename anda/{ => apps}/discord-canary/anda.hcl (100%) rename anda/{ => apps}/discord-canary/discord-canary.spec (100%) rename anda/{ => apps}/discord-canary/update.rhai (100%) rename anda/{ => apps}/discord-ptb/anda.hcl (100%) rename anda/{ => apps}/discord-ptb/discord-ptb.spec (100%) rename anda/{ => apps}/discord-ptb/update.rhai (100%) rename anda/{others => apps}/tectonic/anda.hcl (100%) rename anda/{others => apps}/tectonic/tectonic.spec (100%) rename anda/{others => apps}/tectonic/update.rhai (100%) create mode 100644 anda/fonts/nerd-fonts/anda.hcl create mode 100644 anda/fonts/nerd-fonts/nerd-fonts.spec create mode 100644 anda/fonts/nerd-fonts/update.rhai diff --git a/anda/discord-canary/anda.hcl b/anda/apps/discord-canary/anda.hcl similarity index 100% rename from anda/discord-canary/anda.hcl rename to anda/apps/discord-canary/anda.hcl diff --git a/anda/discord-canary/discord-canary.spec b/anda/apps/discord-canary/discord-canary.spec similarity index 100% rename from anda/discord-canary/discord-canary.spec rename to anda/apps/discord-canary/discord-canary.spec diff --git a/anda/discord-canary/update.rhai b/anda/apps/discord-canary/update.rhai similarity index 100% rename from anda/discord-canary/update.rhai rename to anda/apps/discord-canary/update.rhai diff --git a/anda/discord-ptb/anda.hcl b/anda/apps/discord-ptb/anda.hcl similarity index 100% rename from anda/discord-ptb/anda.hcl rename to anda/apps/discord-ptb/anda.hcl diff --git a/anda/discord-ptb/discord-ptb.spec b/anda/apps/discord-ptb/discord-ptb.spec similarity index 100% rename from anda/discord-ptb/discord-ptb.spec rename to anda/apps/discord-ptb/discord-ptb.spec diff --git a/anda/discord-ptb/update.rhai b/anda/apps/discord-ptb/update.rhai similarity index 100% rename from anda/discord-ptb/update.rhai rename to anda/apps/discord-ptb/update.rhai diff --git a/anda/others/tectonic/anda.hcl b/anda/apps/tectonic/anda.hcl similarity index 100% rename from anda/others/tectonic/anda.hcl rename to anda/apps/tectonic/anda.hcl diff --git a/anda/others/tectonic/tectonic.spec b/anda/apps/tectonic/tectonic.spec similarity index 100% rename from anda/others/tectonic/tectonic.spec rename to anda/apps/tectonic/tectonic.spec diff --git a/anda/others/tectonic/update.rhai b/anda/apps/tectonic/update.rhai similarity index 100% rename from anda/others/tectonic/update.rhai rename to anda/apps/tectonic/update.rhai diff --git a/anda/fonts/nerd-fonts/anda.hcl b/anda/fonts/nerd-fonts/anda.hcl new file mode 100644 index 0000000000..f733796b45 --- /dev/null +++ b/anda/fonts/nerd-fonts/anda.hcl @@ -0,0 +1,6 @@ +project "pkg" { + rpm { + spec = "nerd-fonts.spec" + update = "" + } +} diff --git a/anda/fonts/nerd-fonts/nerd-fonts.spec b/anda/fonts/nerd-fonts/nerd-fonts.spec new file mode 100644 index 0000000000..87d7c77435 --- /dev/null +++ b/anda/fonts/nerd-fonts/nerd-fonts.spec @@ -0,0 +1,74 @@ +%global flist 3270 Agave AnonymousPro Arimo AurulentSansMono BigBlueTerminal BitstreamVeraSansMono CascadiaCode CodeNewRoman Cousine DaddyTimeMono DejaVuSansMono DroidSansMono FantasqueSansMono FiraCode FiraMono Go-Mono Gohu Hack Hasklig HeavyData Hermit IBMPlexMono Inconsolata InconsolataGo InconsolataLGC Iosevka JetBrainsMono Lekton LiberationMono Lilex MPlus Meslo Monofur Monoid Mononoki NerdFontsSymbolsOnly Noto OpenDyslexic Overpass ProFont ProggyClean RobotoMono ShareTechMono SourceCodePro SpaceMono Terminus Tinos Ubuntu UbuntuMono VictorMono iA-Writer +%global desc Nerd Fonts is a project that patches developer targeted fonts with a high number of glyphs (icons). + +Name: nerd-fonts +Version: 2.2.2 +Release: %autorelease +URL: https://nerdfonts.com/ +Source0: https://github.com/ryanoasis/nerd-fonts/archive/refs/tags/v%{version}.tar.gz +License: OFLv1.1 +Summary: All packaged Nerd fonts +Requires: %{lua: +local x = "" +local ver = rpm.expand("%{version}") +for font in (rpm.expand("%{flist}")):gmatch("[^ ]+") do + x = x .. font:lower().."="..ver.." " +end +print(x) +} + +%description +%{desc} Specifically to add a high number of extra glyphs from popular +'iconic fonts' such as Font Awesome, Devicons, Octicons, and others. + +%{lua: +for font in (rpm.expand("%{flist}")):gmatch("[^ ]+") do + print("%package -n "..font:lower().."-nerd-fonts\n") + print("Summary:\tPatched Nerd fonts: "..font) + print("\n%description -n "..font:lower().."-nerd-fonts\n") + print("%{desc}. The package contains the patched version of "..font..".\n") +end +} + +%prep +%autosetup -n %{name}-v%{version} + +%build +find patched-fonts -name "* Windows Compatible.*" -delete +find patched-fonts -name "font-info.md" -delete +find patched-fonts -name "readme.md" -delete + +search() { + for folder in $1/*; do + if [[ -d "$folder/complete" ]]; then + mv $folder/complete/* $folder/ + rmdir $folder/complete + else + [[ -d $folder ]] && search $folder + fi + done +} +search patched-fonts + +%install +mkdir -p %{buildroot}/%{_datadir}/fonts/nerd-fonts/ +cp patched-fonts/* %{buildroot}/%{_datadir}/fonts/nerd-fonts/ + + +%files +%doc readme.md +%license LICENSE + +%{lua: +for font in (rpm.expand("%{flist}")):gmatch("[^ ]+") do + print("%files -n "..font:lower().."-nerd-fonts\n") + print("%doc readme.md\n") + print("%license LICENSE\n") + print("%{_datadir}/fonts/nerd-fonts/"..font.."\n") +end +} + + +%changelog +* Wed Jan 4 2023 windowsboy111 +- Initial package diff --git a/anda/fonts/nerd-fonts/update.rhai b/anda/fonts/nerd-fonts/update.rhai new file mode 100644 index 0000000000..144ad4a2ce --- /dev/null +++ b/anda/fonts/nerd-fonts/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("ryanoasis/nerd-fonts"));