index : bootstrap32 | |
Archlinux32 bootstrap scripts | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Baumann <mail@andreasbaumann.cc> | 2018-10-18 16:35:01 +0000 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2018-10-18 16:35:01 +0000 |
commit | 3abff29bd6887d69b2b45680fb64f164babd4aee (patch) | |
tree | 084fd70fdaa67e26e0edb22f817c73191bdbdd15 /create_java7-openjdk-shim-i486.sh | |
parent | f56b9ccd7042d690c092c0b2066d4702487e03da (diff) |
-rwxr-xr-x | create_java7-openjdk-shim-i486.sh | 56 |
diff --git a/create_java7-openjdk-shim-i486.sh b/create_java7-openjdk-shim-i486.sh new file mode 100755 index 0000000..998e265 --- /dev/null +++ b/create_java7-openjdk-shim-i486.sh @@ -0,0 +1,56 @@ +#!/bin/sh + +# shellcheck source=./default.conf +. "./default.conf" + +# the java7-openjdk shim + +if test ! -f $STAGE5_CHROOT/packages/$TARGET_CPU/jdk7-openjdk-7.0.0.0.9-1-$TARGET_CPU.pkg.tar.xz; then + + cd $STAGE5_BUILD || exit 1 + sudo rm -rf jdk7-openjdk + mkdir jdk7-openjdk + cd jdk7-openjdk || exit 1 + mkdir -p pkg/jdk7-openjdk + cd pkg/jdk7-openjdk || exit 1 + mkdir -p opt/jdk7-openjdk + cd opt/jdk7-openjdk || exit 1 + tar zxf $HOME/jdk-7u80-linux-i586.tar.gz + mv jdk1.7.0_80/* . + rmdir jdk1.7.0_80 + cd ../.. || exit 1 + mkdir -p usr/bin + for i in opt/jdk7-openjdk/bin/*; do + ln -s /$i usr/bin/. + done + cd ../.. || exit 1 + + BUILDDATE=$(date '+%s') + size=$(du -sk --apparent-size pkg/) + size="$(( ${size%%[^0-9]*} * 1024 ))" + cat > pkg/jdk7-openjdk/.PKGINFO <<EOF +pkgname = jdk7-openjdk +pkgver = 7.0.0.0.9-1 +pkgdesc = OpenJDK Java 7 development kit (from Oracle download) +provides = java-environment=7 +provides = java-environment-openjdk=7 +url = https://www.oracle.com/Java +builddate = $BUILDDATE +size = $size +arch = $TARGET_CPU +EOF + + cd pkg/jdk7-openjdk || exit 1 + # shellcheck disable=SC2035 + tar cvf - .PKGINFO * | xz > ../../jdk7-openjdk-7.0.0.0.9-1-$TARGET_CPU.pkg.tar.xz + cd ../.. || exit 1 + + cp -v ./*.pkg.tar.xz $STAGE5_CHROOT/packages/$TARGET_CPU/. + rm -rf $STAGE5_CHROOT/var/cache/pacman/pkg/* + rm -rf $STAGE5_CHROOT/packages/$TARGET_CPU/temp.db* + rm -rf $STAGE5_CHROOT/packages/$TARGET_CPU/temp.files* + repo-add -R $STAGE5_CHROOT/packages/$TARGET_CPU/temp.db.tar.gz $STAGE5_CHROOT/packages/$TARGET_CPU/*pkg.tar.xz + sudo pacman --noconfirm --config $STAGE5_CHROOT/etc/pacman.conf -r $STAGE5_CHROOT -Syy gcc-libs +fi + +echo "java7-openjdk shim exists." |