Building packages

This is an old revision of the document!


Building packages

Example build flow:

export LDFLAGS="-static"
export C_INCLUDE_PATH=/include:/usr/include


tar xvf myfancysoftware-1.0.tar.gz && cd myfancysoftware-1.0
./configure --prefix=/usr --enable-static
make
make DESTDIR=/home/user/staging-myfancysoftware

cd /home/user/staging-myfancysoftware
tar czvf myfancysoftware-1.0.tgz usr/

If configure complains about /lib/cpp failing sanity check, try this:

export CPPFLAGS="-I/include -I/usr/include"

and recompile.

For non-native compilations (using the musl toolchain) set –host=i486-musl-linux and enable any static compilation options (such as CFLAGS=“static”).

As well, for either types of builds setting CFLAGS=“-s” LDFLAGS=“-s” is a good idea to automatically have gcc to strip the libs and binaries.

A mirror of all the packages tars are available here: http://snacklinux.org/tars/