Browse Source

mattermost 5.37.4

Signed-off-by: webbuilder_pel7ppc64lebuilder0 <webbuilder@powerel.org>
master
webbuilder_pel7ppc64lebuilder0 2 years ago
parent
commit
fdee7b8b2e
  1. 64
      SPECS/mattermost.spec

64
SPECS/mattermost.spec

@ -5,7 +5,7 @@
%define debug_package %{nil} %define debug_package %{nil}


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



Loading…
Cancel
Save