From 3a87a4b5cc4dbfe08b3be4f18c8a435562c94e6f Mon Sep 17 00:00:00 2001 From: lleyton Date: Sun, 20 Nov 2022 19:47:32 -0800 Subject: [PATCH] Add tau-hydrogen spec --- anda/tau-hydrogen/anda.hcl | 5 +++++ anda/tau-hydrogen/chkupdate.py | 19 +++++++++++++++++ anda/tau-hydrogen/tau-helium.spec | 35 +++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 anda/tau-hydrogen/anda.hcl create mode 100644 anda/tau-hydrogen/chkupdate.py create mode 100644 anda/tau-hydrogen/tau-helium.spec diff --git a/anda/tau-hydrogen/anda.hcl b/anda/tau-hydrogen/anda.hcl new file mode 100644 index 0000000000..86d42cce6c --- /dev/null +++ b/anda/tau-hydrogen/anda.hcl @@ -0,0 +1,5 @@ +project "pkg" { + rpm { + spec = "tau-hydrogen.spec" + } +} \ No newline at end of file diff --git a/anda/tau-hydrogen/chkupdate.py b/anda/tau-hydrogen/chkupdate.py new file mode 100644 index 0000000000..89ee38857d --- /dev/null +++ b/anda/tau-hydrogen/chkupdate.py @@ -0,0 +1,19 @@ +import os +import requests +import re + +NAME = 'tau-hydrogen' +REPO = "tau-OS/tau-hydrogen" +REGEX_VER = r'Version:\s*([\.\d]+)\n' +SPEC = f"{NAME}.spec" +LINK = f'https://api.github.com/repos/{REPO}/releases/latest' + + +ver = requests.get(LINK).json()['tag_name'] +with open(SPEC, 'r') as f: + matches = re.findall(REGEX_VER, f.read()) +if not len(matches): exit(f"{NAME}: Failed to match regex!") +cur = matches[0] +if ver == cur: exit(f'{NAME}: Up to date!') +print(f'{NAME}: {cur} -> {ver}') +os.system(f'rpmdev-bumpspec -n {ver} {SPEC}') diff --git a/anda/tau-hydrogen/tau-helium.spec b/anda/tau-hydrogen/tau-helium.spec new file mode 100644 index 0000000000..f5c074c1b3 --- /dev/null +++ b/anda/tau-hydrogen/tau-helium.spec @@ -0,0 +1,35 @@ +Summary: tauOS Icon Theme +Name: tau-hydrogen +Version: 1.0.1 +Release: 1%{?dist} +License: GPLv3 +URL: https://github.com/tau-OS/tau-hydrogen +Source0: https://github.com/tau-OS/tau-hydrogen/archive/refs/tags/%{version}.tar.gz +BuildArch: noarch +BuildRequires: meson +BuildRequires: ninja-build + +%description +Hydrogen is the default icon theme in tauOS + +%prep +%autosetup -n tau-hydrogen-%{version} + +%build +%meson +%meson_build + +%install +# Install licenses +mkdir -p licenses +%meson_install + +%files +%license LICENSE +%doc README.md +%{_datadir}/themes/Helium/* +%{_datadir}/themes/Helium-dark/* + +%changelog +* Sun Nov 20 2022 Lleyton Gray - 1.0.1 +- Terra Release