From 71a1f905ca1eb72c7e4463b65ec2be0b000f7759 Mon Sep 17 00:00:00 2001 From: Jeremy Huntwork Date: Wed, 16 Sep 2026 09:43:28 -0400 Subject: [PATCH] Add the file command and libmagic --- recipes/core/file/recipe.kdl | 48 ++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 recipes/core/file/recipe.kdl diff --git a/recipes/core/file/recipe.kdl b/recipes/core/file/recipe.kdl new file mode 100644 index 00000000..a49180a8 --- /dev/null +++ b/recipes/core/file/recipe.kdl @@ -0,0 +1,48 @@ +recipe { + name "file" + version "5.43" + release 1 + description "File type identification utility and library" + url "https://www.darwinsys.com/file/" + licenses "BSD" + archs "aarch64" "x86_64" + depends "busybox" \ + "llvm" \ + "make" \ + "mimalloc-dev" \ + "musl-dev" +} + +source "https://astron.com/pub/file/file-${recipe.version}.tar.gz" { + blake3 "157fe3ce5dfd18bc8b4bb9fab6ca7f5c306fdc279ef59add3059e1df7b83b494" +} + +build { + script r#" + sed -i 's/misc/file/' configure + LDFLAGS='--static' ./configure \ + --prefix=/usr \ + --disable-shared \ + --enable-static + make V=1 + "# +} + +install { + script r#" + make DESTDIR="$DESTDIR" install + "# +} + +package "file" { + files "usr/bin/file" \ + "usr/share/file/magic.mgc" \ + "usr/share/man/man1/file.1" +} + +package "file-dev" { + files "usr/include/" \ + "usr/lib/libmagic.a" \ + "usr/lib/pkgconfig/libmagic.pc" \ + "usr/share/man/man3/libmagic.3" +}