From cf85acf438c5fa20ae9f9a1d69fcd164d3179e85 Mon Sep 17 00:00:00 2001 From: infinitebash Date: Fri, 2 Feb 2024 16:38:35 -0600 Subject: [PATCH] wip: added basic build steps --- anda/system/unl0kr/anda.hcl | 5 +++++ anda/system/unl0kr/unl0kr.spec | 40 ++++++++++++++++++++++++++++++++++ anda/system/unl0kr/update.rhai | 10 +++++++++ 3 files changed, 55 insertions(+) create mode 100644 anda/system/unl0kr/anda.hcl create mode 100644 anda/system/unl0kr/unl0kr.spec create mode 100644 anda/system/unl0kr/update.rhai diff --git a/anda/system/unl0kr/anda.hcl b/anda/system/unl0kr/anda.hcl new file mode 100644 index 0000000000..1e53a4ac3b --- /dev/null +++ b/anda/system/unl0kr/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "unl0kr.spec" + } +} diff --git a/anda/system/unl0kr/unl0kr.spec b/anda/system/unl0kr/unl0kr.spec new file mode 100644 index 0000000000..da99630343 --- /dev/null +++ b/anda/system/unl0kr/unl0kr.spec @@ -0,0 +1,40 @@ +Name: unl0kr +Version: 2.0.3 +Release: %autorelease +Summary: Disk unlocker for the initramfs based on LVGL. + +License: GPL-v3.0 +URL: https://gitlab.com/postmarketOS/buffybox + +BuildRequires: pkgconfig(inih) pkgconfig(libinput) pkgconfig(libudev) pkgconfig(xkbcommon) git +Requires: kernel + +%description + + +%prep +git clone --recursive --shallow-submodules --branch unl0kr-%version %url.git . + + +%build +%meson/ +%meson_build + + +%install +mv _build/unl0kr %{buildroot}/%{_bindir}/unl0kr +chmod 755 %{buildroot}%{_bindir}/unl0kr + + +%check + + +%files +%license COPYING +%doc doc/* +%{buildroot}%{_bindir}/unl0kr + + +%changelog +* Fri Feb 2 2024 infinitebash +%autochangelog diff --git a/anda/system/unl0kr/update.rhai b/anda/system/unl0kr/update.rhai new file mode 100644 index 0000000000..64dd0ba027 --- /dev/null +++ b/anda/system/unl0kr/update.rhai @@ -0,0 +1,10 @@ +let txt = get("https://gitlab.com/api/v4/projects/52322952/repository/tags"); +fn get_ver(json) { + for release in json { + if "unl0kr" in release.name { + return release.name.split("-")[1] + } + } +} +let ver = get_ver(txt.json_arr()); +rpm.version(ver);