From f4f4cf150142ff7c7a6ca44146b770169412e33a Mon Sep 17 00:00:00 2001 From: windowsboy111 Date: Sun, 30 Oct 2022 21:29:07 +0800 Subject: [PATCH] Add blackbox-terminal marble-gtk --- anda/blackbox-terminal/anda.hcl | 6 +++ anda/blackbox-terminal/blackbox-terminal.spec | 52 +++++++++++++++++++ anda/blackbox-terminal/chkupdate.py | 21 ++++++++ anda/marble-gtk/anda.hcl | 6 +++ anda/marble-gtk/marble-gtk.spec | 46 ++++++++++++++++ 5 files changed, 131 insertions(+) create mode 100644 anda/blackbox-terminal/anda.hcl create mode 100644 anda/blackbox-terminal/blackbox-terminal.spec create mode 100644 anda/blackbox-terminal/chkupdate.py create mode 100644 anda/marble-gtk/anda.hcl create mode 100644 anda/marble-gtk/marble-gtk.spec diff --git a/anda/blackbox-terminal/anda.hcl b/anda/blackbox-terminal/anda.hcl new file mode 100644 index 0000000000..2c7ba6d502 --- /dev/null +++ b/anda/blackbox-terminal/anda.hcl @@ -0,0 +1,6 @@ +project "pkg" { + rpm { + spec = "blackbox-terminal.spec" + sources = "." + } +} diff --git a/anda/blackbox-terminal/blackbox-terminal.spec b/anda/blackbox-terminal/blackbox-terminal.spec new file mode 100644 index 0000000000..eefe74b641 --- /dev/null +++ b/anda/blackbox-terminal/blackbox-terminal.spec @@ -0,0 +1,52 @@ +Name: blackbox-terminal +Version: 0.12.1 +Release: %autorelease +Summary: A beautiful GTK 4 terminal +License: GPLv3 +URL: https://gitlab.gnome.org/raggesilver/blackbox +BuildRequires: vala meson gettext +BuildRequires: pkgconfig(gtk4) >= 4.6.2 +BuildRequires: pkgconfig(gio-2.0) >= 2.50 +BuildRequires: pkgconfig(libadwaita-1) >= 1.1 +BuildRequires: marble-gtk >= 42 +BuildRequires: pkgconfig(vte-2.91-gtk4) >= 0.69.0 +BuildRequires: pkgconfig(json-glib-1.0) >= 1.4.4 +BuildRequires: pkgconfig(libxml-2.0) >= 2.9.12 +BuildRequires: pkgconfig(librsvg-2.0) >= 2.54.0 +BuildRequires: pkgconfig(libpcre2-8) +BuildRequires: pkgconfig(graphene-gobject-1.0) +Source0: %{url}/-/archive/v%{version}/blackbox-v%{version}.tar.gz + +%description +%{summary}. + +%prep +%autosetup -n blackbox-v%{version} + +%build +%meson +%meson_build + +%install +%meson_install + +%files +%doc README.md +%license COPYING +/usr/bin/blackbox +/usr/lib/debug/* +/usr/share/applications/com.raggesilver.BlackBox.desktop +/usr/share/appdata/com.raggesilver.BlackBox.appdata.xml +/usr/share/blackbox/* +/usr/share/glib-2.0/schemas/com.raggesilver.BlackBox.gschema.xml +/usr/share/icons/hicolor/scalable/actions/com.raggesilver.BlackBox-fullscreen-symbolic.svg +/usr/share/icons/hicolor/scalable/actions/com.raggesilver.BlackBox-show-headerbar-symbolic.svg +/usr/share/icons/hicolor/scalable/actions/external-link-symbolic.svg +/usr/share/icons/hicolor/scalable/actions/settings-symbolic.svg +/usr/share/icons/hicolor/scalable/apps/com.raggesilver.BlackBox.svg +/usr/share/locale/*/LC_MESSAGES/blackbox.mo + + +%changelog +* Sun Oct 23 2022 windowsboy111 +- Initial package diff --git a/anda/blackbox-terminal/chkupdate.py b/anda/blackbox-terminal/chkupdate.py new file mode 100644 index 0000000000..c79172e558 --- /dev/null +++ b/anda/blackbox-terminal/chkupdate.py @@ -0,0 +1,21 @@ +import os +import requests +import re + +NAME = 'blackbox-terminal' +ID = 20397 +REGEX_VER = r'Version:\s*([\.\d]+)\n' +SPEC = f"{NAME}.spec" +LINK = f'https://gitlab.gnome.org/api/v4/projects/{ID}/releases/' + + +# BIG ASSUMPTION THAT IT'S THE FIRST ONE :3 +ver = requests.get(LINK).json()[0]['tag_name'] +ver = ver[1:] # starts with v +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/marble-gtk/anda.hcl b/anda/marble-gtk/anda.hcl new file mode 100644 index 0000000000..1afe962294 --- /dev/null +++ b/anda/marble-gtk/anda.hcl @@ -0,0 +1,6 @@ +project "pkg" { + rpm { + spec = "marble-gtk.spec" + sources = "." + } +} diff --git a/anda/marble-gtk/marble-gtk.spec b/anda/marble-gtk/marble-gtk.spec new file mode 100644 index 0000000000..ce7a3430fe --- /dev/null +++ b/anda/marble-gtk/marble-gtk.spec @@ -0,0 +1,46 @@ +# This is the dumbest thing ever +# Why make a library with the same name as another library gosh +%global commit 6dcc6fefa35f0151b0549c01bd774750fe6bdef8 +Name: marble-gtk +Version: 42.alpha0 +# No idea how they name the version +Release: %autorelease +Summary: My GTK library +License: GPLv3 +URL: https://gitlab.gnome.org/raggesilver/marble +BuildRequires: vala meson >= 0.50.0 pkgconfig(gtk4) +BuildRequires: pkgconfig(gtk+-3.0) >= 3.24 +BuildRequires: pkgconfig(gio-2.0) >= 2.50 + +Source0: %{url}/-/archive/%{commit}/marble-%{commit}.tar.gz + +%description +%summary. +Just as Elementary has Granite I have Marble, my collection of useful functions +and reusable widgets. +# duh... + +%prep +%autosetup -n marble-%{commit} + +%build +%meson +%meson_build + +%install +%meson_install + +%files +%doc README.md +%license COPYING +/usr/include/marble.h +/usr/lib/debug/usr/lib64/libmarble.so* +/usr/lib64/girepository-1.0/Marble-*.typelib +/usr/lib64/libmarble.so* +/usr/lib64/pkgconfig/marble.pc +/usr/share/gir-1.0/Marble-*.gir +/usr/share/vala/vapi/marble.* + +%changelog +* Sat Oct 29 2022 windowsboy111 +- Initial package