forked from pool/element-desktop
Accepting request 962471 from devel:languages:javascript
- Version 1.10.4 * Improved build process: Perform actual build in OBS OBS-URL: https://build.opensuse.org/request/show/962471 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/element-desktop?expand=0&rev=10
This commit is contained in:
parent
fb5fce7265
commit
fca1aca162
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:caed9f48182d74bc2b3b4da15ba4635f80d39be7dbb5459f161a4bba7fb48ca8
|
|
||||||
size 15601868
|
|
3
electron-builder-offline-cache.tar.gz
Normal file
3
electron-builder-offline-cache.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:89bb1e7a89299c701ece2751bb625569efa53d24c30dd609c2abc28da596a0d7
|
||||||
|
size 14206703
|
3
element-desktop-1.10.4.tar.gz
Normal file
3
element-desktop-1.10.4.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:b3e4e9cb39ef9fdcdb3b83b842853e2ed52944b3caf68dfc5cd5642ac985eeaa
|
||||||
|
size 1939488
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:1ecb82883ea3ff803b155bb89a96b44feccd91ca9c873bc549cd28834a99dbe2
|
|
||||||
size 1926733
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 17 13:00:11 UTC 2022 - Dominik Heidler <dheidler@suse.de>
|
||||||
|
|
||||||
|
- Version 1.10.4
|
||||||
|
* Improved build process: Perform actual build in OBS
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jan 31 15:12:30 UTC 2022 - Dominik Heidler <dheidler@suse.de>
|
Mon Jan 31 15:12:30 UTC 2022 - Dominik Heidler <dheidler@suse.de>
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
electron /usr/lib/element/app.asar "$@"
|
exec electron /usr/share/element/app.asar "$@"
|
||||||
|
@ -17,22 +17,28 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: element-desktop
|
Name: element-desktop
|
||||||
Version: 1.9.9
|
Version: 1.10.4
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A glossy Matrix collaboration client - desktop
|
Summary: A glossy Matrix collaboration client - desktop
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
URL: https://github.com/vector-im/element-desktop
|
URL: https://github.com/vector-im/element-desktop
|
||||||
Source0: https://github.com/vector-im/element-desktop/archive/v%{version}.tar.gz#/element-desktop-%{version}.tar.gz
|
Source0: https://github.com/vector-im/element-desktop/archive/v%{version}.tar.gz#/element-desktop-%{version}.tar.gz
|
||||||
Source1: https://github.com/vector-im/element-web/archive/v%{version}.tar.gz#/element-web-%{version}.tar.gz
|
Source1: https://github.com/vector-im/element-web/archive/v%{version}.tar.gz#/element-web-%{version}.tar.gz
|
||||||
Source2: dist.tar.gz
|
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_tarball.sh
|
Source5: prepare.sh
|
||||||
BuildRequires: element-web
|
Source6: electron-builder-offline-cache.tar.gz
|
||||||
|
BuildRequires: element-web = %{version}
|
||||||
BuildRequires: hicolor-icon-theme
|
BuildRequires: hicolor-icon-theme
|
||||||
BuildRequires: nodejs-electron
|
BuildRequires: jq
|
||||||
Requires: element-web
|
BuildRequires: moreutils
|
||||||
|
BuildRequires: nodejs-electron-devel
|
||||||
|
BuildRequires: yarn
|
||||||
|
Requires: element-web = %{version}
|
||||||
Requires: nodejs-electron
|
Requires: nodejs-electron
|
||||||
|
|
||||||
|
#Element contains no native code
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -40,7 +46,8 @@ A glossy Matrix collaboration client - desktop
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
sed -i 's@"electronVersion": "11.2.3"@"electronVersion": "12.0.4"@g' package.json
|
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
|
sed -i 's@"https://packages.riot.im/desktop/update/"@null@g' element.io/release/config.json
|
||||||
pwd
|
pwd
|
||||||
cd ..
|
cd ..
|
||||||
@ -50,15 +57,27 @@ tar xvf %{SOURCE1}
|
|||||||
cd element-desktop-%{version}
|
cd element-desktop-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Unpack prepared (see prepare.sh) webapp
|
echo 'yarn-offline-mirror "./npm-packages-offline-cache"' >> .yarnrc
|
||||||
tar xvf %{SOURCE2}
|
echo 'nodedir %{_includedir}/electron' >> .yarnrc
|
||||||
|
tar xf %{SOURCE2}
|
||||||
|
ls ./npm-packages-offline-cache | head
|
||||||
|
|
||||||
|
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
|
||||||
|
|
||||||
|
yarn install --offline --pure-lockfile
|
||||||
|
|
||||||
|
tar xf %{SOURCE6}
|
||||||
|
export PATH="$PATH:node_modules/.bin"
|
||||||
|
export ELECTRON_BUILDER_CACHE="$(pwd)/electron-builder-offline-cache/"
|
||||||
|
#yarn run build:native
|
||||||
|
yarn run build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install -d %{buildroot}{%{_prefix}/lib/element/,%{_sysconfdir}/webapps/element}
|
install -d %{buildroot}{%{_datadir}/element/,%{_sysconfdir}/webapps/element}
|
||||||
|
|
||||||
# Install the app content, replace the webapp with a symlink to the system package
|
# Install the app content, replace the webapp with a symlink to the system package
|
||||||
cp -r dist/linux-unpacked/resources/* "%{buildroot}%{_prefix}/lib/element/"
|
cp -r dist/linux-unpacked/resources/* "%{buildroot}%{_datadir}/element/"
|
||||||
ln -s %{_datadir}/webapps/element "%{buildroot}%{_prefix}/lib/element/webapp"
|
ln -s %{_datadir}/webapps/element "%{buildroot}%{_datadir}/element/webapp"
|
||||||
|
|
||||||
# Config file
|
# Config file
|
||||||
ln -s %{_sysconfdir}/element/config.json "%{buildroot}%{_sysconfdir}/webapps/element/config.json"
|
ln -s %{_sysconfdir}/element/config.json "%{buildroot}%{_sysconfdir}/webapps/element/config.json"
|
||||||
@ -79,8 +98,8 @@ done
|
|||||||
%files
|
%files
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%{_prefix}/lib/element/
|
%{_datadir}/element/
|
||||||
%{_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/
|
||||||
%{_datadir}/applications/io.element.Element.desktop
|
%{_datadir}/applications/io.element.Element.desktop
|
||||||
|
3
element-web-1.10.4.tar.gz
Normal file
3
element-web-1.10.4.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:21036274ff3a2036d07415b193e57dde60b79abda9f2dc8d5594a879c0c5f488
|
||||||
|
size 1410632
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:0c6b7d848cae8d28cd11973f5d5f3eb81761f0044beb9b3d300bc3418e47709b
|
|
||||||
size 1402635
|
|
3
npm-packages-offline-cache.tar.gz
Normal file
3
npm-packages-offline-cache.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:0c32455d97e7ba05a6ca5cb76021cb7bf61decb523abdd49e3651f3f56dc45e6
|
||||||
|
size 140695670
|
56
prepare.sh
Normal file
56
prepare.sh
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
oldwd="$(pwd)"
|
||||||
|
tmpdir="$(mktemp -d)"
|
||||||
|
|
||||||
|
#zypper install yarn cargo gcc-c++ sqlcipher-devel libsecret-devel
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
tar czf npm-packages-offline-cache.tar.gz ./npm-packages-offline-cache
|
||||||
|
cp 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/"
|
||||||
|
cd "$oldwd"
|
||||||
|
echo rm -rf "$tmpdir"
|
||||||
|
echo -e "\n\nDONE creating npm dependency offline cache file 'npm-packages-offline-cache.tar.gz'"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#yarn install
|
||||||
|
#export PATH="$PATH:node_modules/.bin"
|
||||||
|
#yarn run build:native
|
||||||
|
#yarn run build
|
||||||
|
#tar czvf ../dist.tar.gz dist/linux-unpacked/resources/
|
||||||
|
#cd ..
|
||||||
|
#cp dist.tar.gz "$oldwd/"
|
||||||
|
#cd "$oldwd"
|
||||||
|
#rm -rf "$tmpdir"
|
||||||
|
#rm -rf "element-desktop-${version}"
|
||||||
|
#echo -e "\n\nDONE creating output file 'dist.tar.gz'"
|
@ -1,34 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
oldwd="$(pwd)"
|
|
||||||
tmpdir="$(mktemp -d)"
|
|
||||||
|
|
||||||
#zypper install yarn cargo gcc-c++ sqlcipher-devel libsecret-devel
|
|
||||||
|
|
||||||
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"
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
yarn install
|
|
||||||
export PATH="$PATH:node_modules/.bin"
|
|
||||||
yarn run build:native
|
|
||||||
yarn run build
|
|
||||||
tar czvf ../dist.tar.gz dist/linux-unpacked/resources/
|
|
||||||
cd ..
|
|
||||||
cp dist.tar.gz "$oldwd/"
|
|
||||||
cd "$oldwd"
|
|
||||||
rm -rf "$tmpdir"
|
|
||||||
#rm -rf "element-desktop-${version}"
|
|
||||||
echo -e "\n\nDONE creating output file 'dist.tar.gz'"
|
|
Loading…
Reference in New Issue
Block a user