diff --git a/package.sh b/package.sh index a567876..52067bb 100755 --- a/package.sh +++ b/package.sh @@ -10,12 +10,13 @@ else NODE_VERSION="$(node --version)" TARFILE_SUFFIX="-${ADDON_ARCH}-${NODE_VERSION/\.*/}" fi -if [ "${ADDON_ARCH}" == "linux-arm" ]; then +# For openwrt-linux-arm and linux-arm we need to cross compile. +if [[ "${ADDON_ARCH}" =~ "linux-arm" ]]; then # We assume that CC and CXX are pointing to the cross compilers - npm install --only=prod + npm install --ignore-scripts --production npm rebuild --arch=armv6l --target_arch=arm else - npm install --only=prod + npm install --production fi rm -f SHA256SUMS