morpheus

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

commit 4b1709f90a5b08fcf2b2dc64601bdccb991134a5
parent e62c2a7619e560010822e7faa1e12b3efd3a697f
Author: sin <sin@2f30.org>
Date:   Mon, 17 Feb 2014 16:01:37 +0000

List dependencies explicitly

This is by far the simplest approach as packages previously
in cross-scripts/ could also depend on other packages.

Diffstat:
DDEPS | 3---
Mpkgbuild | 6++++--
Rcross-scripts/crossmusl -> pkgs/crossmusl | 0
Rcross-scripts/libevent -> pkgs/libevent | 0
Rcross-scripts/ncurses -> pkgs/ncurses | 0
Rcross-scripts/tinyxlib -> pkgs/tinyxlib | 0
Rcross-scripts/zlib -> pkgs/zlib | 0
Mstage0 | 78++++++++++++++++++++++++------------------------------------------------------
8 files changed, 28 insertions(+), 59 deletions(-)

diff --git a/DEPS b/DEPS @@ -1,3 +0,0 @@ -irc ncurses -tinyxserver tinyxlib -tmux libevent ncurses diff --git a/pkgbuild b/pkgbuild @@ -1,7 +1,9 @@ #!/bin/sh +umask 022 + if test -z "$1"; then - echo usage: $0 pkgpath... 1>&2 + echo usage: $0 pkg... 1>&2 exit 1 fi @@ -16,6 +18,6 @@ fi mkdir -p src while [ $# -gt 0 ]; do - ./build "$1" + ./build "pkgs/$1" shift done diff --git a/cross-scripts/crossmusl b/pkgs/crossmusl diff --git a/cross-scripts/libevent b/pkgs/libevent diff --git a/cross-scripts/ncurses b/pkgs/ncurses diff --git a/cross-scripts/tinyxlib b/pkgs/tinyxlib diff --git a/cross-scripts/zlib b/pkgs/zlib diff --git a/stage0 b/stage0 @@ -3,59 +3,29 @@ # This is the stage0 script, it prepares a basic usable system # in $root. -umask 022 - -. ./prepare-env - -if test "$(uname -m)" != "$arch"; then - echo You need an $arch host to build morpheus 1>&2 - exit 1 -fi - rm -rf root morpheus.log -. ./prepare-root -mkdir -p src - -# Fetch and install our musl cross-compiler -./build cross-scripts/crossmusl - -installed_deps= -build_pkg_dep() { - pkg=$1; deps=$2 - # Build dependencies for package in order - for d in $deps; do - install=1 - for i in $installed_deps; do - if [ "$i" = "$d" ]; then - # If already installed, then skip it - install=0 - break - fi - done - if [ $install -eq 1 ]; then - ./build cross-scripts/$d - installed_deps="$installed_deps $d" - fi - done -} - -build_pkg_deps() { - pkg=$1 - while read line; do - if test "$(echo $line | cut -d' ' -f1)" != "$pkg"; then - continue - fi - deps=$(echo $line | cut -d' ' -f2-) - build_pkg_dep "$pkg" "$deps" - break - done < DEPS -} - -build_pkg() { - build_pkg_deps $(basename $1) && ./build $1 -} -# Build stage0 packages -for pkg in pkgs/*; do - build_pkg $pkg -done +packages="crossmusl + ncurses + libevent + zlib + tinyxlib + kernel + emul + busybox + fs + make + man + mksh + rsync + sbase + sdhcp + sic + sinit + smdev + syslinux + tinyxserver + tmux + ubase" + +./pkgbuild $packages