1 # Build script for squashfs4.3+.
3 # Copyright (c) 2018-2019 Matias Fonzo, <selk@dragora.org>.
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
9 # http://www.apache.org/licenses/LICENSE-2.0
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.
17 # From http://github.com/plougher/squashfs-tools
22 rm -rf squashfs-tools-${version} \
23 "${rootdir}/squashfs-tools_lzip"
24 unpack "${worktree}/sources/squashfs-tools-${version}.zip"
27 cd squashfs-tools-${version}
30 # The build environment for cross-compilation is not imported,
31 # the squashfs-tools installation must work from the host system,
32 # this will produce the compressed squash-image
34 # Apply a patch to include LZIP support
35 patch -p1 < "${worktree}/patches/squashfs-tools/squashfs-tools-20180628_lzip-0.diff"
37 # Apply some patches from http://sources.debian.org/patches/squashfs-tools/1:4.3-12/
38 # to make it the final ISO more reliable
39 for file in "${worktree}/patches/squashfs-tools"/????-*.patch
41 echo "Applying patch: $file ..."
49 CC=cc LDFLAGS="" all INSTALL_DIR="${rootdir}/squashfs-tools_lzip"
52 CC=cc LDFLAGS="" install INSTALL_DIR="${rootdir}/squashfs-tools_lzip"
56 cd -- "$TMPDIR" && rm -rf squashfs-tools-${version}