mattermost 5.37.4
Signed-off-by: webbuilder_pel7ppc64lebuilder0 <webbuilder@powerel.org>master
parent
9290024407
commit
fdee7b8b2e
|
@ -5,7 +5,7 @@
|
|||
%define debug_package %{nil}
|
||||
|
||||
Name : mattermost
|
||||
Version : 5.37.2
|
||||
Version : 5.37.4
|
||||
Release : 1%{dist}
|
||||
License : MIT
|
||||
URL : https://mattermost.io
|
||||
|
@ -48,36 +48,40 @@ sed 's/amd64/%{_arch}/g' -i build/release.mk
|
|||
make build-linux
|
||||
popd
|
||||
pushd src/github.com/mattermost/mattermost-webapp/
|
||||
source /opt/rh/devtoolset-10/enable
|
||||
git checkout v%{version}
|
||||
npm install --save
|
||||
# we need to patch optipng from npm
|
||||
git clone https://github.com/imagemin/optipng-bin node_modules/optipng-bin/
|
||||
sed 's/--with-system-zlib/--with-system-zlib --with-system-libpng/' -i node_modules/optipng-bin/lib/install.js
|
||||
rm -rf node_modules/optipng-bin/.git/
|
||||
cp %{_bindir}/optipng node_modules/optipng-bin/vendor/optipng
|
||||
rm -rf node_modules/pngquant-bin
|
||||
git clone https://github.com/imagemin/pngquant-bin node_modules/pngquant-bin
|
||||
cp %{_bindir}/pngquant node_modules/pngquant-bin/vendor/pngquant
|
||||
rm -rf node_modules/imagemin-pngquant
|
||||
git clone https://github.com/imagemin/imagemin-pngquant node_modules/imagemin-pngquant
|
||||
npm rebuild
|
||||
%ifarch ppc64 ppc64le
|
||||
# because optipng doesn't build on ppc64 or ppc64le
|
||||
#cp %{_bindir}/optipng node_modules/optipng-bin/vendor/optipng
|
||||
#cp %{_bindir}/gifsicle node_modules/gifsicle/vendor/gifsicle
|
||||
#cp %{_bindir}/cwebp node_modules/cwebp-bin/vendor/cwebp
|
||||
#cp %{_bindir}/dwebp node_modules/cwebp-bin/vendor/dwebp
|
||||
%endif
|
||||
sed "/import favicon16x16 from 'images\/favicon\/favicon-16x16.png';/d" -i components/favicon_title_handler/favicon_title_handler.tsx
|
||||
sed "/import favicon32x32 from 'images\/favicon\/favicon-32x32.png';/d" -i components/favicon_title_handler/favicon_title_handler.tsx
|
||||
sed "/import redDotFavicon32x32 from 'images\/favicon\/favicon-reddot-32x32.png';/d" -i components/favicon_title_handler/favicon_title_handler.tsx
|
||||
sed "/import redDotFavicon96x96 from 'images\/favicon\/favicon-reddot-96x96.png';/d" -i components/favicon_title_handler/favicon_title_handler.tsx
|
||||
sed "/const link16x16 = document.querySelector<HTMLLinkElement>('link\[rel="icon"\]\[sizes="16x16"\]');/d" -i components/favicon_title_handler/favicon_title_handler.tsx
|
||||
sed "/const link32x32 = document.querySelector<HTMLLinkElement>('link\[rel="icon"\]\[sizes="32x32"\]');/d" -i components/favicon_title_handler/favicon_title_handler.tsx
|
||||
sed "/link16x16!.href = typeof redDotFavicon16x16 === 'string' ? redDotFavicon16x16 : '';/d" -i components/favicon_title_handler/favicon_title_handler.tsx
|
||||
sed "/link32x32!.href = typeof redDotFavicon32x32 === 'string' ? redDotFavicon32x32 : '';/d" -i components/favicon_title_handler/favicon_title_handler.tsx
|
||||
sed "/link16x16!.href = typeof favicon16x16 === 'string' ? favicon16x16 : '';/d" -i components/favicon_title_handler/favicon_title_handler.tsx
|
||||
sed "/link32x32!.href = typeof favicon32x32 === 'string' ? favicon32x32 : '';/d" -i components/favicon_title_handler/favicon_title_handler.tsx
|
||||
rm -rf node_modules/
|
||||
rm -rf package-lock.json
|
||||
npm install --force #--save
|
||||
### ### ### # we need to patch optipng from npm
|
||||
### ### ### git clone https://github.com/imagemin/optipng-bin node_modules/optipng-bin/
|
||||
### ### ### sed 's/--with-system-zlib/--with-system-zlib --with-system-libpng/' -i node_modules/optipng-bin/lib/install.js
|
||||
### ### ### rm -rf node_modules/optipng-bin/.git/
|
||||
### ### ### cp %{_bindir}/optipng node_modules/optipng-bin/vendor/optipng
|
||||
### ### ### rm -rf node_modules/pngquant-bin
|
||||
### ### ### git clone https://github.com/imagemin/pngquant-bin node_modules/pngquant-bin
|
||||
### ### ### cp %{_bindir}/pngquant node_modules/pngquant-bin/vendor/pngquant
|
||||
### ### ### rm -rf node_modules/imagemin-pngquant
|
||||
### ### ### git clone https://github.com/imagemin/imagemin-pngquant node_modules/imagemin-pngquant
|
||||
### ### ### npm rebuild
|
||||
### ### ### %ifarch ppc64 ppc64le
|
||||
### ### ### # because optipng doesn't build on ppc64 or ppc64le
|
||||
### ### ### cp %{_bindir}/optipng node_modules/optipng-bin/vendor/optipng
|
||||
### ### ### cp %{_bindir}/gifsicle node_modules/gifsicle/vendor/gifsicle
|
||||
### ### ### cp %{_bindir}/cwebp node_modules/cwebp-bin/vendor/cwebp
|
||||
### ### ### cp %{_bindir}/dwebp node_modules/cwebp-bin/vendor/dwebp
|
||||
### ### ### cp %{_bindir}/pngquant node_modules/pngquant-bin/vendor/pngquant
|
||||
### ### ### %endif
|
||||
### ### ### sed "/import favicon16x16 from 'images\/favicon\/favicon-16x16.png';/d" -i components/favicon_title_handler/favicon_title_handler.tsx
|
||||
### ### ### sed "/import favicon32x32 from 'images\/favicon\/favicon-32x32.png';/d" -i components/favicon_title_handler/favicon_title_handler.tsx
|
||||
### ### ### sed "/import redDotFavicon32x32 from 'images\/favicon\/favicon-reddot-32x32.png';/d" -i components/favicon_title_handler/favicon_title_handler.tsx
|
||||
### ### ### sed "/import redDotFavicon96x96 from 'images\/favicon\/favicon-reddot-96x96.png';/d" -i components/favicon_title_handler/favicon_title_handler.tsx
|
||||
### ### ### sed "/const link16x16 = document.querySelector<HTMLLinkElement>('link\[rel="icon"\]\[sizes="16x16"\]');/d" -i components/favicon_title_handler/favicon_title_handler.tsx
|
||||
### ### ### sed "/const link32x32 = document.querySelector<HTMLLinkElement>('link\[rel="icon"\]\[sizes="32x32"\]');/d" -i components/favicon_title_handler/favicon_title_handler.tsx
|
||||
### ### ### sed "/link16x16!.href = typeof redDotFavicon16x16 === 'string' ? redDotFavicon16x16 : '';/d" -i components/favicon_title_handler/favicon_title_handler.tsx
|
||||
### ### ### sed "/link32x32!.href = typeof redDotFavicon32x32 === 'string' ? redDotFavicon32x32 : '';/d" -i components/favicon_title_handler/favicon_title_handler.tsx
|
||||
### ### ### sed "/link16x16!.href = typeof favicon16x16 === 'string' ? favicon16x16 : '';/d" -i components/favicon_title_handler/favicon_title_handler.tsx
|
||||
### ### ### sed "/link32x32!.href = typeof favicon32x32 === 'string' ? favicon32x32 : '';/d" -i components/favicon_title_handler/favicon_title_handler.tsx
|
||||
npm run build
|
||||
popd
|
||||
|
||||
|
|
Loading…
Reference in New Issue