#!/bin/bash

[ -d fontconfig-2.8.0 ] && rm -r fontconfig-2.8.0
tar zxvf fontconfig-2.8.0.tar.gz
cd fontconfig-2.8.0
./configure --prefix=/usr/local --sysconfdir=/etc
make
make install DESTDIR=/mnt/hda2/fontconfig/pkg
cd /mnt/hda2/fontconfig/pkg
find . | xargs file | grep "executable" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip -g 2> /dev/null