export CFLAGS="-mtune=generic -Os -pipe"
export CXXFLAGS="-mtune=generic -Os -pipe"
export LDFLAGS="-Wl,-O1"
tar -xf profanity-*.tar.gz
cd profanity-*/
./configure --disable-python-plugins
make
make DESTDIR=/tmp/profanity install
cd ..
rm -rf profanity-*/
cd /tmp/profanity/
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 ../profanity-dev
find . -regex ".*\.\(a\|deps\|h\|la\|m4\|pc\|vapi\)" | xargs rm -f
find . -type d | xargs rmdir -p
find usr/ -not -type d > ~/profanity.tcz.list
cd ../profanity-dev/
find usr/ -not -type d > ~/profanity-dev.tcz.list
cd ..
mksquashfs profanity/ ~/profanity.tcz
mksquashfs profanity-dev/ ~/profanity-dev.tcz
rm -rf profanity*/
cd
md5sum profanity.tcz > profanity.tcz.md5.txt
md5sum profanity-dev.tcz > profanity-dev.tcz.md5.txt
du -h profanity*.tcz
