Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions play.d/wpsoffice.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,18 @@
#!/bin/sh

PKGNAME=wps-office
PKGNAME=wpsoffice
SUPPORTEDARCHES="x86_64"
VERSION="$2"
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"

. $(dirname $0)/common.sh

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="${VERSION}.XA"
VERSION=$(eget -O- https://archive2.kylinos.cn/DEB/KYLIN_DEB/pool/main/deb/wpsoffice/ | grep -oP '[^/]+_\K[\d.]+(?=_amd64\.deb)' | sort -V | tail -n1)
fi

mversion=$(echo "$VERSION" | sed -e 's|\.XA$||' -e 's|.*\.||')
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
PKGURL="https://archive2.kylinos.cn/DEB/KYLIN_DEB/pool/main/deb/wpsoffice/wpsoffice_${VERSION}_amd64.deb"

install_pkgurl
8 changes: 7 additions & 1 deletion repack.d/wps-office.sh → repack.d/wpsoffice.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,20 @@ remove_file $PRODUCTDIR/office6/wpscloudsvr
remove_file $PRODUCTDIR/office6/addons/pdfbatchcompression/libpdfbatchcompressionapp.so

# 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
ignore_lib_requires "libc++.so"

# QT is prebuilded
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
# 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
Expand Down