Sfoglia il codice sorgente

feat(xz): enhance package configuration and documentation

- Update MANIFEST.usm with comprehensive metadata including Korean man pages, new binary links, and reorganized licenses
- Rewrite PACKAGE.md with detailed usage examples, component descriptions, and improved structure
- Refactor build scripts to be more robust with better error handling and simplified parameter passing
- Add test script support for package validation
- Remove explicit build dependencies to use system defaults
- Improve package summary and descriptions for better clarity
clanker 1 mese fa
parent
commit
91d53f73ac

+ 25 - 19
xz-5.8.1/MANIFEST.usm

@@ -166,6 +166,7 @@
       "type" : "lnk",
       "pathBase" : "as-expected"
     },
+    "man:ko/man1/xzgrep.1" : "as-expected",
     "man:sr/man1/lzegrep.1" : {
       "dest" : "xzgrep.1",
       "type" : "lnk",
@@ -211,6 +212,11 @@
       "type" : "lnk",
       "pathBase" : "as-expected"
     },
+    "bin:lzcmp" : {
+      "dest" : "xzdiff",
+      "type" : "lnk",
+      "pathBase" : "as-expected"
+    },
     "man:man1/xzless.1" : "as-expected",
     "man:ro/man1/lzmadec.1" : {
       "dest" : "xzdec.1",
@@ -834,18 +840,17 @@
       "dest" : "xz.1",
       "type" : "lnk",
       "pathBase" : "as-expected"
-    }
+    },
+    "man:ko/man1/lzmainfo.1" : "as-expected"
   },
   "flags" : [
     "simpleBuildEnvironment"
   ],
-  "summary" : "XZ-format data compression library and utilities",
+  "summary" : "XZ Utils is a free general-purpose data compression software with high compression ratio",
   "name" : "xz",
+  "md" : "PACKAGE.md",
   "depends" : {
-    "build" : [
-      "bin:gcc",
-      "bin:make"
-    ],
+    "build" : [],
     "runtime" : [],
     "manage" : [
       "bin:bash",
@@ -855,30 +860,31 @@
   },
   "url" : "https://tukaani.org/xz",
   "version" : "5.8.1",
-  "licences": [
+  "licences" : [
     {
-      "name": "BSD Zero Clause License",
-      "category": "libre",
-      "text": "COPYING.0BSD"
+      "category" : "libre",
+      "name" : "BSD Zero Clause License",
+      "text" : "COPYING.0BSD"
     },
     {
-      "name": "GNU General Public License v2",
-      "category": "libre",
-      "text": "COPYING.GPLv2"
+      "category" : "libre",
+      "name" : "GNU Lesser General Public License v2.1",
+      "text" : "COPYING.LGPLv2.1"
     },
     {
-      "name": "GNU General Public License v3",
-      "category": "libre",
-      "text": "COPYING.GPLv3"
+      "category" : "libre",
+      "name" : "GNU General Public License v2",
+      "text" : "COPYING.GPLv2"
     },
     {
-      "name": "GNU Lesser General Public License v2.1",
-      "category": "libre",
-      "text": "COPYING.LGPLv2.1"
+      "category" : "libre",
+      "name" : "GNU General Public License v3",
+      "text" : "COPYING.GPLv3"
     }
   ],
   "execs" : {
     "build" : "usm-scripts/build.sh",
+    "test" : "usm-scripts/test.sh",
     "install" : "usm-scripts/install.sh",
     "acquire" : "usm-scripts/acquire.sh"
   }

+ 71 - 24
xz-5.8.1/PACKAGE.md

@@ -1,36 +1,83 @@
 # XZ Utils
 
-XZ Utils is a high-performance data compression library and command-line tools that provide the XZ format, which offers significantly better compression ratios than traditional formats like gzip and bzip2.
+XZ Utils is free general-purpose data compression software with high compression ratio. XZ Utils were written for POSIX-like systems, but also work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils.
 
 ## Features
 
-- **High Compression Ratio**: Achieves excellent compression ratios, typically 30-50% better than gzip
-- **Multiple Formats**: Supports both the legacy .lzma format and the modern .xz format
-- **Integrity Checking**: Built-in CRC32, CRC64, and SHA-256 integrity checks
-- **Multi-threading**: Utilizes multiple CPU cores for faster compression/decompression
-- **Small Memory Footprint**: Efficient implementation suitable for embedded systems
+- High compression ratio
+- Fast decompression
+- Small memory requirements for decompression
+- Multi-threading support for compression
+- Integrity checking (CRC32, CRC64, SHA-256)
+- Easy-to-use command line interface
+- API for integration with applications
 
-## Included Tools
+## Main Components
 
-- **xz**: Main compression/decompression tool with advanced features
-- **xzdec**: Small decompressor for memory-constrained environments
-- **lzmainfo**: Displays information about .lzma files
-- **lzmadec**: Decompresses legacy .lzma format files
-- **Scripts**: Helper scripts for compressed file operations (xzgrep, xzdiff, xzmore, etc.)
+- **xz** - The primary compression/decompression tool
+- **unxz** - Decompression tool (symlink to xz)
+- **xzcat** - Decompresses to standard output (symlink to xz)
+- **lzma** - Compatibility tool for LZMA format (symlink to xz)
+- **unlzma** - Decompression tool for LZMA format (symlink to xz)
+- **lzcat** - Decompresses LZMA to standard output (symlink to xz)
+- **xzdec** - Small decompressor for embedded use
+- **lzmadec** - Small LZMA decompressor for embedded use
+- **lzmainfo** - Shows information stored in LZMA files
+- **liblzma** - Compression library with C API
 
-## Applications
+## Usage Examples
 
-XZ Utils is widely used in:
-- System backup and archiving tools
-- Software distribution and packaging
-- Embedded systems and firmware
-- Data compression for cloud storage and transmission
+### Basic Compression
+```bash
+# Compress a file
+xz file.txt
 
-## License
+# Compress with maximum compression
+xz -9 file.txt
 
-XZ Utils is released under multiple free software licenses:
-- BSD Zero Clause License (0BSD) for most components
-- GNU GPL v2/v3 for some components
-- GNU LGPL v2.1 for getopt_long functionality in scripts
+# Compress keeping the original file
+xz -k file.txt
+```
 
-This package provides the complete XZ Utils suite including libraries, command-line tools, and development headers for integration with other applications.
+### Basic Decompression
+```bash
+# Decompress a file
+unxz file.txt.xz
+
+# Decompress to standard output
+xzcat file.txt.xz
+```
+
+### Advanced Options
+```bash
+# Compress with custom dictionary size
+xz --dict-size=64MiB file.txt
+
+# Compress with multiple threads
+xz -T4 file.txt
+
+# Test integrity of compressed file
+xz -t file.txt.xz
+```
+
+## Library Integration
+
+The liblzma library provides a C API for applications to integrate XZ compression capabilities. Header files are installed in `${PREFIX}/include/lzma/` and the library can be linked with `-llzma`.
+
+## Licenses
+
+XZ Utils is distributed under multiple libre licenses:
+- BSD Zero Clause License (0BSD)
+- GNU Lesser General Public License v2.1 (LGPLv2.1)
+- GNU General Public License v2 (GPLv2)
+- GNU General Public License v3 (GPLv3)
+
+You can choose to use the software under any of these licenses.
+
+## Documentation
+
+Comprehensive man pages are available for all commands and the library API. Additional documentation and examples can be found in `${PREFIX}/share/doc/xz/`.
+
+## More Information
+
+For more details, visit the official website: https://tukaani.org/xz/

+ 18 - 15
xz-5.8.1/usm-scripts/acquire.sh

@@ -1,26 +1,29 @@
 #!/bin/bash
 set -e
 
-ARCHIVE_URL="https://github.com/tukaani-project/xz/releases/download/v5.8.1/xz-5.8.1.tar.xz"
-ARCHIVE_NAME="xz-5.8.1.tar.xz"
-EXTRACT_DIR="sources"
-SOURCE_DIR="xz"
+# Package information
+PACKAGE_NAME="xz"
+PACKAGE_VERSION="5.8.1"
+ARCHIVE_URL="https://github.com/tukaani-project/xz/releases/download/v${PACKAGE_VERSION}/${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.xz"
+ARCHIVE_NAME="${PACKAGE_NAME}.tar.xz"
+EXTRACT_DIR="sources/${PACKAGE_NAME}"
 
-# Create sources directory
-mkdir -p ${EXTRACT_DIR}
+echo "Acquiring ${PACKAGE_NAME} version ${PACKAGE_VERSION}..."
 
-echo "Downloading xz source..."
-wget -O ${ARCHIVE_NAME} ${ARCHIVE_URL}
+# Create sources directory if it doesn't exist
+mkdir -p sources
 
-echo "Extracting archive..."
-tar -xf ${ARCHIVE_NAME} -C ${EXTRACT_DIR}
+# Download the source archive
+echo "Downloading from ${ARCHIVE_URL}..."
+wget -O "${ARCHIVE_NAME}" "${ARCHIVE_URL}"
 
-# Rename extracted directory to match expected name
-if [ -d "${EXTRACT_DIR}/xz-5.8.1" ]; then
-    mv "${EXTRACT_DIR}/xz-5.8.1" "${EXTRACT_DIR}/${SOURCE_DIR}"
-fi
+# Extract the archive
+echo "Extracting archive..."
+mkdir -p "${EXTRACT_DIR}"
+tar -xf "${ARCHIVE_NAME}" -C "${EXTRACT_DIR}" --strip-components=1
 
+# Clean up the downloaded archive
 echo "Cleaning up..."
-rm ${ARCHIVE_NAME}
+rm "${ARCHIVE_NAME}"
 
 echo "Source acquisition complete."

+ 8 - 6
xz-5.8.1/usm-scripts/build.sh

@@ -1,15 +1,17 @@
 #!/bin/bash
 set -e
 
-build_dir=$1
-
-# Change to source directory
+# Change to the source directory
 cd sources/xz
 
-# Configure the build with proper paths
-./configure --prefix=${PREFIX} --libdir=${LIBDIR} --bindir=${BINDIR} --includedir=${INCLUDEDIR} --mandir=${MANDIR}
+echo "Configuring xz..."
+
+# Configure with standard options and using all available threads
+./configure --prefix=${PREFIX} --libdir=${LIBDIR} --mandir=${MANDIR} --infodir=${INFODIR} --datadir=${DATADIR} --disable-silent-rules
+
+echo "Building xz..."
 
 # Build using all available threads
 make -j$(nproc)
 
-echo "Build complete."
+echo "Build completed."

+ 6 - 8
xz-5.8.1/usm-scripts/install.sh

@@ -1,14 +1,12 @@
 #!/bin/bash
 set -e
 
-build_dir=$1
-install_dir=$2
-install_type=$3
-
-# Change to source directory
+# Change to the source directory
 cd sources/xz
 
-# Install the built files
-make install DESTDIR=${install_dir} PREFIX=${PREFIX} LIBDIR=${LIBDIR} BINDIR=${BINDIR} INCLUDEDIR=${INCLUDEDIR} MANDIR=${MANDIR}
+echo "Installing xz..."
+
+# Install to the specified destination directory
+make install DESTDIR=${DESTDIR} prefix=${PREFIX} libdir=${LIBDIR} mandir=${MANDIR} infodir=${INFODIR} datadir=${DATADIR}
 
-echo "Installation complete."
+echo "Installation completed."

+ 12 - 0
xz-5.8.1/usm-scripts/test.sh

@@ -0,0 +1,12 @@
+#!/bin/bash
+set -e
+
+# Change to the source directory
+cd sources/xz
+
+echo "Running tests for xz..."
+
+# Run the test suite using all available threads
+make check -j$(nproc)
+
+echo "Tests completed."