浏览代码

feat: add xz-5.8.1 source code

clanker 1 月之前
父节点
当前提交
39de61bfba
共有 5 个文件被更改,包括 454 次插入0 次删除
  1. 299 0
      xz-5.8.1/MANIFEST.usm
  2. 56 0
      xz-5.8.1/PACKAGE.md
  3. 29 0
      xz-5.8.1/usm-scripts/acquire.sh
  4. 37 0
      xz-5.8.1/usm-scripts/build.sh
  5. 33 0
      xz-5.8.1/usm-scripts/install.sh

+ 299 - 0
xz-5.8.1/MANIFEST.usm

@@ -0,0 +1,299 @@
+{
+  "provides" : {
+    "man:it/man1/xzdec.1" : "as-expected",
+    "bin:lzma" : "as-expected",
+    "man:de/man1/lzcat.1" : "as-expected",
+    "lib:liblzma.so.5" : "as-expected",
+    "man:it/man1/unxz.1" : "as-expected",
+    "man:sr/man1/xzcmp.1" : "as-expected",
+    "man:ko/man1/lzcmp.1" : "as-expected",
+    "man:ko/man1/xzdiff.1" : "as-expected",
+    "man:man1/lzmore.1" : "as-expected",
+    "man:fr/man1/unxz.1" : "as-expected",
+    "locale:pt/LC_MESSAGES/xz.mo" : "as-expected",
+    "man:uk/man1/xzcmp.1" : "as-expected",
+    "res:doc/xz-5.8.1/THANKS" : "as-expected",
+    "man:pt_BR/man1/xz.1" : "as-expected",
+    "man:man1/lzfgrep.1" : "as-expected",
+    "man:man1/xzfgrep.1" : "as-expected",
+    "man:uk/man1/lzfgrep.1" : "as-expected",
+    "man:man1/xzcat.1" : "as-expected",
+    "locale:zh_CN/LC_MESSAGES/xz.mo" : "as-expected",
+    "man:it/man1/lzmadec.1" : "as-expected",
+    "man:it/man1/xzless.1" : "as-expected",
+    "man:ro/man1/lzcmp.1" : "as-expected",
+    "man:uk/man1/xzfgrep.1" : "as-expected",
+    "man:sr/man1/xzdiff.1" : "as-expected",
+    "res:doc/xz-5.8.1/examples/04_compress_easy_mt.c" : "as-expected",
+    "man:ro/man1/xz.1" : "as-expected",
+    "man:it/man1/unlzma.1" : "as-expected",
+    "man:it/man1/lzegrep.1" : "as-expected",
+    "man:uk/man1/xzgrep.1" : "as-expected",
+    "man:it/man1/xzegrep.1" : "as-expected",
+    "man:ro/man1/xzless.1" : "as-expected",
+    "man:pt_BR/man1/unxz.1" : "as-expected",
+    "man:sr/man1/xzcat.1" : "as-expected",
+    "man:ko/man1/lzcat.1" : "as-expected",
+    "pc:liblzma.pc" : "as-expected",
+    "man:ro/man1/unlzma.1" : "as-expected",
+    "man:de/man1/xz.1" : "as-expected",
+    "man:de/man1/xzcmp.1" : "as-expected",
+    "man:uk/man1/lzless.1" : "as-expected",
+    "inc:lzma.h" : "as-expected",
+    "locale:hr/LC_MESSAGES/xz.mo" : "as-expected",
+    "man:sr/man1/lzmadec.1" : "as-expected",
+    "man:uk/man1/xzcat.1" : "as-expected",
+    "man:de/man1/xzless.1" : "as-expected",
+    "man:fr/man1/lzless.1" : "as-expected",
+    "man:fr/man1/lzcat.1" : "as-expected",
+    "lib:liblzma.la" : "as-expected",
+    "man:ko/man1/xzgrep.1" : "as-expected",
+    "man:sr/man1/lzegrep.1" : "as-expected",
+    "man:de/man1/unlzma.1" : "as-expected",
+    "man:it/man1/lzcmp.1" : "as-expected",
+    "man:sr/man1/xzegrep.1" : "as-expected",
+    "locale:da/LC_MESSAGES/xz.mo" : "as-expected",
+    "man:pt_BR/man1/lzless.1" : "as-expected",
+    "man:ko/man1/lzless.1" : "as-expected",
+    "res:doc/xz-5.8.1/examples/11_file_info.c" : "as-expected",
+    "man:ro/man1/lzcat.1" : "as-expected",
+    "man:man1/xz.1" : "as-expected",
+    "man:uk/man1/xzmore.1" : "as-expected",
+    "man:pt_BR/man1/lzcat.1" : "as-expected",
+    "bin:lzcmp" : "as-expected",
+    "man:man1/xzless.1" : "as-expected",
+    "man:ro/man1/lzmadec.1" : "as-expected",
+    "res:doc/xz-5.8.1/COPYING.0BSD" : "as-expected",
+    "locale:ko/LC_MESSAGES/xz.mo" : "as-expected",
+    "man:sr/man1/xzgrep.1" : "as-expected",
+    "man:man1/unlzma.1" : "as-expected",
+    "man:de/man1/lzmainfo.1" : "as-expected",
+    "man:de/man1/xzcat.1" : "as-expected",
+    "man:ro/man1/lzma.1" : "as-expected",
+    "locale:zh_TW/LC_MESSAGES/xz.mo" : "as-expected",
+    "res:doc/xz-5.8.1/faq.txt" : "as-expected",
+    "man:ro/man1/lzegrep.1" : "as-expected",
+    "inc:lzma/hardware.h" : "as-expected",
+    "man:ko/man1/xzmore.1" : "as-expected",
+    "man:sr/man1/lzless.1" : "as-expected",
+    "man:ro/man1/xzegrep.1" : "as-expected",
+    "res:doc/xz-5.8.1/examples/02_decompress.c" : "as-expected",
+    "man:it/man1/xzdiff.1" : "as-expected",
+    "bin:lzegrep" : "as-expected",
+    "man:ko/man1/xzcmp.1" : "as-expected",
+    "locale:tr/LC_MESSAGES/xz.mo" : "as-expected",
+    "man:it/man1/lzfgrep.1" : "as-expected",
+    "bin:xzmore" : "as-expected",
+    "man:it/man1/lzcat.1" : "as-expected",
+    "man:uk/man1/lzmainfo.1" : "as-expected",
+    "man:it/man1/xzfgrep.1" : "as-expected",
+    "man:ro/man1/xzdiff.1" : "as-expected",
+    "inc:lzma/container.h" : "as-expected",
+    "res:doc/xz-5.8.1/lzma-file-format.txt" : "as-expected",
+    "man:sr/man1/unxz.1" : "as-expected",
+    "man:de/man1/unxz.1" : "as-expected",
+    "man:uk/man1/lzdiff.1" : "as-expected",
+    "locale:nl/LC_MESSAGES/xz.mo" : "as-expected",
+    "man:sr/man1/xzmore.1" : "as-expected",
+    "man:ro/man1/xzcmp.1" : "as-expected",
+    "man:de/man1/xzdiff.1" : "as-expected",
+    "res:doc/xz-5.8.1/xz-file-format.txt" : "as-expected",
+    "locale:ka/LC_MESSAGES/xz.mo" : "as-expected",
+    "bin:xzcat" : "as-expected",
+    "man:sr/man1/lzfgrep.1" : "as-expected",
+    "man:man1/lzma.1" : "as-expected",
+    "man:sr/man1/xzfgrep.1" : "as-expected",
+    "inc:lzma/filter.h" : "as-expected",
+    "inc:lzma/delta.h" : "as-expected",
+    "man:sr/man1/xz.1" : "as-expected",
+    "man:ko/man1/lzdiff.1" : "as-expected",
+    "man:ko/man1/xzcat.1" : "as-expected",
+    "locale:vi/LC_MESSAGES/xz.mo" : "as-expected",
+    "locale:ro/LC_MESSAGES/xz.mo" : "as-expected",
+    "lib:liblzma.so" : "as-expected",
+    "bin:lzfgrep" : "as-expected",
+    "bin:lzmore" : "as-expected",
+    "man:ko/man1/lzma.1" : "as-expected",
+    "man:man1/xzdiff.1" : "as-expected",
+    "man:it/man1/lzmainfo.1" : "as-expected",
+    "man:it/man1/xzgrep.1" : "as-expected",
+    "man:fr/man1/xzcat.1" : "as-expected",
+    "res:doc/xz-5.8.1/NEWS" : "as-expected",
+    "man:it/man1/xzcmp.1" : "as-expected",
+    "locale:de/LC_MESSAGES/xz.mo" : "as-expected",
+    "man:it/man1/lzless.1" : "as-expected",
+    "man:ro/man1/lzfgrep.1" : "as-expected",
+    "man:ro/man1/xzgrep.1" : "as-expected",
+    "man:sr/man1/lzdiff.1" : "as-expected",
+    "man:ro/man1/xzfgrep.1" : "as-expected",
+    "bin:unxz" : "as-expected",
+    "man:ro/man1/xzcat.1" : "as-expected",
+    "man:it/man1/lzma.1" : "as-expected",
+    "man:uk/man1/lzgrep.1" : "as-expected",
+    "man:ro/man1/lzless.1" : "as-expected",
+    "man:pt_BR/man1/xzcat.1" : "as-expected",
+    "man:de/man1/xzgrep.1" : "as-expected",
+    "man:fr/man1/lzma.1" : "as-expected",
+    "man:man1/xzdec.1" : "as-expected",
+    "bin:xzgrep" : "as-expected",
+    "man:uk/man1/unxz.1" : "as-expected",
+    "inc:lzma/block.h" : "as-expected",
+    "res:doc/xz-5.8.1/examples/Makefile" : "as-expected",
+    "man:it/man1/xzmore.1" : "as-expected",
+    "inc:lzma/stream_flags.h" : "as-expected",
+    "man:de/man1/lzless.1" : "as-expected",
+    "locale:pl/LC_MESSAGES/xz.mo" : "as-expected",
+    "man:de/man1/lzmadec.1" : "as-expected",
+    "man:ko/man1/lzgrep.1" : "as-expected",
+    "bin:xzdec" : "as-expected",
+    "bin:xzegrep" : "as-expected",
+    "man:de/man1/lzegrep.1" : "as-expected",
+    "man:sr/man1/xzdec.1" : "as-expected",
+    "man:ro/man1/xzmore.1" : "as-expected",
+    "man:it/man1/xzcat.1" : "as-expected",
+    "res:doc/xz-5.8.1/examples/01_compress_easy.c" : "as-expected",
+    "man:de/man1/xzegrep.1" : "as-expected",
+    "man:it/man1/xz.1" : "as-expected",
+    "man:man1/xzgrep.1" : "as-expected",
+    "man:uk/man1/lzmore.1" : "as-expected",
+    "man:uk/man1/xzdec.1" : "as-expected",
+    "man:pt_BR/man1/lzma.1" : "as-expected",
+    "man:man1/lzless.1" : "as-expected",
+    "man:de/man1/xzmore.1" : "as-expected",
+    "locale:ca/LC_MESSAGES/xz.mo" : "as-expected",
+    "res:doc/xz-5.8.1/AUTHORS" : "as-expected",
+    "man:sr/man1/lzgrep.1" : "as-expected",
+    "inc:lzma/bcj.h" : "as-expected",
+    "bin:xzless" : "as-expected",
+    "bin:lzgrep" : "as-expected",
+    "res:doc/xz-5.8.1/COPYING" : "as-expected",
+    "man:ko/man1/lzmore.1" : "as-expected",
+    "man:pt_BR/man1/lzmadec.1" : "as-expected",
+    "man:fr/man1/lzmadec.1" : "as-expected",
+    "man:it/man1/lzdiff.1" : "as-expected",
+    "man:man1/xzmore.1" : "as-expected",
+    "bin:xzfgrep" : "as-expected",
+    "bin:xzdiff" : "as-expected",
+    "locale:eo/LC_MESSAGES/xz.mo" : "as-expected",
+    "man:ro/man1/lzdiff.1" : "as-expected",
+    "inc:lzma/lzma12.h" : "as-expected",
+    "man:de/man1/xzdec.1" : "as-expected",
+    "man:ko/man1/xz.1" : "as-expected",
+    "locale:sr/LC_MESSAGES/xz.mo" : "as-expected",
+    "man:man1/lzcmp.1" : "as-expected",
+    "man:sr/man1/lzmore.1" : "as-expected",
+    "man:ro/man1/lzmainfo.1" : "as-expected",
+    "man:de/man1/lzdiff.1" : "as-expected",
+    "bin:lzless" : "as-expected",
+    "man:ko/man1/lzmadec.1" : "as-expected",
+    "locale:cs/LC_MESSAGES/xz.mo" : "as-expected",
+    "locale:pt_BR/LC_MESSAGES/xz.mo" : "as-expected",
+    "man:de/man1/lzfgrep.1" : "as-expected",
+    "bin:xzcmp" : "as-expected",
+    "man:sr/man1/lzmainfo.1" : "as-expected",
+    "bin:unlzma" : "as-expected",
+    "man:sr/man1/lzcmp.1" : "as-expected",
+    "man:de/man1/xzfgrep.1" : "as-expected",
+    "inc:lzma/version.h" : "as-expected",
+    "man:ko/man1/lzegrep.1" : "as-expected",
+    "man:ko/man1/xzegrep.1" : "as-expected",
+    "res:doc/xz-5.8.1/README" : "as-expected",
+    "inc:lzma/index.h" : "as-expected",
+    "man:uk/man1/lzcmp.1" : "as-expected",
+    "man:uk/man1/xzless.1" : "as-expected",
+    "man:man1/lzdiff.1" : "as-expected",
+    "man:it/man1/lzgrep.1" : "as-expected",
+    "bin:lzdiff" : "as-expected",
+    "man:ro/man1/unxz.1" : "as-expected",
+    "man:pt_BR/man1/lzmainfo.1" : "as-expected",
+    "man:uk/man1/unlzma.1" : "as-expected",
+    "man:sr/man1/lzma.1" : "as-expected",
+    "man:de/man1/lzma.1" : "as-expected",
+    "man:fr/man1/xzless.1" : "as-expected",
+    "inc:lzma/check.h" : "as-expected",
+    "man:man1/lzcat.1" : "as-expected",
+    "man:fr/man1/unlzma.1" : "as-expected",
+    "man:man1/lzmainfo.1" : "as-expected",
+    "bin:lzmadec" : "as-expected",
+    "bin:lzmainfo" : "as-expected",
+    "man:ro/man1/lzgrep.1" : "as-expected",
+    "man:fr/man1/lzmainfo.1" : "as-expected",
+    "man:ko/man1/xzdec.1" : "as-expected",
+    "man:pt_BR/man1/xzless.1" : "as-expected",
+    "man:ko/man1/xzless.1" : "as-expected",
+    "locale:hu/LC_MESSAGES/xz.mo" : "as-expected",
+    "man:pt_BR/man1/unlzma.1" : "as-expected",
+    "bin:lzcat" : "as-expected",
+    "man:man1/lzmadec.1" : "as-expected",
+    "man:ko/man1/unlzma.1" : "as-expected",
+    "man:fr/man1/xzdec.1" : "as-expected",
+    "man:de/man1/lzgrep.1" : "as-expected",
+    "man:uk/man1/lzmadec.1" : "as-expected",
+    "man:sr/man1/lzcat.1" : "as-expected",
+    "res:doc/xz-5.8.1/COPYING.GPLv2" : "as-expected",
+    "locale:it/LC_MESSAGES/xz.mo" : "as-expected",
+    "inc:lzma/index_hash.h" : "as-expected",
+    "man:man1/lzegrep.1" : "as-expected",
+    "man:de/man1/lzcmp.1" : "as-expected",
+    "man:uk/man1/xz.1" : "as-expected",
+    "man:man1/xzegrep.1" : "as-expected",
+    "man:it/man1/lzmore.1" : "as-expected",
+    "res:doc/xz-5.8.1/examples/03_compress_custom.c" : "as-expected",
+    "man:uk/man1/lzegrep.1" : "as-expected",
+    "locale:fi/LC_MESSAGES/xz.mo" : "as-expected",
+    "man:uk/man1/lzcat.1" : "as-expected",
+    "man:ro/man1/xzdec.1" : "as-expected",
+    "bin:xz" : "as-expected",
+    "man:man1/unxz.1" : "as-expected",
+    "man:uk/man1/xzegrep.1" : "as-expected",
+    "man:fr/man1/xz.1" : "as-expected",
+    "man:sr/man1/xzless.1" : "as-expected",
+    "man:pt_BR/man1/xzdec.1" : "as-expected",
+    "inc:lzma/vli.h" : "as-expected",
+    "man:ro/man1/lzmore.1" : "as-expected",
+    "res:doc/xz-5.8.1/examples/00_README.txt" : "as-expected",
+    "man:sr/man1/unlzma.1" : "as-expected",
+    "locale:es/LC_MESSAGES/xz.mo" : "as-expected",
+    "man:man1/lzgrep.1" : "as-expected",
+    "locale:uk/LC_MESSAGES/xz.mo" : "as-expected",
+    "man:ko/man1/unxz.1" : "as-expected",
+    "locale:sv/LC_MESSAGES/xz.mo" : "as-expected",
+    "lib:liblzma.so.5.8.1" : "as-expected",
+    "man:ko/man1/lzfgrep.1" : "as-expected",
+    "man:ko/man1/xzfgrep.1" : "as-expected",
+    "man:de/man1/lzmore.1" : "as-expected",
+    "man:man1/xzcmp.1" : "as-expected",
+    "locale:fr/LC_MESSAGES/xz.mo" : "as-expected",
+    "inc:lzma/base.h" : "as-expected",
+    "man:uk/man1/xzdiff.1" : "as-expected",
+    "res:doc/xz-5.8.1/history.txt" : "as-expected",
+    "man:uk/man1/lzma.1" : "as-expected",
+    "man:ko/man1/lzmainfo.1" : "as-expected"
+  },
+  "flags" : [
+    "simpleBuildEnvironment"
+  ],
+  "summary" : "General-purpose data compression software with high compression ratio",
+  "name" : "xz",
+  "md" : "PACKAGE.md",
+  "depends" : {
+    "build" : [
+      "bin:gcc",
+      "bin:make"
+    ],
+    "runtime" : [
+      "lib:libc.so.6"
+    ],
+    "manage" : [
+      "bin:wget",
+      "bin:tar"
+    ]
+  },
+  "url" : "https://tukaani.org/xz/",
+  "version" : "5.8.1",
+  "execs" : {
+    "build" : "usm-scripts/build.sh",
+    "install" : "usm-scripts/install.sh",
+    "acquire" : "usm-scripts/acquire.sh"
+  }
+}

+ 56 - 0
xz-5.8.1/PACKAGE.md

@@ -0,0 +1,56 @@
+# XZ Utils
+
+XZ Utils is free general-purpose data compression software with high compression ratio. XZ Utils were written for POSIX systems but have been ported to a few non-POSIX systems as well.
+
+## Features
+
+- **High Compression Ratio**: XZ format provides very high compression ratio, typically better than gzip and bzip2
+- **Fast Decompression**: Features an extremely fast decoder with speed in multiple GB/s per core
+- **LZMA2 Algorithm**: Uses the improved LZMA2 compression algorithm
+- **Multiple Formats**: Supports both legacy LZMA and modern XZ formats
+- **Wide Compatibility**: Available on virtually all Unix-like systems
+
+## Included Programs
+
+The package includes numerous command-line utilities:
+
+- `xz` - Compress or decompress files using the XZ format
+- `unxz` - Decompress files using the XZ format
+- `xzcat` - Decompress to standard output
+- `lzma` - Compress or decompress files using the legacy LZMA format
+- `unlzma` - Decompress files using the LZMA format
+- `lzcat` - Decompress to standard output
+- `xzdiff` - Run diff on XZ compressed files
+- `xzgrep` - Run grep on XZ compressed files
+- `xzless` - Run less on XZ compressed files
+- `xzmore` - Run more on XZ compressed files
+
+## Library
+
+- `liblzma` - The library implementing lossless, block-sorting data compression using the Lempel-Ziv-Markov chain algorithm
+
+## Usage Examples
+
+Basic compression:
+```bash
+xz file.txt
+```
+
+Decompression:
+```bash
+unxz file.txt.xz
+```
+
+Decompress to stdout:
+```bash
+xzcat file.txt.xz
+```
+
+Compression with custom level:
+```bash
+xz -9 file.txt  # Maximum compression
+```
+
+## Installation
+
+This package follows the Linux From Scratch (LFS) installation guidelines and includes all necessary components for a complete XZ Utils installation on Astrologue OS.

+ 29 - 0
xz-5.8.1/usm-scripts/acquire.sh

@@ -0,0 +1,29 @@
+#!/bin/bash
+set -e
+
+# XZ Utils 5.8.1 source acquisition script
+# Downloads and extracts the source code from the official repository
+
+ARCHIVE_URL="https://sourceforge.net/projects/lzmautils/files/xz-5.8.1.tar.xz/download"
+ARCHIVE_NAME="xz-5.8.1.tar.xz"
+EXTRACT_DIR="sources/xz"
+EXTRACT_SUBDIR="xz"
+
+echo "Downloading XZ Utils 5.8.1 source..."
+wget -O ${ARCHIVE_NAME} ${ARCHIVE_URL}
+
+echo "Creating extraction directory..."
+mkdir -p ${EXTRACT_DIR}
+
+echo "Extracting archive..."
+tar -xf ${ARCHIVE_NAME} -C ${EXTRACT_DIR}
+
+# The archive extracts to xz-5.8.1/, we want it to be in sources/xz/
+if [ -d "${EXTRACT_DIR}/xz-5.8.1" ]; then
+    mv ${EXTRACT_DIR}/xz-5.8.1 ${EXTRACT_DIR}/${EXTRACT_SUBDIR}
+fi
+
+echo "Cleaning up archive..."
+rm ${ARCHIVE_NAME}
+
+echo "Source acquisition complete."

+ 37 - 0
xz-5.8.1/usm-scripts/build.sh

@@ -0,0 +1,37 @@
+#!/bin/bash
+set -e
+
+# XZ Utils 5.8.1 build script
+# Configures and builds the package following LFS guidelines
+
+build_dir=$1
+
+# With simpleBuildEnvironment flag, we're already in the build directory
+# The source tree has been copied here by USM from sources/xz
+
+echo "Configuring XZ Utils 5.8.1..."
+# The configure script should be in the current directory
+# If not, check if we need to navigate to the source subdirectory
+if [ ! -f "./configure" ]; then
+    if [ -d "sources/xz/xz" ]; then
+        cd sources/xz/xz
+    elif [ -d "xz/xz" ]; then
+        cd xz/xz
+    elif [ -d "xz" ]; then
+        cd xz
+    else
+        echo "Error: configure script not found"
+        echo "Contents of current directory:"
+        ls -la
+        exit 1
+    fi
+fi
+
+./configure --prefix=${PREFIX} \
+            --disable-static \
+            --docdir=${PREFIX}/share/doc/xz-5.8.1
+
+echo "Building XZ Utils 5.8.1..."
+make
+
+echo "Build complete."

+ 33 - 0
xz-5.8.1/usm-scripts/install.sh

@@ -0,0 +1,33 @@
+#!/bin/bash
+set -e
+
+# XZ Utils 5.8.1 install script
+# Installs the built package to the destination directory
+
+build_dir=$1
+install_dir=$2
+install_type=$3
+
+# With simpleBuildEnvironment flag, we're already in build directory
+# DESTDIR is overridden to install_dir by USM
+
+# Navigate to source directory if needed
+if [ ! -f "Makefile" ]; then
+    if [ -d "sources/xz/xz" ]; then
+        cd sources/xz/xz
+    elif [ -d "xz/xz" ]; then
+        cd xz/xz
+    elif [ -d "xz" ]; then
+        cd xz
+    else
+        echo "Error: Makefile not found"
+        echo "Contents of current directory:"
+        ls -la
+        exit 1
+    fi
+fi
+
+echo "Installing XZ Utils 5.8.1 to ${install_dir}..."
+make DESTDIR=${install_dir} install
+
+echo "Installation complete."