diff options
| author | Mitch Riedstra <mitch@riedstra.us> | 2018-04-22 18:26:18 -0400 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2018-04-22 18:26:18 -0400 |
| commit | 73692b5ba9f28b75e226152044b18409a7df7685 (patch) | |
| tree | 06e8dbb42994ee65c8c815de3c23e5d2a910716d /scripts | |
| parent | b3810b12552a937dcb6486ccf775a0bd9094db23 (diff) | |
| download | min-73692b5ba9f28b75e226152044b18409a7df7685.tar.gz min-73692b5ba9f28b75e226152044b18409a7df7685.tar.xz | |
Addex XZ as well as sources and a working "tar" for the system.
( I need to rename it to cpio )
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/build.sh | 3 | ||||
| -rw-r--r-- | scripts/get_sources.sh | 10 | ||||
| -rw-r--r-- | scripts/linux.sh | 2 | ||||
| -rw-r--r-- | scripts/musl-cross-make.sh | 15 | ||||
| -rw-r--r-- | scripts/pv.sh | 22 | ||||
| -rw-r--r-- | scripts/setup_musl_cross.sh | 27 | ||||
| -rw-r--r-- | scripts/tar-pfx.sh | 22 | ||||
| -rw-r--r-- | scripts/xz.sh | 24 |
8 files changed, 111 insertions, 14 deletions
diff --git a/scripts/build.sh b/scripts/build.sh index c5b47bd..604af31 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -8,11 +8,12 @@ $shell scripts/ncurses.sh $shell scripts/vim.sh $shell scripts/busybox.sh $shell scripts/tree.sh +$shell scripts/pv.sh $shell scripts/zlib.sh $shell scripts/libressl.sh $shell scripts/openssh.sh $shell scripts/nginx.sh -$shell scripts/libarchive.sh.sh +$shell scripts/libarchive.sh $shell scripts/runit.sh $shell scripts/conf.sh $shell scripts/tar-pfx.sh diff --git a/scripts/get_sources.sh b/scripts/get_sources.sh index 538d03b..f9c3c3a 100644 --- a/scripts/get_sources.sh +++ b/scripts/get_sources.sh @@ -1,11 +1,11 @@ #!/bin/sh . ./.vars cd ${dist_dir} -wget -i ${base_dir}/sources.lst +for line in $(cat ${base_dir}/sources.lst); do + wget -c "$line" || echo "" +done # Because otherwise it's saved as 'mirror'... *sigh* wget -O php-7.2.4.tar.xz http://us3.php.net/get/php-7.2.4.tar.xz/from/this/mirror -git clone git://git.suckless.org/sbase -git clone git://git.suckless.org/ubase -git clone git://git.suckless.org/sinit -git clone https://github.com/voidlinux/void-runit +# git clone https://github.com/voidlinux/void-runit git clone https://github.com/irssi/irssi +git clone https://github.com/richfelker/musl-cross-make diff --git a/scripts/linux.sh b/scripts/linux.sh index 2bfedd8..407407f 100644 --- a/scripts/linux.sh +++ b/scripts/linux.sh @@ -1,6 +1,6 @@ #!/bin/sh . ./.vars -VERSION=4.16.2 +VERSION=4.16.3 KERNEL_TAR_PKG="${build_dir}/linux-$VERSION/linux-$VERSION-x86.tar" cd $build_dir if ! [ -d "${build_dir}/linux-$VERSION" ] ; then diff --git a/scripts/musl-cross-make.sh b/scripts/musl-cross-make.sh new file mode 100644 index 0000000..c8f477f --- /dev/null +++ b/scripts/musl-cross-make.sh @@ -0,0 +1,15 @@ +#!/bin/sh +. ./.vars +# VERSION=3.3.2 +APP_NAME="musl-cross-make" +BUILD_DIR="${build_dir}/$APP_NAME" +if ! [ -d "$BUILD_DIR" ] ; then + cd "$build_dir" + git clone ${dist_dir}/$APP_NAME +fi +cd "$BUILD_DIR" +make -j$(nproc) TARGET=$BUILD_TGT +make install TARGET=$BUILD_TGT +mv output "$BUILD_TGT" +tar cfzv "$base_dir/${BUILD_TGT}.tgz" "$BUILD_TGT" +mv "$BUILD_TGT" "$base_dir/" diff --git a/scripts/pv.sh b/scripts/pv.sh new file mode 100644 index 0000000..f715dc7 --- /dev/null +++ b/scripts/pv.sh @@ -0,0 +1,22 @@ +#!/bin/sh +. ./.vars +VERSION=1.6.6 +APP_NAME="pv" +BUILD_DIR="${build_dir}/$APP_NAME-$VERSION" +if ! [ -d "$BUILD_DIR" ] ; then + cd "$build_dir" + tar xfjv ${dist_dir}/$APP_NAME-$VERSION.tar.bz2 +fi +cd "$BUILD_DIR" +export CC=$BUILD_TGT-gcc +export CFLAGS="-I$prefix/usr/include -static" +export DESTDIR=$prefix +export LDFLAGS="-L$prefix/usr/lib/ -static" +rm config.log || echo "" +make clean || echo "" +./configure \ + --host=$BUILD_TGT \ + --prefix=/usr \ + --with-sysroot=$prefix +make -j$(nproc) +make install diff --git a/scripts/setup_musl_cross.sh b/scripts/setup_musl_cross.sh new file mode 100644 index 0000000..6ae5dd6 --- /dev/null +++ b/scripts/setup_musl_cross.sh @@ -0,0 +1,27 @@ +#!/bin/sh +. ./.vars +# VERSION=3.3.2 +APP_NAME="musl-cross-make" +BUILD_DIR="${build_dir}/$APP_NAME" +if ! [ -d "$BUILD_DIR" ] ; then + cd "$build_dir" + git clone ${dist_dir}/$APP_NAME +fi +cd "$BUILD_DIR" +export CC=$BUILD_TGT-gcc +export CFLAGS="-I$prefix/usr/include -static" +export DESTDIR=$prefix +export LDFLAGS="-L$prefix/usr/lib/ -static" +rm config.log || echo "" +make clean || echo "" +./configure \ + --host=$BUILD_TGT \ + --prefix=/usr \ + --without-xml2 \ + --enable-bsdtar=static \ + --enable-bsdcpio=static \ + --enable-bsdcat=static \ + --without-openssl \ + --with-sysroot=$prefix +make -j$(nproc) +make install diff --git a/scripts/tar-pfx.sh b/scripts/tar-pfx.sh index b395764..2b5a215 100644 --- a/scripts/tar-pfx.sh +++ b/scripts/tar-pfx.sh @@ -1,10 +1,18 @@ #!/bin/sh . ./.vars -bsdtar \ - --numeric-owner \ - --owner=root \ - --group=root \ - -C pfx \ - -cvf - . \ - | xz -9 -T0 -vc > pfx.txz +SZE=$(du -sm $prefix |awk '{print $1}') + + # | cpio -R root:root -do - \ +find $prefix \ + | cpio -v -R root:root -oH newc \ + | pv -s ${SZE}M \ + | xz -T0 -9 -c > pfx.txz + +# bsdtar \ +# --numeric-owner \ +# --owner=root \ +# --group=root \ +# -C pfx \ +# -cvf - . \ +# | xz -9 -T0 -vc > pfx.txz diff --git a/scripts/xz.sh b/scripts/xz.sh new file mode 100644 index 0000000..079f3e2 --- /dev/null +++ b/scripts/xz.sh @@ -0,0 +1,24 @@ +#!/bin/sh +. ./.vars +VERSION=5.2.3 +APP_NAME="xz" +BUILD_DIR="${build_dir}/$APP_NAME-$VERSION" +if ! [ -d "$BUILD_DIR" ] ; then + cd "$build_dir" + tar xfJv ${dist_dir}/$APP_NAME-$VERSION.tar.xz +fi +cd "$BUILD_DIR" +export CC=$BUILD_TGT-gcc +export CFLAGS="-I$prefix/usr/include -static" +export CPPFLAGS="$CFLAGS" +export DESTDIR=$prefix +export LDFLAGS="-L$prefix/usr/lib/ -static" +rm config.log || echo "" +make clean || echo "" +./configure \ + --host=$BUILD_TGT \ + --prefix=/usr \ + --enable-threads='yes' \ + --with-sysroot=$prefix +make -j$(nproc) +make install |
