02-squashfs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Build script for squashfs4.3+.
  2. #
  3. # Copyright (c) 2018-2020 Matias Fonzo, <selk@dragora.org>.
  4. # Copyright (c) 2022 DustDFG, <dfgdust@gmail.com>.
  5. #
  6. # Licensed under the Apache License, Version 2.0 (the "License");
  7. # you may not use this file except in compliance with the License.
  8. # You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. version=4.5
  18. cd -- "$TMPDIR"
  19. rm -rf squashfs-tools-${version} \
  20. "${rootdir}/squashfs-tools_lzip"
  21. unpack "${worktree}/sources/squashfs${version}.tar.gz"
  22. # Build instructions
  23. cd squashfs-tools-${version}
  24. # Note:
  25. # The build environment for cross-compilation is not imported,
  26. # the squashfs-tools installation must work from the host system,
  27. # this will produce the compressed squash-image
  28. # Apply a patch to include LZIP support
  29. patch -p1 < "${worktree}/patches/squashfs-tools/squashfs-tools-4.5_lzip-0.diff"
  30. cd squashfs-tools
  31. make -j${jobs} CC=cc LDFLAGS="" \
  32. GZIP_SUPPORT=0 \
  33. LZIP_SUPPORT=1 \
  34. XZ_SUPPORT=0 \
  35. LZO_SUPPORT=0 \
  36. LZ4_SUPPORT=0 \
  37. ZSTD_SUPPORT=0 \
  38. COMP_DEFAULT=lzip \
  39. XATTR_SUPPORT=1 \
  40. install INSTALL_DIR="${rootdir}/squashfs-tools_lzip"
  41. cleanup()
  42. {
  43. cd -- "$TMPDIR" && rm -rf squashfs-tools-${version}
  44. }