zip, unzip, caddy, nmap, parted

This commit is contained in:
2026-02-22 19:49:43 +01:00
parent 21e48585b5
commit e5e2980938
13 changed files with 123 additions and 7 deletions

View File

@@ -5,8 +5,6 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(SQLITE_OMIT_LOAD_EXTENSION ON CACHE BOOL "Disable SQLite load_extension()" FORCE)
find_package(blake3 REQUIRED)
include(FetchContent)
FetchContent_Declare(
SQLiteCpp
@@ -15,6 +13,15 @@ FetchContent_Declare(
)
FetchContent_MakeAvailable(SQLiteCpp)
FetchContent_Declare(
blake3
GIT_REPOSITORY https://github.com/BLAKE3-team/BLAKE3.git
GIT_TAG 1.8.3
)
FetchContent_Populate(blake3)
add_subdirectory(${blake3_SOURCE_DIR}/c ${blake3_BINARY_DIR})
add_executable(${PROJECT_NAME} src/main.cc)
target_link_libraries(${PROJECT_NAME} PRIVATE blake3 SQLiteCpp)

14
packages/caddy.shrap Normal file
View File

@@ -0,0 +1,14 @@
(package
(name "caddy")
(version "2.10.2")
(homepage "https://caddyserver.com/")
(dependencies go)
(src (tar
(url "https://github.com/caddyserver/caddy/archive/refs/tags/v2.10.2.tar.gz")
(dir "caddy-2.10.2")
(blake3 "061a1f2c7778e69f0ee38168844b5ed0d7d5649e93571fa031b9784769eaa2ee")))
(build
(shell "GOPATH=/tmp go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest")
(shell "cp -v /tmp/bin/xcaddy /usr/bin/")
(shell "xcaddy build")
(shell "cp -v ./caddy /usr/bin/")))

11
packages/less.shrap Normal file
View File

@@ -0,0 +1,11 @@
(package
(name "less")
(version "692")
(homepage "https://www.greenwoodsoftware.com/less/")
(dependencies libncurses)
(src (tar
(url "https://www.greenwoodsoftware.com/less/less-692.tar.gz")
(dir "less-692")
(blake3 "21dd0ae858ca02990cdccff12be0911fa75f1173eeb3a5d224e68da7da473016")))
(build
(configure_make)))

11
packages/libaio.shrap Normal file
View File

@@ -0,0 +1,11 @@
(package
(name "libaio")
(version "0.3.113")
(homepage "https://pagure.io/libaio")
(dependencies make)
(src (tar
(url "https://pagure.io/libaio/archive/libaio-0.3.113/libaio-libaio-0.3.113.tar.gz")
(dir "libaio-libaio-0.3.113")
(blake3 "709f4739c413b5507221b366ea2f226f88606afb3b0f6ce15ca317bb3aadd0d7")))
(build
(make)))

View File

@@ -0,0 +1,11 @@
(package
(name "libdevmapper")
(version "2.03.38")
(homepage "https://sourceware.org/lvm2/")
(dependencies libaio)
(src (tar
(url "https://ftp.gwdg.de/pub/linux/sources.redhat.com/lvm2/LVM2.2.03.38.tgz")
(dir "LVM2.2.03.38")
(blake3 "6f6c44d9c6eb6de55ca156f3a778fbd57a767a55b549a143101f06dd3d855760")))
(build
(configure_make)))

View File

@@ -2,7 +2,7 @@
(name "libglib")
(version "2.86.4")
(homepage "https://www.gtk.org/")
(dependencies meson ninja git libffi pkg-config slang)
(dependencies meson ninja git libffi pkg-config slang libpcre2)
(src (tar
(url "https://download.gnome.org/sources/glib/2.86/glib-2.86.4.tar.xz")
(dir "glib-2.86.4")

11
packages/nmap.shrap Normal file
View File

@@ -0,0 +1,11 @@
(package
(name "nmap")
(version "7.98")
(homepage "https://nmap.org/")
(dependencies python libpcap)
(src (tar
(url "https://nmap.org/dist/nmap-7.98.tgz")
(dir "nmap-7.98")
(blake3 "fceb3095aead22476564eab66ebf820a944830cb4f3ea78ee9b76a7a3eeab973")))
(build
(configure_make)))

11
packages/parted.shrap Normal file
View File

@@ -0,0 +1,11 @@
(package
(name "parted")
(version "3.6")
(homepage "https://www.gnu.org/software/parted/")
(dependencies util-linux libdevmapper libreadline)
(src (tar
(url "https://ftp.gnu.org/gnu/parted/parted-3.6.tar.xz")
(dir "parted-3.6")
(blake3 "30815d1a15a87a1d95aa1b3bb167662e17e244f9c262cabc79c4131d4a7bd0c6")))
(build
(configure_make)))

View File

@@ -11,4 +11,4 @@
(configure_make)
(shell "ln -sf /usr/bin/python3 /usr/bin/python || true")
(shell "python -m ensurepip --upgrade")
(shell "python -m pip install --upgrade setuptools wheel")))
(shell "python -m pip install --upgrade setuptools wheel truststore")))

14
packages/unzip.shrap Normal file
View File

@@ -0,0 +1,14 @@
(package
(name "unzip")
(version "6.0")
(homepage "https://infozip.sourceforge.net/UnZip.html")
(dependencies make)
(src (tar
(url "https://downloads.sourceforge.net/infozip/unzip60.tar.gz")
(dir "unzip60")
(blake3 "5969810311361d686f6408091d60d0a36bf29f1abfae05831be9c42e69aaf67f")))
(build
(shell "find . -type f -exec sed -i 's/-DNO_DIR//g' {} +")
(make
(make_flags "-f unix/Makefile generic_gcc")
(install_flags "-f unix/Makefile prefix=/usr"))))

15
packages/zip.shrap Normal file
View File

@@ -0,0 +1,15 @@
(package
(name "zip")
(version "3.0")
(homepage "https://infozip.sourceforge.net/Zip.html")
(dependencies make)
(src (tar
(url "https://downloads.sourceforge.net/infozip/zip30.tar.gz")
(dir "zip30")
(blake3 "c622bb4295213bc6d94e42a6da58d8bdb32fc6d8f7f37aa078238c31b05c9d91")))
(build
(shell "sed -i 's|\$CC \$BFLAG -o conftest conftest.c|\$CC \$BFLAG -Wno-implicit-function-declaration -o conftest conftest.c|' unix/configure")
(shell "sed -i 's|\$CC -o conftest conftest.c|true|' unix/configure")
(make
(make_flags "-f unix/Makefile generic_gcc")
(install_flags "-f unix/Makefile prefix=/usr"))))

12
packages/zsh.shrap Normal file
View File

@@ -0,0 +1,12 @@
(package
(name "zsh")
(version "5.9")
(homepage "https://www.zsh.org/")
(dependencies xz libncurses)
(src (tar
(url "https://www.zsh.org/pub/zsh-5.9.tar.xz")
(dir "zsh-5.9")
(blake3 "b440cfbea634b5a684903656db8d8f8ff70a5657a4b479b9c256e9583adfeacc")))
(build
(configure_make
(configure_flags "CFLAGS=-DHAVE_BOOLCODES=1"))))

View File

@@ -132,7 +132,7 @@ void install_package(const std::string &name, DB &db) {
std::string jobs = std::to_string(std::thread::hardware_concurrency());
std::cout << CLR_BLUE << "\n 🔨 Building...\n\n" << CLR_RESET;
std::cout << CLR_BLUE << " 🔨 Building...\n\n" << CLR_RESET;
for (const auto &step : pkg.get("build").children) {
std::string step_type = step.children[0].value;
@@ -242,8 +242,7 @@ void generate_graph(const std::vector<std::string> &to_highlight) {
out.close();
Util::shell_command("dot -Tpng graph.dot > graph.png", BUILD_PATH);
std::cout << CLR_GREEN << "Graph saved to " << BUILD_PATH << "/graph.png\n"
<< CLR_RESET;
Util::shell_command("dot -Tsvg graph.dot > graph.svg", BUILD_PATH);
}
int main(int argc, char **argv) {