forked from pool/element-desktop
Accepting request 962673 from devel:languages:javascript
- Fix build on other architectures (boo#1197278) OBS-URL: https://build.opensuse.org/request/show/962673 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/element-desktop?expand=0&rev=11
This commit is contained in:
parent
fca1aca162
commit
e824e090a0
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:89bb1e7a89299c701ece2751bb625569efa53d24c30dd609c2abc28da596a0d7
|
|
||||||
size 14206703
|
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 18 11:42:33 UTC 2022 - Dominik Heidler <dheidler@suse.de>
|
||||||
|
|
||||||
|
- Fix build on other architectures (boo#1197278)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Mar 17 13:00:11 UTC 2022 - Dominik Heidler <dheidler@suse.de>
|
Thu Mar 17 13:00:11 UTC 2022 - Dominik Heidler <dheidler@suse.de>
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@ Source2: npm-packages-offline-cache.tar.gz
|
|||||||
Source3: io.element.Element.desktop
|
Source3: io.element.Element.desktop
|
||||||
Source4: element-desktop.sh
|
Source4: element-desktop.sh
|
||||||
Source5: prepare.sh
|
Source5: prepare.sh
|
||||||
Source6: electron-builder-offline-cache.tar.gz
|
|
||||||
BuildRequires: element-web = %{version}
|
BuildRequires: element-web = %{version}
|
||||||
BuildRequires: hicolor-icon-theme
|
BuildRequires: hicolor-icon-theme
|
||||||
BuildRequires: jq
|
BuildRequires: jq
|
||||||
@ -48,7 +47,9 @@ A glossy Matrix collaboration client - desktop
|
|||||||
%setup -q
|
%setup -q
|
||||||
SYSTEM_ELECTRON_VERSION=$(<%{_libdir}/electron/version)
|
SYSTEM_ELECTRON_VERSION=$(<%{_libdir}/electron/version)
|
||||||
jq -c '.build["electronVersion"]="'$SYSTEM_ELECTRON_VERSION'" | .build["electronDist"]="%{_libdir}/electron"' < package.json | sponge package.json
|
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
|
pwd
|
||||||
cd ..
|
cd ..
|
||||||
pwd
|
pwd
|
||||||
@ -66,9 +67,9 @@ export ELECTRON_SKIP_BINARY_DOWNLOAD=1
|
|||||||
|
|
||||||
yarn install --offline --pure-lockfile
|
yarn install --offline --pure-lockfile
|
||||||
|
|
||||||
tar xf %{SOURCE6}
|
#tar xf %%{SOURCE6}
|
||||||
export PATH="$PATH:node_modules/.bin"
|
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:native
|
||||||
yarn run build
|
yarn run build
|
||||||
|
|
||||||
@ -99,6 +100,7 @@ done
|
|||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%{_datadir}/element/
|
%{_datadir}/element/
|
||||||
|
%config %{_sysconfdir}/element/config.json
|
||||||
%config %{_sysconfdir}/webapps/element/config.json
|
%config %{_sysconfdir}/webapps/element/config.json
|
||||||
%{_datadir}/webapps/element/config.json
|
%{_datadir}/webapps/element/config.json
|
||||||
%{_sysconfdir}/element/
|
%{_sysconfdir}/element/
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:0c32455d97e7ba05a6ca5cb76021cb7bf61decb523abdd49e3651f3f56dc45e6
|
oid sha256:6dd7cd8daefbc544015a7aaf7b1e9edb1a4f6e8c2dd23a319e20659674fb0e37
|
||||||
size 140695670
|
size 140689361
|
||||||
|
21
prepare.sh
21
prepare.sh
@ -10,31 +10,32 @@ tmpdir="$(mktemp -d)"
|
|||||||
version=$(grep "Version:" element-desktop.spec | awk '{print $2}')
|
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-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
|
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/"
|
cp element-desktop.spec "$tmpdir/"
|
||||||
#cd "$tmpdir"
|
cd "$tmpdir"
|
||||||
|
|
||||||
rm -rf "element-desktop-${version}"
|
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
|
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
|
tar xzvf element-desktop-${version}.tar.gz
|
||||||
cd element-desktop-${version}
|
cd element-desktop-${version}
|
||||||
|
|
||||||
sed -i 's@"electronVersion": "11.2.3"@"electronVersion": "13.1.2"@g' package.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
|
#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
|
echo 'yarn-offline-mirror "./npm-packages-offline-cache"' > .yarnrc
|
||||||
yarn cache clean
|
yarn cache clean
|
||||||
rm -rf node_modules/
|
rm -rf node_modules/
|
||||||
yarn install --pure-lockfile || : # this will download tha packages into the offline cache
|
yarn install --pure-lockfile || : # this will download tha packages into the offline cache
|
||||||
|
|
||||||
mkdir -p electron-builder-offline-cache
|
#mkdir -p electron-builder-offline-cache
|
||||||
export ELECTRON_BUILDER_CACHE="$(pwd)/electron-builder-offline-cache/"
|
#export ELECTRON_BUILDER_CACHE="$(pwd)/electron-builder-offline-cache/"
|
||||||
yarn run build
|
#export PATH="$PATH:node_modules/.bin"
|
||||||
|
#yarn run build
|
||||||
|
|
||||||
tar czf npm-packages-offline-cache.tar.gz ./npm-packages-offline-cache
|
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/
|
#tar czf electron-builder-offline-cache.tar.gz ./electron-builder-offline-cache/
|
||||||
cp electron-builder-offline-cache.tar.gz "$oldwd/"
|
#cp electron-builder-offline-cache.tar.gz "$oldwd/"
|
||||||
cd "$oldwd"
|
cd "$oldwd"
|
||||||
echo rm -rf "$tmpdir"
|
echo rm -rf "$tmpdir"
|
||||||
echo -e "\n\nDONE creating npm dependency offline cache file 'npm-packages-offline-cache.tar.gz'"
|
echo -e "\n\nDONE creating npm dependency offline cache file 'npm-packages-offline-cache.tar.gz'"
|
||||||
|
Loading…
Reference in New Issue
Block a user