From 2045eb1222b6a77bd8f649f502ceb3d35a2d1448 Mon Sep 17 00:00:00 2001
From: Ribbon <ribbon_45@proton.me>
Date: Fri, 26 Jul 2024 00:13:38 +0000
Subject: [PATCH] Add recipes

---
 recipes/wip/finance/bitcoin/electrum/recipe.toml    | 11 +++++++++++
 recipes/wip/games/rts/mindustry/recipe.toml         | 11 +++++++++++
 .../wip/net/bittorrent/webtorrent-cli/recipe.toml   | 12 ++++++++++++
 recipes/wip/net/download/yt-dlp/recipe.toml         | 13 +++++++++++++
 recipes/wip/sys-info/procps-ng/recipe.toml          |  5 +++++
 5 files changed, 52 insertions(+)
 create mode 100644 recipes/wip/finance/bitcoin/electrum/recipe.toml
 create mode 100644 recipes/wip/games/rts/mindustry/recipe.toml
 create mode 100644 recipes/wip/net/bittorrent/webtorrent-cli/recipe.toml
 create mode 100644 recipes/wip/net/download/yt-dlp/recipe.toml
 create mode 100644 recipes/wip/sys-info/procps-ng/recipe.toml

diff --git a/recipes/wip/finance/bitcoin/electrum/recipe.toml b/recipes/wip/finance/bitcoin/electrum/recipe.toml
new file mode 100644
index 000000000..cff7ca173
--- /dev/null
+++ b/recipes/wip/finance/bitcoin/electrum/recipe.toml
@@ -0,0 +1,11 @@
+# runtime dependencies - https://electrum.org/#download
+[source]
+tar = "https://download.electrum.org/4.5.5/Electrum-4.5.5.tar.gz"
+[build]
+template = "custom"
+script = """
+mkdir -pv "${COOKBOOK_STAGE}"/usr/share/electrum
+mkdir -pv "${COOKBOOK_STAGE}"/usr/bin
+cp -rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}"/usr/share/electrum
+echo "python3 /usr/share/electrum/run_electrum" > "${COOKBOOK_STAGE}"/usr/bin/electrum
+"""
diff --git a/recipes/wip/games/rts/mindustry/recipe.toml b/recipes/wip/games/rts/mindustry/recipe.toml
new file mode 100644
index 000000000..a46e88634
--- /dev/null
+++ b/recipes/wip/games/rts/mindustry/recipe.toml
@@ -0,0 +1,11 @@
+#TODO make openjdk work
+[build]
+template = "custom"
+script = """
+mkdir -pv "${COOKBOOK_SOURCE}"
+wget https://github.com/Anuken/Mindustry/releases/download/v146/Mindustry.jar
+mkdir -pv "${COOKBOOK_STAGE}"/usr/share/mindustry
+mkdir -pv "${COOKBOOK_STAGE}"/usr/bin
+cp -rv "${COOKBOOK_SOURCE}"/Mindustry.jar "${COOKBOOK_STAGE}"/usr/share/mindustry
+echo "java -jar /usr/share/mindustry/Mindustry.jar" > "${COOKBOOK_STAGE}"/usr/bin/mindustry
+"""
diff --git a/recipes/wip/net/bittorrent/webtorrent-cli/recipe.toml b/recipes/wip/net/bittorrent/webtorrent-cli/recipe.toml
new file mode 100644
index 000000000..bc9025fde
--- /dev/null
+++ b/recipes/wip/net/bittorrent/webtorrent-cli/recipe.toml
@@ -0,0 +1,12 @@
+#TODO not compiled or tested
+[source]
+git = "https://github.com/webtorrent/webtorrent-cli"
+rev = "298ae70a7baeb1bfc836abe2821baf78b50c3af1"
+[build]
+template = "custom"
+script = """
+mkdir -pv "${COOKBOOK_STAGE}"/usr/share/webtorrent-cli
+mkdir -pv "${COOKBOOK_STAGE}"/usr/bin
+cp -rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}"/usr/share/webtorrent-cli
+echo "cd /usr/share/webtorrent-cli \n npm run" > "${COOKBOOK_STAGE}"/usr/bin/webtorrent-cli
+"""
diff --git a/recipes/wip/net/download/yt-dlp/recipe.toml b/recipes/wip/net/download/yt-dlp/recipe.toml
new file mode 100644
index 000000000..2a3ff062b
--- /dev/null
+++ b/recipes/wip/net/download/yt-dlp/recipe.toml
@@ -0,0 +1,13 @@
+#TODO not compiled or tested
+# dependencies - https://github.com/yt-dlp/yt-dlp#dependencies
+[source]
+git = "https://github.com/yt-dlp/yt-dlp"
+[build]
+template = "custom"
+script = """
+mkdir -pv "${COOKBOOK_STAGE}"/usr/share/yt-dlp
+mkdir -pv "${COOKBOOK_STAGE}"/usr/bin
+cp -rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}"/usr/share/yt-dlp
+echo "/usr/share/yt-dlp/yt-dlp.sh" > "${COOKBOOK_STAGE}"/usr/bin/yt-dlp
+chmod a+x "${COOKBOOK_STAGE}"/usr/share/yt-dlp/yt-dlp.sh
+"""
diff --git a/recipes/wip/sys-info/procps-ng/recipe.toml b/recipes/wip/sys-info/procps-ng/recipe.toml
new file mode 100644
index 000000000..fc247ee48
--- /dev/null
+++ b/recipes/wip/sys-info/procps-ng/recipe.toml
@@ -0,0 +1,5 @@
+#TODO not compiled or tested
+[source]
+tar = "https://sourceforge.net/projects/procps-ng/files/Production/procps-ng-4.0.4.tar.xz/download"
+[build]
+template = "configure"
-- 
GitLab