Added lz4 and squashfs-tools

This commit is contained in:
dslm4515
2022-04-03 17:59:57 -05:00
parent 5290423320
commit f477d834a4
2 changed files with 99 additions and 0 deletions

52
build-scripts/lz4.build Normal file
View File

@ -0,0 +1,52 @@
#! /bin/bash
# lz4
# Source: https://github.com/lz4/lz4/archive/v1.9.3.tar.gz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: NONE
# Recommended: NONE
# Optional: NONE
make PREFIX=/usr -j2 && \
sudo -S make PREFIX=/usr DESTDIR=$BUILD install && \
sudo -S mkdir -pv /BMAN/install /BMAN/usr && \
sudo -S mv $BUILD/usr/share /BMAN/usr/ && \
cd $BUILD && sudo -S mkdir -v ${BUILD}/install &&
cat > /tmp/slack-desc << "EOF"
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
lz4: lz4
lz4:
lz4: LZ4 is lossless compression algorithm with fast decoder @ multiple
lz4: GB/s per core.
lz4:
lz4: https://github.com/lz4/lz4
lz4
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/lz4-1.9.3-$(uname -m)-mlfs.txz && \
cd /BMAN && \
cat > /tmp/slack-desc << "EOF"
lz4-doc: Manpages for lz4
lz4-doc:
lz4-doc: LZ4 is lossless compression algorithm with fast decoder @ multiple
lz4-doc: GB/s per core.
lz4-doc:
lz4-doc: https://github.com/lz4/lz4
lz4-doc:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/lz4-doc-1.9.3-noarch-mlfs.txz && \
sudo -S rm -rf ${BUILD}/* /BMAN/*

View File

@ -0,0 +1,47 @@
#! /bin/bash
# Squashfs-Tools
# Source: https://github.com/plougher/squashfs-tools/archive/4.5.tar.gz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: lz4
# Recommended: NONE
# Optional: NONE
# Apply patches from Alpine Linux
patch -Np1 -i ../patches/squashfs-tools-alpine/0001-unsquashfs-use-squashfs_closedir-to-delete-directory.patch
patch -Np1 -i ../patches/squashfs-tools-alpine/0002-unsquashfs-dynamically-allocate-name.patch
patch -Np1 -i ../patches/squashfs-tools-alpine/0003-unsquashfs-use-linked-list-to-store-directory-names.patch
patch -Np1 -i ../patches/squashfs-tools-alpine/0004-Unsquashfs-additional-write-outside-destination-dire.patch
patch -Np1 -i ../patches/squashfs-tools-alpine/0005-Unsquashfs-Add-makefile-entry-for-unsquash-12.o.patch
patch -Np1 -i ../patches/squashfs-tools-alpine/fix-compat.patch
make -C squashfs-tools XZ_SUPPORT=1 LZO_SUPPORT=1 LZ4_SUPPORT=1 ZSTD_SUPPORT=1 -j2 && \
sudo -S mkdir -pv $BUILD/usr/sbin && \
sudo -S cp -a squashfs-tools/*squashfs $BUILD/usr/sbin && \
cd $BUILD && sudo -S mkdir -v ${BUILD}/install &&
cat > /tmp/slack-desc << "EOF"
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
squashfs-tools: squashfs-tools
squashfs-tools:
squashfs-tools: Tools for squashfs, a highly compressed read-only filesystem for
squashfs-tools: Linux.
squashfs-tools:
squashfs-tools: https://github.com/plougher/squashfs-tools
squashfs-tools:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/squashfs-tools-4.5-$(uname -m)-mlfs.txz &&
sudo -S rm -rf ${BUILD}/*