From c94182efe811551b5812ff13ba4bfba203519d62 Mon Sep 17 00:00:00 2001 From: mid-kid Date: Sun, 4 Jan 2015 16:00:51 +0100 Subject: [PATCH] Long overdue commit --- astronaut/astronaut | 29 +++++++++++++++++------------ tools/mktools | 4 ++++ tools/prepchroot | 8 ++++---- tools/satellites/binutils-2.sat | 2 +- tools/satellites/busybox.sat | 2 +- tools/satellites/check.sat | 12 ++++++++++++ tools/satellites/dejagnu.sat | 12 ++++++++++++ tools/satellites/expect.sat | 13 +++++++++++++ tools/satellites/glibc.sat | 2 +- tools/satellites/perl.sat | 2 +- tools/satellites/stow.sat | 2 +- tools/satellites/tcl.sat | 15 +++++++++++++++ 12 files changed, 82 insertions(+), 21 deletions(-) create mode 100644 tools/satellites/check.sat create mode 100644 tools/satellites/dejagnu.sat create mode 100644 tools/satellites/expect.sat create mode 100644 tools/satellites/tcl.sat diff --git a/astronaut/astronaut b/astronaut/astronaut index 053618e..05e4f29 100755 --- a/astronaut/astronaut +++ b/astronaut/astronaut @@ -8,7 +8,7 @@ dir_source="$PWD/source" dir_install="$PWD/install" cmd_download="curl -#L -o {dst} {src}" cmd_extract="tar xf {src}" -enable_movedirs=true +enable_movedirs=false enable_check=true if [ -f /etc/astronaut.conf ]; then . /etc/astronaut.conf @@ -118,7 +118,7 @@ download() { extract() { msg "Extracting $1" if [ "$2" ]; then - local cmd="$2" + local cmd="$2" else local cmd="$cmd_extract" fi @@ -144,12 +144,15 @@ extrafile() { } do_check() { - if $enable_check; then - if [ "$1" ]; then + if [ "$1" ]; then + if $enable_check; then $@ - else - echo true fi + else + if $enable_check; then + return 0 + fi + return 1 fi } @@ -163,17 +166,19 @@ mkdir -p "$dir_install" cd "$dir_build" . "$satellite" +movefiles() { + mkdir -p "$2" + mv $(find "$1" -maxdepth 1 -mindepth 1) "$2" + rm -rf "$1" +} + if $enable_movedirs; then if [ "$(uname -m)" == "x86_64" ]; then if [ -d "$dir_install/lib64" ]; then - mkdir -p "$dir_install/lib" - mv $(find "$dir_install/lib64/" -maxdepth 1 -mindepth 1) "$dir_install/lib" - rmdir "$dir_install/lib64" + movefiles "$dir_install/lib64" "$dir_install/lib" fi if [ -d "$dir_install/usr/lib64" ]; then - mkdir -p "$dir_install/usr/lib" - mv $(find "$dir_install/usr/lib64/" -maxdepth 1 -mindepth 1) "$dir_install/usr/lib" - rmdir "$dir_install/usr/lib64" + movefiles "$dir_install/usr/lib64" "$dir_install/lib" fi fi fi diff --git a/tools/mktools b/tools/mktools index 820220b..3b877f4 100755 --- a/tools/mktools +++ b/tools/mktools @@ -62,6 +62,10 @@ astrobuild "bash" astrobuild "gawk" astrobuild "make" astrobuild "m4" +astrobuild "tcl" +astrobuild "expect" +astrobuild "dejagnu" +astrobuild "check" astrobuild "perl" astrobuild "openssl" diff --git a/tools/prepchroot b/tools/prepchroot index eed814a..caf5241 100755 --- a/tools/prepchroot +++ b/tools/prepchroot @@ -27,10 +27,10 @@ echo "Creating directories" install -dm750 "$rocket/root" install -dm1777 "$rocket/tmp" mkdir -p "$rocket/etc" "$rocket/usr/pkg" "$rocket/usr/sat" -if [ "$(uname -m)" == "x86_64" ]; then - ln -sf lib "$rocket/lib64" - ln -sf lib "$rocket/usr/lib64" -fi +#if [ "$(uname -m)" == "x86_64" ]; then +# ln -sf lib "$rocket/lib64" +# ln -sf lib "$rocket/usr/lib64" +#fi echo "Creating temporary symlinks" mkdir -p "$rocket/usr/pkg/tmp-coreutils/bin" diff --git a/tools/satellites/binutils-2.sat b/tools/satellites/binutils-2.sat index 7182e91..b325cf7 100644 --- a/tools/satellites/binutils-2.sat +++ b/tools/satellites/binutils-2.sat @@ -19,7 +19,7 @@ RANLIB="$target-ranlib" \ make; make DESTDIR="$dir_install" install make -C ld clean -make -C ld LIB_PATH=/usr/lib:/lib +make -C ld LIB_PATH=/lib:/lib64:/usr/lib:/usr/lib64 cp ld/ld-new "$dir_install/tools/bin/ld-new" # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/tools/satellites/busybox.sat b/tools/satellites/busybox.sat index d2a0416..368d86b 100644 --- a/tools/satellites/busybox.sat +++ b/tools/satellites/busybox.sat @@ -5,7 +5,7 @@ dlextract "http://www.busybox.net/downloads/$name-$version.tar.bz2" \ "337d1a15ab1cb1d4ed423168b1eb7d7e" extrafile "busybox.config" -cat busybox.config | sed 's@./_install@'"$dir_install/tools"'@' > "$name-$version/.config" +sed 's@./_install@'"$dir_install/tools"'@' busybox.config > "$name-$version/.config" cd "$name-$version" make; make install diff --git a/tools/satellites/check.sat b/tools/satellites/check.sat new file mode 100644 index 0000000..123985f --- /dev/null +++ b/tools/satellites/check.sat @@ -0,0 +1,12 @@ +name=check +version=0.9.14 + +dlextract "http://sourceforge.net/projects/$name/files/$name/$version/$name-$version.tar.gz" \ + "38263d115d784c17aa3b959ce94be8b8" + +cd "$name-$version" + +PKG_CONFIG= ./configure --prefix=/tools +make; make DESTDIR="$dir_install" install + +# vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/tools/satellites/dejagnu.sat b/tools/satellites/dejagnu.sat new file mode 100644 index 0000000..cc9d1f8 --- /dev/null +++ b/tools/satellites/dejagnu.sat @@ -0,0 +1,12 @@ +name=dejagnu +version=1.5.1 + +dlextract "http://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \ + "8386e04e362345f50ad169f052f4c4ab" + +cd "$name-$version" + +./configure --prefix=/tools +make; make DESTDIR="$dir_install" install + +# vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/tools/satellites/expect.sat b/tools/satellites/expect.sat new file mode 100644 index 0000000..d76e97f --- /dev/null +++ b/tools/satellites/expect.sat @@ -0,0 +1,13 @@ +name=expect +version=5.45 + +dlextract "http://sourceforge.net/projects/$name/files/Expect/$version/$name$version.tar.gz" \ + "44e1a4f4c877e9ddc5a542dfa7ecc92b" + +cd "$name$version" + +sed -i 's:/usr/local/bin:/bin:' configure +./configure --prefix=/tools --with-tcl=/tools/lib --with-tclinclude=/tools/include +make; make DESTDIR="$dir_install" SCRIPTS="" install + +# vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/tools/satellites/glibc.sat b/tools/satellites/glibc.sat index c8c3822..6dea842 100644 --- a/tools/satellites/glibc.sat +++ b/tools/satellites/glibc.sat @@ -12,7 +12,7 @@ mkdir "$name-build"; cd "$name-build" --build="$(../glibc-2.20/scripts/config.guess)" \ --disable-profile \ --enable-kernel=2.6.32 \ - --with-headers="$dir_install/tools/include" \ + --with-headers=/tools/include \ libc_cv_forced_unwind=yes \ libc_cv_ctors_header=yes \ libc_cv_c_cleanup=yes diff --git a/tools/satellites/perl.sat b/tools/satellites/perl.sat index a5852f3..786597c 100644 --- a/tools/satellites/perl.sat +++ b/tools/satellites/perl.sat @@ -1,5 +1,5 @@ name=perl -version=5.20.1 +version=5.20.1 dlextract "http://www.cpan.org/src/5.0/$name-$version.tar.gz" \ "7a195abb7d6769f751e90c7d30dcf2e0" diff --git a/tools/satellites/stow.sat b/tools/satellites/stow.sat index 62f37d9..e2c7f94 100644 --- a/tools/satellites/stow.sat +++ b/tools/satellites/stow.sat @@ -1,5 +1,5 @@ name=stow -version=2.2.0 +version=2.2.0 dlextract "http://ftp.gnu.org/gnu/$name/$name-$version.tar.bz2" \ "5bb56592eff9aaf9dfb6c975b3004240" diff --git a/tools/satellites/tcl.sat b/tools/satellites/tcl.sat new file mode 100644 index 0000000..048547f --- /dev/null +++ b/tools/satellites/tcl.sat @@ -0,0 +1,15 @@ +name=tcl +majver=8.6 +version=$majver.3 + +dlextract "http://prdownloads.sourceforge.net/$name/$name$version-src.tar.gz" \ + "db382feca91754b7f93da16dc4cdad1f" + +cd "$name$version/unix" + +./configure --prefix=/tools +make; make DESTDIR="$dir_install" install install-private-headers +chmod u+w "$dir_install/tools/lib/libtcl$majver.so" +ln -s tclsh$majver "$dir_install/tools/bin/tclsh" + +# vim:set tabstop=4 shiftwidth=4 syntax=sh et: