export CFLAGS="-mtune=generic -Os -pipe" export CXXFLAGS="-mtune=generic -Os -pipe" export LDFLAGS="-Wl,-O1" tar -xf weechat-*.tar.gz cd weechat-*/ mkdir build cd build/ cmake .. -DENABLE_GUILE=OFF -DENABLE_LUA=OFF -DENABLE_PERL=OFF -DENABLE_PHP=OFF -DENABLE_PYTHON=OFF -DENABLE_RUBY=OFF -DENABLE_TCL=OFF make make DESTDIR=/tmp/weechat install cd ../.. rm -rf weechat-*/ cd /tmp/weechat/ find . | xargs file | grep "executable" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip --strip-unneeded find . | xargs file | grep "shared object" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip -g find . -regex ".*\.\(a\|deps\|h\|la\|m4\|pc\|vapi\)" | cpio -pdm ../weechat-dev find . -regex ".*\.\(a\|deps\|h\|la\|m4\|pc\|vapi\)" | xargs rm -f find . -type d | xargs rmdir -p find usr/ -not -type d > ~/weechat.tcz.list cd ../weechat-dev/ find usr/ -not -type d > ~/weechat-dev.tcz.list cd .. mksquashfs weechat/ ~/weechat.tcz mksquashfs weechat-dev/ ~/weechat-dev.tcz rm -rf weechat*/ cd md5sum weechat.tcz > weechat.tcz.md5.txt md5sum weechat-dev.tcz > weechat-dev.tcz.md5.txt du -h weechat*.tcz