wekan/releases/build-bundle-s390x.sh
Lauri Ojansivu 980510d71a Updated Linux s390x bundle build script.
Thanks to xet7 !
2026-01-16 22:48:43 +02:00

79 lines
2.5 KiB
Bash
Executable file

#!/bin/bash
# This script is only for Wekan maintainer to
# convert x64 bundle to s390x bundle.
if [ $# -ne 1 ]
then
echo "Syntax with Wekan version number:"
echo " ./maintainer-make-bundle-s.sh 5.10"
exit 1
fi
##sudo npm -g install node-gyp
#
## NEW:
#sudo dnf install gcc python3 npm p7zip
#sudo dnf groupinstall "Development Tools"
#npm -g install n
#
# .bashrc:
# # User specific environment
# PATH="$HOME/.local/bin/bin:$HOME/bin:/usr/local/bin:$PATH"
# export PATH
#
# N_PREFIX="$HOME/.local/bin"
# export N_PREFIX
#
#rm -rf bundle
#rm wekan-$1-s390x.zip
#7za x wekan-$1-amd64.zip
# Install deps
sudo apt -y install g++ build-essential p7zip-full
sudo npm -g uninstall node-pre-gyp
sudo npm -g install @mapbox/node-pre-gyp
# Remove old files
rm -rf bundle 7.93
rm wekan-$1-s390x.zip wekan-7.93-s390x.zip
# Download newest WeKan, and WeKan v7.93 that has working fibers and bcrypt
wget --no-check-certificate https://github.com/wekan/wekan/releases/download/v$1/wekan-$1-amd64.zip
wget --no-check-certificate https://github.com/wekan/wekan/releases/download/v7.93/wekan-7.93-s390x.zip
# Unarchive newest WeKan and WeKan v7.93
7z x wekan-$1-amd64.zip
(mkdir 7.93 && cd 7.93 && 7z x ../wekan-7.93-s390x.zip)
# Add working bcrypt
#rm -rf ~/repos/wekan/bundle/programs/server/npm/node_modules/meteor/accounts-password/node_modules/bcrypt
#cp -pR ~/repos/wekan/7.93/bundle/programs/server/npm/node_modules/meteor/accounts-password/node_modules/bcrypt \
#~/repos/wekan/bundle/programs/server/npm/node_modules/meteor/accounts-password/node_modules/
# Add working fibers
rm -rf ~/repos/wekan/bundle/programs/server/node_modules/fibers
cp -pR ~/repos/wekan/7.93/bundle/programs/server/node_modules/fibers \
~/repos/wekan/bundle/programs/server/node_modules/
#(cd bundle/programs/server && chmod u+w *.json && cd node_modules/fibers && node build.js)
#cd ../../../..
(cd bundle/programs/server/npm/node_modules/meteor/accounts-password && npm remove bcrypt && npm install bcrypt)
# Requires building from source https://github.com/meteor/meteor/issues/11682
#(cd bundle/programs/server/npm/node_modules/meteor/accounts-password && npm rebuild --build-from-source)
cd bundle
find . -type d -name '*-garbage*' | xargs rm -rf
find . -name '*phantom*' | xargs rm -rf
find . -name '.*.swp' | xargs rm -f
find . -name '*.swp' | xargs rm -f
cd ..
# Make newest WeKan bundle for Linux s390x
7z a wekan-$1-s390x.zip bundle
#7za a wekan-$1-s390x.zip bundle
#sudo snap start juju-db
#./start-wekan.sh