diff --git a/images/make-images b/images/make-images new file mode 100755 index 0000000..d32c973 --- /dev/null +++ b/images/make-images @@ -0,0 +1,40 @@ +#!/bin/bash + +readonly DISTRIB=stretch +readonly INIT_DIR=$PWD +readonly ARCHS="amd64 i386 armhf armel arm64" + +function main() +{ + for ARCH in $ARCHS + do + build_image $ARCH + done +} + +function build_image() +{ + local ARCH=$1 + local CHROOT=chroot-${DISTRIB}-${ARCH} + + cd /tmp/ + cdebootstrap --arch=${ARCH} --foreign ${DISTRIB} ./$CHROOT http://deb.debian.org/debian/ + cp /usr/bin/qemu-arm-static $CHROOT/usr/bin/ + cp /usr/bin/qemu-aarch64-static $CHROOT/usr/bin/ + cp /etc/resolv.conf $CHROOT/etc/resolv.conf + + chroot $CHROOT apt-get update + chroot $CHROOT apt-get dist-upgrade + chroot $CHROOT apt-get install -y build-essential debhelper cmake wget + + chroot $CHROOT wget -q -O /tmp/setup_nodejs https://deb.nodesource.com/setup_4.x + chroot $CHROOT bash /tmp/setup_nodejs + chroot $CHROOT apt-get install -y nodejs + + chroot $CHROOT apt-get clean + + cd $CHROOT + tar -czf $INIT_DIR/${DISTRIB}-${ARCH}.tgz ./* +} + +main diff --git a/scripts/make-images b/scripts/make-images deleted file mode 100755 index 1e65e63..0000000 --- a/scripts/make-images +++ /dev/null @@ -1,23 +0,0 @@ - -readonly ARCH=amd64 -readonly DISTRIB=stretch -readonly CHROOT=chroot-${DISTRIB}-${ARCH} -readonly INIT_DIR=$PWD - -cd /tmp/ -cdebootstrap --arch=${ARCH} --foreign ${DISTRIB} ./$CHROOT http://deb.debian.org/debian/ -cp /usr/bin/qemu-arm-static $CHROOT/usr/bin/ -cp /etc/resolv.conf $CHROOT/etc/resolv.conf - -chroot $CHROOT apt-get update -chroot $CHROOT apt-get dist-upgrade -chroot $CHROOT apt-get install -y build-essential debhelper cmake wget - -#chroot $CHROOT wget -q -O /tmp/setup_nodejs https://deb.nodesource.com/setup_4.x -#chroot $CHROOT bash /tmp/setup_nodejs -#chroot $CHROOT apt-get install -y nodejs - -chroot $CHROOT apt-get clean - -cd $CHROOT -tar -czf $INIT_DIR/${DISTRIB}-${ARCH}.tgz ./* diff --git a/scripts/rebuildd/build-binaries b/scripts/rebuildd/build-binaries index 991e0e0..9bd95eb 100755 --- a/scripts/rebuildd/build-binaries +++ b/scripts/rebuildd/build-binaries @@ -41,7 +41,6 @@ CONFIGFILE="" # Use specific conf for nodejs builds if [[ $package == "yunohost-admin" ]]; then - BASE_TGZ="${PBUILDER_IMAGES}/${arch}/${codename}-nodejs.tgz" CONFIGFILE="--configfile $PBUILDER_CONF/nodejs.conf" fi