#!/bin/sh # EXT=liblognorm TCZ=/tmp/$EXT/TCZ sudo rm -rf /tmp/$EXT DEPS="libestr-dev libfastjson-dev pcre-dev" NOTFOUND="" for a in compiletc bash file squashfs-tools $DEPS do tce-load -i $a || tce-load -iwl $a || NOTFOUND=x done test -z "$NOTFOUND" || exit export CC="gcc -mtune=generic -Os -pipe" export CXX="g++ -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" #make clean ./configure \ --enable-shared \ --enable-regexp \ || exit make || exit make install DESTDIR=$TCZ-dev for a in $(find $TCZ-dev -type f); do file -b $a | grep -q '^ELF .*not stripped$' && strip --strip-unneeded $a; done mkdir -p $TCZ/usr/local/lib mv $TCZ-dev/usr/local/lib/*.so* $TCZ/usr/local/lib mv $TCZ-dev/usr/local/bin $TCZ/usr/local sudo chown -R root.root $TCZ* mksquashfs $TCZ /tmp/$EXT/$EXT.tcz -noappend mksquashfs $TCZ-dev /tmp/$EXT/$EXT-dev.tcz -noappend