forked from pool/element-web
Accepting request 1191871 from home:okurz:branches:devel:languages:nodejs
Update to 1.11.73 OBS-URL: https://build.opensuse.org/request/show/1191871 OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/element-web?expand=0&rev=75
This commit is contained in:
commit
e0c768ae4a
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
3
element-web-1.11.69.tar.gz
Normal file
3
element-web-1.11.69.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:fb03dde3db12e39b4144dccdeab90e5503b7a5007de929f2df0f668009b82009
|
||||||
|
size 2399633
|
3
element-web-1.11.71.tar.gz
Normal file
3
element-web-1.11.71.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3b8692f590c9822c75e8b49327369e7b80df02b772b275a1aa67666b49881e1e
|
||||||
|
size 2388489
|
3
element-web-1.11.73.tar.gz
Normal file
3
element-web-1.11.73.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f41c071dff4739d73fffe8e94a009df24742d443e9bd8d291dc2b3b439312340
|
||||||
|
size 2397041
|
1736
element-web.changes
Normal file
1736
element-web.changes
Normal file
File diff suppressed because it is too large
Load Diff
89
element-web.spec
Normal file
89
element-web.spec
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
#
|
||||||
|
# spec file for package element-web
|
||||||
|
#
|
||||||
|
# Copyright (c) 2023 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Name: element-web
|
||||||
|
Version: 1.11.73
|
||||||
|
Release: 0
|
||||||
|
Summary: A glossy Matrix collaboration client - web files
|
||||||
|
License: Apache-2.0
|
||||||
|
Group: Productivity/Networking/Talk/Clients
|
||||||
|
URL: https://github.com/vector-im/element-web
|
||||||
|
Source0: https://github.com/vector-im/element-web/archive/v%{version}.tar.gz#/element-web-%{version}.tar.gz
|
||||||
|
Source1: npm-packages-offline-cache.tar.gz
|
||||||
|
Source2: jitsi_external_api.min.js
|
||||||
|
Source3: prepare.sh
|
||||||
|
Patch0: fix-webpack-oom.patch
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: nodejs-packaging
|
||||||
|
BuildRequires: yarn
|
||||||
|
BuildRequires: rust
|
||||||
|
BuildRequires: cargo
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description
|
||||||
|
A glossy Matrix collaboration client - web files
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n element-web-%{version} -a1 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
echo 'yarn-offline-mirror "./npm-packages-offline-cache"' > .yarnrc
|
||||||
|
ls -l ./npm-packages-offline-cache | head
|
||||||
|
|
||||||
|
# fix some strange dependency
|
||||||
|
#cp npm-packages-offline-cache/matrix-analytics-events-0.0.1.tgz \
|
||||||
|
# npm-packages-offline-cache/@matrix-analytics-events-0.0.1.tgz
|
||||||
|
#ls -l ./npm-packages-offline-cache/*matrix-analytics-events*
|
||||||
|
|
||||||
|
#sed -i -e 's| matrix-analytics-events "github:matrix-org/matrix-analytics-events.git#[^"]*"| matrix-analytics-events "^0.0.1"|' yarn.lock
|
||||||
|
#sed -i -e 's|"matrix-analytics-events@github:matrix-org/matrix-analytics-events#[^"]*"|matrix-analytics-events@^0.0.1|' yarn.lock
|
||||||
|
|
||||||
|
export SENTRYCLI_SKIP_DOWNLOAD=1
|
||||||
|
|
||||||
|
yarn install --offline --pure-lockfile
|
||||||
|
|
||||||
|
mkdir -p webapp
|
||||||
|
cp %{SOURCE2} ./webapp/jitsi_external_api.min.js
|
||||||
|
echo > scripts/build-jitsi.ts
|
||||||
|
|
||||||
|
DIST_VERSION=%{version} ./scripts/package.sh
|
||||||
|
|
||||||
|
pushd dist || exit 1
|
||||||
|
tar xf element-%{version}.tar.gz
|
||||||
|
popd
|
||||||
|
cp LICENSE dist/element-%{version}/LICENSE
|
||||||
|
|
||||||
|
%install
|
||||||
|
install -d -m 0755 %{buildroot}%{_datadir}/webapps/element
|
||||||
|
|
||||||
|
cp -av dist/element-%{version}/* "%{buildroot}%{_datadir}/webapps/element/"
|
||||||
|
|
||||||
|
install -d -m 0755 %{buildroot}%{_sysconfdir}/webapps/element/
|
||||||
|
install -m 0644 config.sample.json "%{buildroot}%{_sysconfdir}/webapps/element/config.sample.json"
|
||||||
|
|
||||||
|
%fdupes %{buildroot}%{_datadir}/webapps/element/
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license LICENSE
|
||||||
|
%dir %{_datadir}/webapps
|
||||||
|
%{_datadir}/webapps/element
|
||||||
|
%dir %{_sysconfdir}/webapps
|
||||||
|
%dir %{_sysconfdir}/webapps/element
|
||||||
|
%config %{_sysconfdir}/webapps/element/config.sample.json
|
||||||
|
|
||||||
|
%changelog
|
11
fix-webpack-oom.patch
Normal file
11
fix-webpack-oom.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- element-web-1.11.51/package.json.old 2023-12-06 12:17:43.051457300 +0100
|
||||||
|
+++ element-web-1.11.51/package.json 2023-12-06 12:17:48.124782822 +0100
|
||||||
|
@@ -40,7 +40,7 @@
|
||||||
|
"build:res": "ts-node scripts/copy-res.ts",
|
||||||
|
"build:genfiles": "yarn build:res && yarn build:module_system",
|
||||||
|
"build:modernizr": "modernizr -c .modernizr.json -d src/vector/modernizr.js",
|
||||||
|
- "build:bundle": "webpack --progress --mode production",
|
||||||
|
+ "build:bundle": "node --max_old_space_size=4000 --optimize_for_size $(which webpack) --progress --mode production",
|
||||||
|
"build:bundle-stats": "webpack --progress --mode production --json > webpack-stats.json",
|
||||||
|
"build:module_system": "ts-node --project ./tsconfig.module_system.json module_system/scripts/install.ts",
|
||||||
|
"dist": "scripts/package.sh",
|
2
jitsi_external_api.min.js
vendored
Normal file
2
jitsi_external_api.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
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:6e361a588327351dacb1678c8b379e2bf98f1e6a2ddf8e7ef724efaa3c2e96a4
|
||||||
|
size 132031124
|
61
prepare.sh
Normal file
61
prepare.sh
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
version=$1
|
||||||
|
sed -i -e "s/^\(Version: *\)[^ ]*$/\1${version}/" element-web.spec
|
||||||
|
|
||||||
|
oldwd="$(pwd)"
|
||||||
|
|
||||||
|
# cleanup old stuff
|
||||||
|
(find -maxdepth 1 -type d -name 'element-web-*' | xargs rm -r) ||:
|
||||||
|
|
||||||
|
version=$(grep "Version:" element-web.spec | awk '{print $2}')
|
||||||
|
last_packaged_version=$(osc cat devel:languages:nodejs/element-web/element-web.spec | grep "^Version:" | awk '{print $NF}')
|
||||||
|
|
||||||
|
osc rm --force element-web-*.tar.gz || :
|
||||||
|
wget -c https://github.com/vector-im/element-web/archive/v${version}.tar.gz -O element-web-${version}.tar.gz
|
||||||
|
wget https://meet.element.io/libs/external_api.min.js -O jitsi_external_api.min.js
|
||||||
|
osc add element-web-*.tar.gz
|
||||||
|
|
||||||
|
#zypper install yarn cargo gcc-c++ sqlcipher-devel libsecret-devel
|
||||||
|
|
||||||
|
rm -rf "element-web-${version}"
|
||||||
|
tar xzvf element-web-${version}.tar.gz
|
||||||
|
cd element-web-${version}
|
||||||
|
changes=$(grep "^Changes in \[$last_packaged_version\]" -B10000 CHANGELOG.md | head -n -2 | sed -e '/^==*$/d' -e 's/Changes in \[\([^\[]*\)\].*/Version \1/' -e 's/^\([^-].*\)$/ \1/' -e 's/\[.*\](\(.*\))/\1/g' -e 's/^ *Version /Version /g')
|
||||||
|
|
||||||
|
echo 'yarn-offline-mirror "./npm-packages-offline-cache"' > .yarnrc
|
||||||
|
yarn cache clean
|
||||||
|
rm -rf node_modules/
|
||||||
|
yarn install --pure-lockfile --ignore-engines || : # this will download tha packages into the offline cache
|
||||||
|
|
||||||
|
# download some additional dependencie that slips through this earlier method
|
||||||
|
cd ./npm-packages-offline-cache/
|
||||||
|
|
||||||
|
# fill sentry-cli cache with mock binaries for all architecutres
|
||||||
|
mkdir -p sentry-cli
|
||||||
|
cd sentry-cli
|
||||||
|
sentry_cli_version=$(ls ../@sentry-cli-*.tgz | sed -e 's/.*cli-//' -e 's/.tgz//')
|
||||||
|
for arch in i686 x86_64 aarch64 armv7 riscv64 ppc64 ppc64le s390x; do
|
||||||
|
url="https://downloads.sentry-cdn.com/sentry-cli/${sentry_cli_version}/sentry-cli-Linux-${arch}"
|
||||||
|
filehash=$(echo -n "$url" | md5sum | cut -c1-6)
|
||||||
|
target="${filehash}-sentry-cli-Linux-${arch/_/-}"
|
||||||
|
#wget -O "$target" "$url"
|
||||||
|
echo '#!/bin/bash' > "$target"
|
||||||
|
echo '' >> "$target"
|
||||||
|
echo "echo ${sentry_cli_version}" >> "$target"
|
||||||
|
chmod +x "$target"
|
||||||
|
done
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
tar czf npm-packages-offline-cache.tar.gz ./npm-packages-offline-cache
|
||||||
|
cp npm-packages-offline-cache.tar.gz "$oldwd/"
|
||||||
|
cd "$oldwd"
|
||||||
|
echo -e "\n\nDONE creating npm dependency offline cache file 'npm-packages-offline-cache.tar.gz'"
|
||||||
|
|
||||||
|
read -p "Write changes?"
|
||||||
|
osc vc -m "${changes}" element-web.changes
|
||||||
|
dos2unix element-web.changes
|
Loading…
Reference in New Issue
Block a user