Clone wiki

snacklinux / Packages

Building Packages

For native compilations, compile normally and set the --prefix to something accessible. Change to the install directory and tar it up, like so: tar zcvf mypackage-1.0.tgz bin/ lib/ man/

For non-native compilations (using the Buildroot toolchain), compile as you would for a native build, but set --host=i686-linux and try to enable any static compilation options. Prefixing the configure script with LDFLAGS=-static is a good idea when the program does not have any explicit static compilation options.

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.


These are for native packages, as in built for SnackLinux on SnackLinux

bash 4.2

./configure --enable-static-link --enable-largefile --prefix=/path/to/_install --without-bash-malloc

sed 4.2.2

./configure LDFLAGS=-static --prefix=/path/to/_install
make && make install

make 3.82

./configure --prefix=/path/to/_install
make install

dropbear 2013.62

./configure --disable-zlib --prefix=/path/to/_install

make PROGRAMS="dropbear dropbearkey scp" STATIC=1 MULTI=1 SCPPROGRESS=1
cp dropbearmulti /path/to/install && cd /path/to/install
ln -s dropbearmulti dropbearkey
ln -s dropbearmulti dbclient
ln -s dropbearmulti scp
ln -s dropbearmulti dropbear


mkdir /etc/dropbear && cd /etc/dropbear
dropbearkey -t rsa -f dropbear_rsa_host_key
dropbearkey -t dss -f dropbear_dss_host_key
dropbear -p myip:22


grep 2.14

./configure --disable-nls --prefix=/path/to/_install
CC="gcc -s" LDFLAGS="-s" make -j2
make install

tar 1.26

./configure --disable-nls --prefix=/path/to/_install
CC="gcc -s" LDFLAGS="-s" 
make -j2
make install

gawk 4.1.0

./configure --disable-nls --prefix=/path/to/_install
make && make install

libtool 2.4.2

./configure --prefix=/path/to/_install
make && make install


gcc 4.6.4

cd .. && mkdir objdir && cd objdir
CFLAGS="-s" LDFLAGS="-s" $PWD/../gcc-4.6.4/configure --prefix=$HOME/gccinstalldir --enable-languages=c,c++ --disable-nls --host=i686-buildroot-linux-uclibc --disable-multilib --target=i686-buildroot-linux-uclibc --enable-shared --enable-c99 --enable-long-long --enable-threads=posix --disable-tls --disable-bootstrap --enable-__cxa_atexit --enable-clocale=gnu --disable-libstdcxx-pch --with-sysroot=/path/to/snacklinux/_install --disable-libmudflap

coreutils 8.9

LDFLAGS=-static ./configure --prefix=/path/to/_install --disable-nls --host=i686-linux
make && make install

ncurses 5.9

CC="i686-linux-cc -s" ./configure --with-normal --without-develop --without-debug --enable-overwrite --host=i686-linux --prefix=/path/to/_install --disable-home-terminfo --with-termlib --disable-big-core

make && make install

dialog 1.2

LDFLAGS="-static"  CC="i686-linux-cc -s" ./configure --with-ncurses --host=i686-linux --prefix=/path/to/_install --with-curses-dir=/path/to/ncurse/_install/dir --disable-nls 
make && make install


export TERMINFO=/share/terminfo 
LDFLAGS="-static" ./configure --disable-ipv6 --disable-backtrace --disable-nls --enable-fastmem --without-zlib --without-bzlib --disable-xbel --without-lua --without-gnutls --without-openssl --without-x --enable-small --without-spidermonkey --without-gpm --prefix=/path/to/_install --host=i686-linux

lilo 24.0

CC=i686-linux-cc make alles
cp src/lilo.static ../_install/bin/lilo

binutils 2.23.2

binutils needs to be patched, otherwise this occurs:

patch -p1 < binutils-2.23.2-texinfo-5.0.patch

./configure --host=i686-linux --target=i686-linux--disable-nls --disable-werror --prefix=/path/to/install/to --disable-shared --disable-multilib --with-sysroot=/path/to/root/_install

make configure-host
make LDFLAGS="-all-static" && make install


make headers_install ARCH=x86 INSTALL_HDR_PATH=/path/to/install/headers/to