Commit 6aa1c1e6 authored by Boris Yumankulov's avatar Boris Yumankulov Committed by Vitaly Lipatov

epm play wpsoffice: use new cn version (eterbug #17952)

parent 082834c3
#!/bin/sh #!/bin/sh
PKGNAME=wps-office PKGNAME=wpsoffice
SUPPORTEDARCHES="x86_64" SUPPORTEDARCHES="x86_64"
VERSION="$2" VERSION="$2"
DESCRIPTION="WPS Office for Linux from the official site" DESCRIPTION="WPS Office for Linux from the official site"
URL="https://www.wps.com/ru-RU/" URL="https://www.wps.cn/product/wpslinux"
TIPS="Run epm play wpsoffice=<version> to install some specific version" TIPS="Run epm play wpsoffice=<version> to install some specific version"
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
if [ "$VERSION" = "*" ] ; then if [ "$VERSION" = "*" ] ; then
VERSION=$(eget -O- https://www.wps.com/whatsnew/linux/ | grep -oP "\W(\d+\.\d+\.\d+\.\d+)\W" | grep -oP "\d+\.\d+\.\d+\.\d+" | head -n1) VERSION=$(eget -O- https://archive2.kylinos.cn/DEB/KYLIN_DEB/pool/main/deb/wpsoffice/ | grep -oP '[^/]+_\K[\d.]+(?=_amd64\.deb)' | sort -V | tail -n1)
VERSION="${VERSION}.XA"
fi fi
mversion=$(echo "$VERSION" | sed -e 's|\.XA$||' -e 's|.*\.||') PKGURL="https://archive2.kylinos.cn/DEB/KYLIN_DEB/pool/main/deb/wpsoffice/wpsoffice_${VERSION}_amd64.deb"
pkgtype=$(epm print info -p)
case $pkgtype in
rpm)
PKGURL="https://wdl1.pcfg.cache.wpscdn.com/wpsdl/wpsoffice/download/linux/$mversion/wps-office-${VERSION}-1.x86_64.rpm"
;;
*)
PKGURL="https://wdl1.pcfg.cache.wpscdn.com/wpsdl/wpsoffice/download/linux/$mversion/wps-office_${VERSION}_amd64.deb"
;;
esac
install_pkgurl install_pkgurl
...@@ -24,7 +24,10 @@ remove_file $PRODUCTDIR/office6/wpscloudsvr ...@@ -24,7 +24,10 @@ remove_file $PRODUCTDIR/office6/wpscloudsvr
remove_file $PRODUCTDIR/office6/addons/pdfbatchcompression/libpdfbatchcompressionapp.so remove_file $PRODUCTDIR/office6/addons/pdfbatchcompression/libpdfbatchcompressionapp.so
# Fix for icu>=71.1 # Fix for icu>=71.1
remove_file $PRODUCTDIR/office6/libstdc++.so.6* remove_file $PRODUCTDIR/office6/libstdc++.so.*
# Use system libjpeg
remove_file $PRODUCTDIR/office6/libjpeg.so.*
# hack to fix bug somewhere in linking # hack to fix bug somewhere in linking
ignore_lib_requires "libc++.so" ignore_lib_requires "libc++.so"
...@@ -32,6 +35,9 @@ ignore_lib_requires "libc++.so" ...@@ -32,6 +35,9 @@ ignore_lib_requires "libc++.so"
# QT is prebuilded # QT is prebuilded
ignore_lib_requires "libQtCore.so.4 libQtNetwork.so.4 libQtXml.so.4" ignore_lib_requires "libQtCore.so.4 libQtNetwork.so.4 libQtXml.so.4"
# WPS Office provide libuof.so()(64bit) itself
ignore_lib_requires "libuof.so"
# Fix wps deprecated python2 command # Fix wps deprecated python2 command
# https://aur.archlinux.org/cgit/aur.git/tree/fix-wps-python-parse.patch?h=wps-office-cn # https://aur.archlinux.org/cgit/aur.git/tree/fix-wps-python-parse.patch?h=wps-office-cn
subst 's/python -c '\''import sys, urllib; print urllib.unquote(sys.argv\[1\])'\''/python3 -c '\''import sys, urllib.parse; print(urllib.parse.unquote(sys.argv[1]))'\''/' $BUILDROOT/usr/bin/wps subst 's/python -c '\''import sys, urllib; print urllib.unquote(sys.argv\[1\])'\''/python3 -c '\''import sys, urllib.parse; print(urllib.parse.unquote(sys.argv[1]))'\''/' $BUILDROOT/usr/bin/wps
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment