morpheus

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

commit 5ffd49a86dadb7dd3c6fb3f44d8a960ed58f4b27
parent 8b80aef576b5edd90b284dc86165059401e7c8ea
Author: sin <sin@2f30.org>
Date:   Fri, 14 Feb 2014 10:51:46 +0000

We can build with dash too now

Also rename pkgs/arch-rootfs to pkgs/emul.

The create-bootable script still needs to be fixed
to work with dash.

Diffstat:
Mcreate-bootable | 2+-
Mcross-scripts/crossmusl | 4++--
Mcross-scripts/libevent | 12++++++------
Mcross-scripts/ncurses | 12++++++------
Mcross-scripts/zlib | 12++++++------
Dpkgs/arch-rootfs | 18------------------
Mpkgs/busybox | 8++++----
Apkgs/emul | 18++++++++++++++++++
Mpkgs/fs | 4++--
Mpkgs/kernel | 12++++++------
Mpkgs/make | 12++++++------
Mpkgs/man | 12++++++------
Mpkgs/mksh | 12++++++------
Mpkgs/rsync | 12++++++------
Mpkgs/sbase | 8++++----
Mpkgs/sdhcp | 8++++----
Mpkgs/sic | 8++++----
Mpkgs/sinit | 12++++++------
Mpkgs/smdev | 8++++----
Mpkgs/syslinux | 4++--
Mpkgs/tmux | 12++++++------
Mpkgs/ubase | 8++++----
22 files changed, 109 insertions(+), 109 deletions(-)

diff --git a/create-bootable b/create-bootable @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # Ensure you've loaded the loop module with max_part=15 diff --git a/cross-scripts/crossmusl b/cross-scripts/crossmusl @@ -7,11 +7,11 @@ fetch() { install() { tar xJf src/crossx86-x86_64-linux-musl-0.9.15.tar.xz -C $root/opt/cross mv $root/opt/cross/x86_64-linux-musl/x86_64-linux-musl/lib64/* $root/opt/cross/x86_64-linux-musl/x86_64-linux-musl/lib - pushd $root/bin + cd $root/bin targets="ar as c++ g++ gcc ld ld.bfd nm objcopy objdump ranlib strip" for t in $targets; do ln -sf /opt/cross/x86_64-linux-musl/bin/x86_64-linux-musl-$t $t done ln -sf gcc cc - popd + cd - } diff --git a/cross-scripts/libevent b/cross-scripts/libevent @@ -5,20 +5,20 @@ fetch() { } unpack() { - pushd src + cd src [ -d libevent-2.0.21-stable ] || tar xzf libevent-2.0.21-stable.tar.gz - popd + cd - } build() { - pushd src/libevent-2.0.21-stable + cd src/libevent-2.0.21-stable CC="x86_64-linux-musl-gcc -static" ./configure --prefix=$libcroot --disable-shared --enable-static || return 1 make -j$nprocs || return 1 - popd + cd - } install() { - pushd src/libevent-2.0.21-stable + cd src/libevent-2.0.21-stable make install || return 1 - popd + cd - } diff --git a/cross-scripts/ncurses b/cross-scripts/ncurses @@ -5,24 +5,24 @@ fetch() { } unpack() { - pushd src + cd src [ -d ncurses-5.9 ] || tar xzf ncurses.tar.gz - popd + cd - } build() { - pushd src/ncurses-5.9 + cd src/ncurses-5.9 cp $top/stuff/ncurses-fallback.c ncurses/fallback.c CC="x86_64-linux-musl-gcc -static" ./configure --prefix=$libcroot --without-tests \ --with-normal --enable-sigwinch --disable-nls --without-dlsym \ --without-cxx-binding \ --with-fallbacks="linux vt100 xterm xterm256-color" </dev/ptmx || return 1 make -j$nprocs || return 1 - popd + cd - } install() { - pushd src/ncurses-5.9 + cd src/ncurses-5.9 make install || return 1 - popd + cd - } diff --git a/cross-scripts/zlib b/cross-scripts/zlib @@ -5,20 +5,20 @@ fetch() { } unpack() { - pushd src + cd src [ -d zlib-1.2.8 ] || tar xzf zlib-1.2.8.tar.gz - popd + cd - } build() { - pushd src/zlib-1.2.8 + cd src/zlib-1.2.8 CC=x86_64-linux-musl-gcc ./configure --prefix=$libcroot --static || return 1 make -j$nprocs || return 1 - popd + cd - } install() { - pushd src/zlib-1.2.8 + cd src/zlib-1.2.8 make install || return 1 - popd + cd - } diff --git a/pkgs/arch-rootfs b/pkgs/arch-rootfs @@ -1,18 +0,0 @@ -url=$mirror/arch-rootfs.tar.gz - -fetch() { - wget -c $url -O src/arch-rootfs.tar.gz -} - -unpack() { - pushd src - [ -d root.x86_64 ] || tar xzf arch-rootfs.tar.gz - popd -} - -install() { - pushd src - cp -arP root.x86_64/* $root/emul - popd - cp stuff/enter-emul $root/bin -} diff --git a/pkgs/busybox b/pkgs/busybox @@ -6,10 +6,11 @@ fetch() { install() { # Install package - pushd src/ + cd src/ chmod +x busybox cp busybox $root/bin - pushd $root/bin + cd - + cd $root/bin ln -sf busybox addgroup ln -sf busybox adduser ln -sf busybox awk @@ -45,6 +46,5 @@ install() { ln -sf busybox top ln -sf busybox vi ln -sf busybox wget - popd - popd + cd - } diff --git a/pkgs/emul b/pkgs/emul @@ -0,0 +1,18 @@ +url=$mirror/arch-rootfs.tar.gz + +fetch() { + wget -c $url -O src/arch-rootfs.tar.gz +} + +unpack() { + cd src + [ -d root.x86_64 ] || tar xzf arch-rootfs.tar.gz + cd - +} + +install() { + cd src + cp -arP root.x86_64/* $root/emul + cd - + cp stuff/enter-emul $root/bin +} diff --git a/pkgs/fs b/pkgs/fs @@ -5,7 +5,7 @@ fetch() { } install() { - pushd src/fs + cd src/fs cp -r * $root/ - popd + cd - } diff --git a/pkgs/kernel b/pkgs/kernel @@ -6,23 +6,23 @@ fetch() { } unpack() { - pushd src + cd src [ -d linux-$version ] || tar xzf kernel.tar.gz - popd + cd - } build() { - pushd src/linux-$version + cd src/linux-$version cp $top/stuff/kernel-config .config make menuconfig make bzImage -j$nprocs || return 1 - popd + cd - } install() { - pushd src/linux-$version + cd src/linux-$version cp arch/x86/boot/bzImage $root/boot cp .config $root/boot/bzImage.config cp System.map $root/boot - popd + cd - } diff --git a/pkgs/make b/pkgs/make @@ -5,20 +5,20 @@ fetch() { } unpack() { - pushd src + cd src [ -d make-3.82 ] || tar xjf make-3.82.tar.bz2 - popd + cd - } build() { - pushd src/make-3.82 + cd src/make-3.82 CC="x86_64-linux-musl-gcc -static" ./configure --prefix=$root --disable-nls || return 1 make -j$nprocs || return 1 - popd + cd - } install() { - pushd src/make-3.82 + cd src/make-3.82 make install || return 1 - popd + cd - } diff --git a/pkgs/man b/pkgs/man @@ -5,19 +5,19 @@ fetch() { } unpack() { - pushd src + cd src [ -d man ] || tar xzf man.tar.gz - popd + cd - } build() { - pushd src/man + cd src/man x86_64-linux-musl-gcc -std=gnu99 -o man man.c -static || return 1 - popd + cd - } install() { - pushd src/man + cd src/man cp man $root/bin - popd + cd - } diff --git a/pkgs/mksh b/pkgs/mksh @@ -5,20 +5,20 @@ fetch() { } unpack() { - pushd src + cd src [ -d mksh ] || tar xzf mksh-R47.tar.gz - popd + cd - } build() { - pushd src/mksh + cd src/mksh CC=x86_64-linux-musl-gcc LDFLAGS+=-static sh Build.sh || return 1 - popd + cd - } install() { cp src/mksh/mksh $root/bin - pushd $root/bin + cd $root/bin ln -sf /bin/mksh sh - popd + cd - } diff --git a/pkgs/rsync b/pkgs/rsync @@ -5,20 +5,20 @@ fetch() { } unpack() { - pushd src + cd src [ -d rsync-3.0.9 ] || tar xzf rsync-3.0.9.tar.gz - popd + cd - } build() { - pushd src/rsync-3.0.9 + cd src/rsync-3.0.9 CC=x86_64-linux-musl-gcc ./configure --prefix=$root LDFLAGS="-static" || return 1 make -j$nprocs || return 1 - popd + cd - } install() { - pushd src/rsync-3.0.9 + cd src/rsync-3.0.9 make install || return 1 - popd + cd - } diff --git a/pkgs/sbase b/pkgs/sbase @@ -5,14 +5,14 @@ fetch() { } build() { - pushd src/sbase + cd src/sbase make clean make -j$nprocs CC=x86_64-linux-musl-gcc LDFLAGS=-static || return 1 - popd + cd - } install() { - pushd src/sbase + cd src/sbase make PREFIX=$root install - popd + cd - } diff --git a/pkgs/sdhcp b/pkgs/sdhcp @@ -5,16 +5,16 @@ fetch() { } unpack() { - pushd src + cd src [ -d sdhcp ] || tar xzf sdhcp.tar.gz - popd + cd - } build() { - pushd src/sdhcp + cd src/sdhcp make clean make CC=x86_64-linux-musl-gcc LDFLAGS=-static || return 1 - popd + cd - } install() { diff --git a/pkgs/sic b/pkgs/sic @@ -5,16 +5,16 @@ fetch() { } unpack() { - pushd src + cd src [ -d sic ] || tar xzf sic.tar.gz - popd + cd - } build() { - pushd src/sic + cd src/sic make clean make CC=x86_64-linux-musl-gcc LDFLAGS=-static || return 1 - popd + cd - } install() { diff --git a/pkgs/sinit b/pkgs/sinit @@ -5,17 +5,17 @@ fetch() { } build() { - pushd src/sinit + cd src/sinit make clean make -j$nprocs CC=x86_64-linux-musl-gcc LDFLAGS=-static || return 1 - popd + cd - } install() { - pushd src/sinit + cd src/sinit make PREFIX=$root install - popd - pushd $root + cd - + cd $root ln -sf /bin/sinit init - popd + cd - } diff --git a/pkgs/smdev b/pkgs/smdev @@ -5,14 +5,14 @@ fetch() { } build() { - pushd src/smdev + cd src/smdev make clean make CC=x86_64-linux-musl-gcc LDFLAGS=-static || return 1 - popd + cd - } install() { - pushd src/smdev + cd src/smdev make PREFIX=$root install || return 1 - popd + cd - } diff --git a/pkgs/syslinux b/pkgs/syslinux @@ -6,9 +6,9 @@ fetch() { } unpack() { - pushd src + cd src [ -d syslinux ] || tar xzf syslinux.tar.gz - popd + cd - } install() { diff --git a/pkgs/tmux b/pkgs/tmux @@ -5,21 +5,21 @@ fetch() { } unpack() { - pushd src + cd src [ -d tmux-1.8 ] || tar xzf tmux-1.8.tar.gz - popd + cd - } build() { - pushd src/tmux-1.8 + cd src/tmux-1.8 CC=x86_64-linux-musl-gcc ./configure --prefix=$root LDFLAGS=-static \ CFLAGS="-I$libcroot/include/ncurses" || return 1 make -j$nprocs || return 1 - popd + cd - } install() { - pushd src/tmux-1.8 + cd src/tmux-1.8 make install || return 1 - popd + cd - } diff --git a/pkgs/ubase b/pkgs/ubase @@ -5,14 +5,14 @@ fetch() { } build() { - pushd src/ubase + cd src/ubase make clean make -j$nprocs CC=x86_64-linux-musl-gcc LDFLAGS=-static || return 1 - popd + cd - } install() { - pushd src/ubase + cd src/ubase make PREFIX=$root install - popd + cd - }