diff --git a/electron-builder-offline-cache.tar.gz b/electron-builder-offline-cache.tar.gz deleted file mode 100644 index f69d0b7..0000000 --- a/electron-builder-offline-cache.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:89bb1e7a89299c701ece2751bb625569efa53d24c30dd609c2abc28da596a0d7 -size 14206703 diff --git a/element-desktop.changes b/element-desktop.changes index ca77724..6cc741b 100644 --- a/element-desktop.changes +++ b/element-desktop.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Mar 18 11:42:33 UTC 2022 - Dominik Heidler + +- Fix build on other architectures (boo#1197278) + ------------------------------------------------------------------- Thu Mar 17 13:00:11 UTC 2022 - Dominik Heidler diff --git a/element-desktop.spec b/element-desktop.spec index 129f554..6717542 100644 --- a/element-desktop.spec +++ b/element-desktop.spec @@ -28,7 +28,6 @@ Source2: npm-packages-offline-cache.tar.gz Source3: io.element.Element.desktop Source4: element-desktop.sh Source5: prepare.sh -Source6: electron-builder-offline-cache.tar.gz BuildRequires: element-web = %{version} BuildRequires: hicolor-icon-theme BuildRequires: jq @@ -48,7 +47,9 @@ A glossy Matrix collaboration client - desktop %setup -q SYSTEM_ELECTRON_VERSION=$(<%{_libdir}/electron/version) jq -c '.build["electronVersion"]="'$SYSTEM_ELECTRON_VERSION'" | .build["electronDist"]="%{_libdir}/electron"' < package.json | sponge package.json -sed -i 's@"https://packages.riot.im/desktop/update/"@null@g' element.io/release/config.json +jq -c '.build["linux"]["target"]="dir"' < package.json | sponge package.json +cat package.json +jq '.piwik=false | .update_base_url=null' < element.io/release/config.json | sponge element.io/release/config.json pwd cd .. pwd @@ -66,9 +67,9 @@ export ELECTRON_SKIP_BINARY_DOWNLOAD=1 yarn install --offline --pure-lockfile -tar xf %{SOURCE6} +#tar xf %%{SOURCE6} export PATH="$PATH:node_modules/.bin" -export ELECTRON_BUILDER_CACHE="$(pwd)/electron-builder-offline-cache/" +#export ELECTRON_BUILDER_CACHE="$(pwd)/electron-builder-offline-cache/" #yarn run build:native yarn run build @@ -99,6 +100,7 @@ done %license LICENSE %{_bindir}/%{name} %{_datadir}/element/ +%config %{_sysconfdir}/element/config.json %config %{_sysconfdir}/webapps/element/config.json %{_datadir}/webapps/element/config.json %{_sysconfdir}/element/ diff --git a/npm-packages-offline-cache.tar.gz b/npm-packages-offline-cache.tar.gz index d7835fb..9994062 100644 --- a/npm-packages-offline-cache.tar.gz +++ b/npm-packages-offline-cache.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0c32455d97e7ba05a6ca5cb76021cb7bf61decb523abdd49e3651f3f56dc45e6 -size 140695670 +oid sha256:6dd7cd8daefbc544015a7aaf7b1e9edb1a4f6e8c2dd23a319e20659674fb0e37 +size 140689361 diff --git a/prepare.sh b/prepare.sh index 4bdfbb4..a105cf2 100644 --- a/prepare.sh +++ b/prepare.sh @@ -10,31 +10,32 @@ tmpdir="$(mktemp -d)" version=$(grep "Version:" element-desktop.spec | awk '{print $2}') wget -c https://github.com/vector-im/element-desktop/archive/v${version}.tar.gz -O element-desktop-${version}.tar.gz wget -c https://github.com/vector-im/element-web/archive/v${version}.tar.gz -O element-web-${version}.tar.gz -#cp element-desktop.spec "$tmpdir/" -#cd "$tmpdir" +cp element-desktop.spec "$tmpdir/" +cd "$tmpdir" rm -rf "element-desktop-${version}" wget -c https://github.com/vector-im/element-desktop/archive/v${version}.tar.gz -O element-desktop-${version}.tar.gz tar xzvf element-desktop-${version}.tar.gz cd element-desktop-${version} -sed -i 's@"electronVersion": "11.2.3"@"electronVersion": "13.1.2"@g' package.json -sed -i 's@"https://packages.riot.im/desktop/update/"@null@g' element.io/release/config.json +#sed -i 's@"electronVersion": "11.2.3"@"electronVersion": "13.1.2"@g' package.json +#sed -i 's@"https://packages.riot.im/desktop/update/"@null@g' element.io/release/config.json echo 'yarn-offline-mirror "./npm-packages-offline-cache"' > .yarnrc yarn cache clean rm -rf node_modules/ yarn install --pure-lockfile || : # this will download tha packages into the offline cache -mkdir -p electron-builder-offline-cache -export ELECTRON_BUILDER_CACHE="$(pwd)/electron-builder-offline-cache/" -yarn run build +#mkdir -p electron-builder-offline-cache +#export ELECTRON_BUILDER_CACHE="$(pwd)/electron-builder-offline-cache/" +#export PATH="$PATH:node_modules/.bin" +#yarn run build tar czf npm-packages-offline-cache.tar.gz ./npm-packages-offline-cache -cp npm-packages-offline-cache.tar.gz "$oldwd/" +cp -v npm-packages-offline-cache.tar.gz "$oldwd/" -tar czf electron-builder-offline-cache.tar.gz ./electron-builder-offline-cache/ -cp electron-builder-offline-cache.tar.gz "$oldwd/" +#tar czf electron-builder-offline-cache.tar.gz ./electron-builder-offline-cache/ +#cp electron-builder-offline-cache.tar.gz "$oldwd/" cd "$oldwd" echo rm -rf "$tmpdir" echo -e "\n\nDONE creating npm dependency offline cache file 'npm-packages-offline-cache.tar.gz'"