Update build script.

Adapted from CSB project

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackware-id.org>