@@ -30,28 +30,31 @@ if [ ! -e "./inotify-tools-3.14/libinotifytools/src/.libs/libinotifytools.a" ] ;
3030 ./configure --prefix=` pwd` /build --libdir=` pwd` /build/lib
3131 make
3232 make install
33+ rm inotify-tools-3.14/build/lib/* .so*
3334 cd -
3435fi
3536
3637# Build lzma
3738if [ ! -e " ./xz-5.2.3/build/lib/liblzma.a" ] ; then
38- wget http://tukaani.org/xz/xz-5.2.3.tar.gz
39+ wget -c http://tukaani.org/xz/xz-5.2.3.tar.gz
3940 tar xf xz-5.2.3.tar.gz
4041 cd xz-5.2.3
4142 mkdir -p build/lib
4243 ./configure --prefix=` pwd` /build --libdir=` pwd` /build/lib --enable-static
4344 make && make install
45+ rm xz-5.2.3/build/lib/* .so*
4446 cd -
4547fi
4648
4749# Build openssl
4850if [ ! -e " ./openssl-1.1.0c/build/lib/libssl.a" ] ; then
49- wget https://www.openssl.org/source/openssl-1.1.0c.tar.gz
51+ wget -c https://www.openssl.org/source/openssl-1.1.0c.tar.gz
5052 tar xf openssl-1.1.0c.tar.gz
5153 cd openssl-1.1.0c
5254 mkdir -p build/lib
5355 ./config --prefix=` pwd` /build
5456 make && make install
57+ rm openssl-1.1.0c/build/lib/* .so*
5558 cd -
5659fi
5760
7780# Patch make file to use static lzma
7881sed -i " s|XZ_LIBS = -llzma -L$( pwd) /../xz-5.2.3/build/lib|XZ_LIBS = -Bstatic -llzma -L$( pwd) /../xz-5.2.3/build/lib|g" Makefile
7982
80- # Patch squashfuse-tools Makefile to link against static llzma
81- sed -i " s|CFLAGS += -DXZ_SUPPORT|CFLAGS += -DXZ_SUPPORT -I../../xz-5.2.3/build/include|g" ../squashfs-tools/squashfs-tools/Makefile
82- sed -i " s|LIBS += -llzma|LIBS += -Bstatic -llzma -L../../xz-5.2.3/build/lib|g" ../squashfs-tools/squashfs-tools/Makefile
83-
8483bash --version
8584
8685make
8786
8887cd ..
8988
89+ # Build mksquashfs with -offset option to skip n bytes
90+ # https://github.com/plougher/squashfs-tools/pull/13
91+ cd squashfs-tools/squashfs-tools
92+
93+ # Patch squashfuse-tools Makefile to link against static llzma
94+ sed -i " s|CFLAGS += -DXZ_SUPPORT|CFLAGS += -DXZ_SUPPORT -I../../xz-5.2.3/build/include|g" Makefile
95+ sed -i " s|LIBS += -llzma|LIBS += -Bstatic -llzma -L../../xz-5.2.3/build/lib|g" Makefile
96+
97+ make XZ_SUPPORT=1 mksquashfs # LZ4_SUPPORT=1 did not build yet on CentOS 6
98+ strip mksquashfs
99+
100+ cd ../../
101+
102+ pwd
103+
90104mkdir build
91105cd build
92106
107+ cp ../squashfs-tools/squashfs-tools/mksquashfs .
108+
93109# Compile runtime but do not link
94110
95111cc -DVERSION_NUMBER=\" $( git describe --tags --always --abbrev=7) \" -I../squashfuse/ -D_FILE_OFFSET_BITS=64 -g -Os -c ../runtime.c
0 commit comments