Building packages

This is an old revision of the document!


Building packages

For native compilations export CC to CC=“musl-gcc -static”, compile normally. See below for an example.

export CC="musl-gcc -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/

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/