morpheus

suckless linux distro
git clone git://git.2f30.org/morpheus.git
Log | Files | Refs | Submodules | README | LICENSE

commit 81f18a212ffb1ef43e14d36a5498d1c8a5239c46
parent 96ab54a4effadf9512681764a12bda8e7169e521
Author: sin <sin@2f30.org>
Date:   Tue Sep 17 15:26:52 +0100

Cleanup build system

Diffstat:
cross-scripts/curl | 25+++++++++++++++++++++++++
cross-scripts/curl-7.32.0 | 25-------------------------
cross-scripts/libevent | 24++++++++++++++++++++++++
cross-scripts/libevent-2.0.21 | 24------------------------
cross-scripts/libsigc++ | 24++++++++++++++++++++++++
cross-scripts/libsigc++-2.3.1 | 24------------------------
cross-scripts/libtorrent | 24++++++++++++++++++++++++
cross-scripts/libtorrent-0.13.3 | 24------------------------
cross-scripts/musl | 24++++++++++++++++++++++++
cross-scripts/musl-0.9.13 | 24------------------------
cross-scripts/ncurses | 27+++++++++++++++++++++++++++
cross-scripts/ncurses-5.9 | 27---------------------------
cross-scripts/zlib | 24++++++++++++++++++++++++
cross-scripts/zlib-1.2.8 | 24------------------------
pkgbuild | 9+--------
prepare-env | 8++++++++
repack | 3+--
stage0 | 29++++++++++-------------------
18 files changed, 192 insertions(+), 201 deletions(-)
diff --git a/cross-scripts/curl b/cross-scripts/curl @@ -0,0 +1,25 @@ +url=$mirror/curl-7.32.0.tar.gz + +fetch() { + wget -c $url -O src/curl-7.32.0.tar.gz +} + +unpack() { + pushd src + [ -d curl-7.32.0 ] || tar xzf curl-7.32.0.tar.gz + popd +} + +build() { + pushd src/curl-7.32.0 + CC=musl-gcc ./configure --prefix=$top/cross --with-ssl \ + --with-random=/dev/urandom --disable-shared + make CC=musl-gcc -j$nprocs + popd +} + +install() { + pushd src/curl-7.32.0 + make install + popd +} diff --git a/cross-scripts/curl-7.32.0 b/cross-scripts/curl-7.32.0 @@ -1,25 +0,0 @@ -url=$mirror/curl-7.32.0.tar.gz - -fetch() { - wget -c $url -O src/curl-7.32.0.tar.gz -} - -unpack() { - pushd src - [ -d curl-7.32.0 ] || tar xzf curl-7.32.0.tar.gz - popd -} - -build() { - pushd src/curl-7.32.0 - CC=musl-gcc ./configure --prefix=$top/cross --with-ssl \ - --with-random=/dev/urandom --disable-shared - make CC=musl-gcc -j$nprocs - popd -} - -install() { - pushd src/curl-7.32.0 - make install - popd -} diff --git a/cross-scripts/libevent b/cross-scripts/libevent @@ -0,0 +1,24 @@ +url=$mirror/libevent-2.0.21-stable.tar.gz + +fetch() { + wget -c $url -O src/libevent-2.0.21-stable.tar.gz +} + +unpack() { + pushd src + [ -d libevent-2.0.21-stable ] || tar xzf libevent-2.0.21-stable.tar.gz + popd +} + +build() { + pushd src/libevent-2.0.21-stable + CC=musl-gcc ./configure --prefix=$top/cross --disable-shared + make CC=musl-gcc -j$nprocs + popd +} + +install() { + pushd src/libevent-2.0.21-stable + make install + popd +} diff --git a/cross-scripts/libevent-2.0.21 b/cross-scripts/libevent-2.0.21 @@ -1,24 +0,0 @@ -url=$mirror/libevent-2.0.21-stable.tar.gz - -fetch() { - wget -c $url -O src/libevent-2.0.21-stable.tar.gz -} - -unpack() { - pushd src - [ -d libevent-2.0.21-stable ] || tar xzf libevent-2.0.21-stable.tar.gz - popd -} - -build() { - pushd src/libevent-2.0.21-stable - CC=musl-gcc ./configure --prefix=$top/cross --disable-shared - make CC=musl-gcc -j$nprocs - popd -} - -install() { - pushd src/libevent-2.0.21-stable - make install - popd -} diff --git a/cross-scripts/libsigc++ b/cross-scripts/libsigc++ @@ -0,0 +1,24 @@ +url=$mirror/libsigc++-2.3.1.tar.xz + +fetch() { + wget -c $url -O src/libsigc++-2.3.1.tar.xz +} + +unpack() { + pushd src + [ -d libsigc++-2.3.1.tar.xz ] || tar xJf libsigc++-2.3.1.tar.xz + popd +} + +build() { + pushd src/libsigc++-2.3.1 + CC=musl-gcc ./configure --prefix=$top/cross --disable-shared --enable-static + make CC=musl-gcc -j$nprocs + popd +} + +install() { + pushd src/libsigc++-2.3.1 + make install + popd +} diff --git a/cross-scripts/libsigc++-2.3.1 b/cross-scripts/libsigc++-2.3.1 @@ -1,24 +0,0 @@ -url=$mirror/libsigc++-2.3.1.tar.xz - -fetch() { - wget -c $url -O src/libsigc++-2.3.1.tar.xz -} - -unpack() { - pushd src - [ -d libsigc++-2.3.1.tar.xz ] || tar xJf libsigc++-2.3.1.tar.xz - popd -} - -build() { - pushd src/libsigc++-2.3.1 - CC=musl-gcc ./configure --prefix=$top/cross --disable-shared --enable-static - make CC=musl-gcc -j$nprocs - popd -} - -install() { - pushd src/libsigc++-2.3.1 - make install - popd -} diff --git a/cross-scripts/libtorrent b/cross-scripts/libtorrent @@ -0,0 +1,24 @@ +url=$mirror/libtorrent-0.13.3.tar.gz + +fetch() { + wget -c $url -O src/libtorrent-0.13.3.tar.gz +} + +unpack() { + pushd src + [ -d libtorrent-0.13.3 ] || tar xzf libtorrent-0.13.3.tar.gz + popd +} + +build() { + pushd src/libtorrent-0.13.3 + CC=musl-gcc ./configure --prefix=$top/cross --disable-shared + make CC=musl-gcc -j$nprocs + popd +} + +install() { + pushd src/libtorrent-0.13.3 + make install + popd +} diff --git a/cross-scripts/libtorrent-0.13.3 b/cross-scripts/libtorrent-0.13.3 @@ -1,24 +0,0 @@ -url=$mirror/libtorrent-0.13.3.tar.gz - -fetch() { - wget -c $url -O src/libtorrent-0.13.3.tar.gz -} - -unpack() { - pushd src - [ -d libtorrent-0.13.3 ] || tar xzf libtorrent-0.13.3.tar.gz - popd -} - -build() { - pushd src/libtorrent-0.13.3 - CC=musl-gcc ./configure --prefix=$top/cross --disable-shared - make CC=musl-gcc -j$nprocs - popd -} - -install() { - pushd src/libtorrent-0.13.3 - make install - popd -} diff --git a/cross-scripts/musl b/cross-scripts/musl @@ -0,0 +1,24 @@ +url=$mirror/musl-0.9.13.tar.gz + +fetch() { + wget -c $url -O src/musl-0.9.13.tar.gz +} + +unpack() { + pushd src + [ -d musl-0.9.13 ] || tar xzf musl-0.9.13.tar.gz + popd +} + +build() { + pushd src/musl-0.9.13 + ./configure --prefix=$top/cross --syslibdir=$top/cross/lib --disable-shared + make -j$nprocs + popd +} + +install() { + pushd src/musl-0.9.13 + make install + popd +} diff --git a/cross-scripts/musl-0.9.13 b/cross-scripts/musl-0.9.13 @@ -1,24 +0,0 @@ -url=$mirror/musl-0.9.13.tar.gz - -fetch() { - wget -c $url -O src/musl-0.9.13.tar.gz -} - -unpack() { - pushd src - [ -d musl-0.9.13 ] || tar xzf musl-0.9.13.tar.gz - popd -} - -build() { - pushd src/musl-0.9.13 - ./configure --prefix=$top/cross --syslibdir=$top/cross/lib --disable-shared - make -j$nprocs - popd -} - -install() { - pushd src/musl-0.9.13 - make install - popd -} diff --git a/cross-scripts/ncurses b/cross-scripts/ncurses @@ -0,0 +1,27 @@ +url=$mirror/ncurses.tar.gz + +fetch() { + wget -c $url -O src/ncurses.tar.gz +} + +unpack() { + pushd src + [ -d ncurses-5.9 ] || tar xzf ncurses.tar.gz + popd +} + +build() { + pushd src/ncurses-5.9 + wget -c $mirror/ncurses-fallback.c -O ncurses/fallback.c + CC=musl-gcc ./configure --prefix=$top/cross --without-tests \ + --with-normal --enable-sigwinch --disable-nls --without-dlsym \ + --without-cxx-binding --with-fallbacks="vt100" + make CC=musl-gcc -j$nprocs + popd +} + +install() { + pushd src/ncurses-5.9 + make install + popd +} diff --git a/cross-scripts/ncurses-5.9 b/cross-scripts/ncurses-5.9 @@ -1,27 +0,0 @@ -url=$mirror/ncurses.tar.gz - -fetch() { - wget -c $url -O src/ncurses.tar.gz -} - -unpack() { - pushd src - [ -d ncurses-5.9 ] || tar xzf ncurses.tar.gz - popd -} - -build() { - pushd src/ncurses-5.9 - wget -c $mirror/ncurses-fallback.c -O ncurses/fallback.c - CC=musl-gcc ./configure --prefix=$top/cross --without-tests \ - --with-normal --enable-sigwinch --disable-nls --without-dlsym \ - --without-cxx-binding --with-fallbacks="vt100" - make CC=musl-gcc -j$nprocs - popd -} - -install() { - pushd src/ncurses-5.9 - make install - popd -} diff --git a/cross-scripts/zlib b/cross-scripts/zlib @@ -0,0 +1,24 @@ +url=$mirror/zlib-1.2.8.tar.gz + +fetch() { + wget -c $url -O src/zlib-1.2.8.tar.gz +} + +unpack() { + pushd src + [ -d zlib-1.2.8 ] || tar xzf zlib-1.2.8.tar.gz + popd +} + +build() { + pushd src/zlib-1.2.8 + CC=musl-gcc ./configure --prefix=$top/cross --static + make CC=musl-gcc -j$nprocs + popd +} + +install() { + pushd src/zlib-1.2.8 + make install + popd +} diff --git a/cross-scripts/zlib-1.2.8 b/cross-scripts/zlib-1.2.8 @@ -1,24 +0,0 @@ -url=$mirror/zlib-1.2.8.tar.gz - -fetch() { - wget -c $url -O src/zlib-1.2.8.tar.gz -} - -unpack() { - pushd src - [ -d zlib-1.2.8 ] || tar xzf zlib-1.2.8.tar.gz - popd -} - -build() { - pushd src/zlib-1.2.8 - CC=musl-gcc ./configure --prefix=$top/cross --static - make CC=musl-gcc -j$nprocs - popd -} - -install() { - pushd src/zlib-1.2.8 - make install - popd -} diff --git a/pkgbuild b/pkgbuild @@ -5,13 +5,6 @@ if test -z "$1"; then exit 1 fi -# Export important variables for the build scripts -top=$(pwd) -root=$top/root -mirror=http://dl.2f30.org/morpheus-pkgs -export top root mirror - -PATH=$top/cross/bin:$PATH -export PATH +. ./prepare-env ./build "$1" diff --git a/prepare-env b/prepare-env @@ -0,0 +1,8 @@ +top=$(pwd) +root=$top/root +nprocs=4 +mirror=http://dl.2f30.org/morpheus-pkgs +export top root nprocs mirror + +PATH=$top/cross/bin:$PATH +export PATH diff --git a/repack b/repack @@ -1,6 +1,5 @@ #!/bin/sh -top=$(pwd) -root=$top/root +. ./prepare-env pushd $root && find . | cpio --quiet -H newc -o | gzip -9 -n > ../morpheus.img && popd diff --git a/stage0 b/stage0 @@ -1,28 +1,19 @@ #!/bin/sh -# Export important variables for the build scripts -top=$(pwd) -root=$top/root -nprocs=4 -mirror=http://dl.2f30.org/morpheus-pkgs -export top root nprocs mirror - ./clean -mkdir -p src cross +. ./prepare-env . ./prepare-root -./build cross-scripts/musl-0.9.13 - -PATH=$top/cross/bin:$PATH -export PATH +mkdir -p src cross -# These are ordered -./build cross-scripts/libevent-2.0.21 -./build cross-scripts/ncurses-5.9 -./build cross-scripts/zlib-1.2.8 -# ./build cross-scripts/libsigc++-2.3.1 -# ./build cross-scripts/curl-7.32.0 -# ./build cross-scripts/libtorrent-0.13.3 +# Deps list +./build cross-scripts/musl +./build cross-scripts/libevent +./build cross-scripts/ncurses +./build cross-scripts/zlib +#./build cross-scripts/libsigc++ +#./build cross-scripts/curl +#./build cross-scripts/libtorrent # Build stage0 packages pkglist=$(ls pkgs)