mirror of
https://github.com/wahyd4/skaware.git
synced 2026-08-09 04:35:57 +10:00
104 lines
2.6 KiB
Bash
Executable File
104 lines
2.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
set -x
|
|
|
|
# make version (for skarnet)
|
|
make_version=4.1
|
|
|
|
# skarnet versions
|
|
musl_version=1.0.4
|
|
skalibs_version=2.3.1.0
|
|
execline_version=2.1.0.0
|
|
s6_version=2.1.1.2
|
|
s6_portable_utils_version=2.0.0.1
|
|
|
|
# point to make
|
|
MAKE_4x=/usr/local/bin/make
|
|
|
|
# configures /dev/random in order to disable hangs
|
|
rm /dev/random
|
|
mknod /dev/random c 1 9
|
|
|
|
# create build dir
|
|
mkdir -p /build
|
|
|
|
# install make
|
|
cd /build
|
|
curl -R -L -O http://ftp.gnu.org/gnu/make/make-${make_version}.tar.gz
|
|
tar xf make-${make_version}.tar.gz
|
|
cd make-${make_version}
|
|
|
|
./configure
|
|
make
|
|
make install
|
|
|
|
# install musl
|
|
cd /build
|
|
curl -R -L -O http://www.musl-libc.org/releases/musl-${musl_version}.tar.gz
|
|
tar xf musl-${musl_version}.tar.gz
|
|
cd musl-${musl_version}
|
|
|
|
CFLAGS="-fno-toplevel-reorder -fno-stack-protector" \
|
|
./configure \
|
|
--prefix=/usr/musl \
|
|
--exec-prefix=/usr \
|
|
--disable-shared
|
|
make
|
|
make install
|
|
|
|
# install skalibs
|
|
cd /build
|
|
curl -R -L https://github.com/skarnet/skalibs/archive/v${skalibs_version}.tar.gz -o skalibs-${skalibs_version}.tar.gz
|
|
tar xf skalibs-${skalibs_version}.tar.gz
|
|
cd skalibs-${skalibs_version}
|
|
|
|
CC="musl-gcc -static" \
|
|
./configure \
|
|
--enable-static-libc \
|
|
--disable-shared
|
|
${MAKE_4x}
|
|
${MAKE_4x} install
|
|
|
|
# install execline
|
|
cd /build
|
|
curl -R -L https://github.com/skarnet/execline/archive/v${execline_version}.tar.gz -o execline-${execline_version}.tar.gz
|
|
tar xf execline-${execline_version}.tar.gz
|
|
cd execline-${execline_version}
|
|
|
|
CC="musl-gcc -static" \
|
|
./configure \
|
|
--with-lib=/usr/lib/skalibs \
|
|
--enable-static-libc \
|
|
--disable-shared
|
|
${MAKE_4x}
|
|
${MAKE_4x} install
|
|
|
|
# install s6
|
|
cd /build
|
|
curl -R -L https://github.com/skarnet/s6/archive/v${s6_version}.tar.gz -o s6-${s6_version}.tar.gz
|
|
tar xf s6-${s6_version}.tar.gz
|
|
cd s6-${s6_version}
|
|
|
|
CC="musl-gcc -static" \
|
|
./configure \
|
|
--with-lib=/usr/lib/skalibs \
|
|
--with-lib=/usr/lib/execline \
|
|
--enable-static-libc \
|
|
--disable-shared
|
|
${MAKE_4x}
|
|
${MAKE_4x} install
|
|
|
|
# install s6-portable-utils
|
|
cd /build
|
|
curl -R -L https://github.com/skarnet/s6-portable-utils/archive/v${s6_portable_utils_version}.tar.gz -o s6-portable-utils-${s6_portable_utils_version}.tar.gz
|
|
tar xf s6-portable-utils-${s6_portable_utils_version}.tar.gz
|
|
cd s6-portable-utils-${s6_portable_utils_version}
|
|
|
|
CC="musl-gcc -static" \
|
|
./configure \
|
|
--with-lib=/usr/lib/skalibs \
|
|
--enable-static-libc \
|
|
--disable-shared
|
|
${MAKE_4x}
|
|
${MAKE_4x} install
|