02-squashfs 1.4 KB

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