diff options
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 52 | ||||
-rw-r--r-- | fix-wps-python-parse.patch | 20 |
3 files changed, 78 insertions, 17 deletions
@@ -1,31 +1,39 @@ pkgbase = wps-office-cn pkgdesc = Kingsoft Office (WPS Office) CN version - an office productivity suite - pkgver = 11.1.0.9505 + pkgver = 11.1.0.11719 pkgrel = 1 url = https://linux.wps.cn arch = x86_64 - license = custom + arch = aarch64 + license = LicenseRef-WPS-EULA options = !emptydirs - source = https://wdl1.cache.wps.cn/wps/download/ep/Linux2019/9505/wps-office_11.1.0.9505_amd64.deb - sha1sums = 46edeb206182c5ab9f1effdc4eee76f8b6e9a607 + source = fix-wps-python-parse.patch + sha1sums = f3713481edf04ffb08be8d24dce66554dd5a4f13 + source_x86_64 = wps-office_11.1.0.11719_amd64.deb::https://wps-linux-personal.wpscdn.cn/wps/download/ep/Linux2019/11719/wps-office_11.1.0.11719_amd64.deb?t=1708571846&k=14391b2b5c4b1af79d05ece2ad3889b8 + sha1sums_x86_64 = 31651fdf617b55d22aef19783182e969f8f1e222 + source_aarch64 = wps-office_11.1.0.11719_arm64.deb::https://wps-linux-personal.wpscdn.cn/wps/download/ep/Linux2019/11719/wps-office_11.1.0.11719_arm64.deb?t=1708571846&k=84039bf78f846f5fd77ef1177f89291a + sha1sums_aarch64 = 990c3dcc276118d31907e6d17ac3c1d3f304b6c1 pkgname = wps-office-cn install = wps-office-cn.install depends = fontconfig depends = xorg-mkfontdir depends = libxrender - depends = gtk2 depends = desktop-file-utils depends = shared-mime-info depends = xdg-utils depends = glu - depends = openssl-1.0 + depends = openssl-1.1 depends = sdl2 depends = libpulse depends = hicolor-icon-theme depends = libxss depends = sqlite depends = libtool + depends = libxslt + depends = qt5-base + depends = libjpeg-turbo + optdepends = libtiff5: Provide libtiff.so.5 for wpspdf working optdepends = cups: for printing support optdepends = libjpeg-turbo: JPEG image codec support optdepends = pango: for complex (right-to-left) text support @@ -41,10 +49,11 @@ pkgname = wps-office-cn pkgname = wps-office-mime-cn pkgdesc = Mime files provided by Kingsoft Office (WPS Office) cn version + arch = any depends = shared-mime-info provides = wps-office-mime conflicts = wps-office-mime pkgname = wps-office-mui-zh-cn pkgdesc = Chinese (Simplified) mui package for WPS Office - + arch = any @@ -3,24 +3,45 @@ # Contributor: Ouyang Jun <ouyangjun1999@gmail.com> # Contributor: Jove Yu <yushijun110 [at] gmail.com> # Contributor: Ariel AxionL <axionl at aosc dot io> +# Contributor: v71 pkgbase=wps-office-cn pkgname=('wps-office-cn' 'wps-office-mime-cn' 'wps-office-mui-zh-cn') -pkgver=11.1.0.9505 +pkgver=11.1.0.11719 pkgrel=1 pkgdesc="Kingsoft Office (WPS Office) CN version - an office productivity suite" -arch=('x86_64') -license=('custom') +arch=('x86_64' 'aarch64') +license=('LicenseRef-WPS-EULA') url="https://linux.wps.cn" options=('!emptydirs') -source=("https://wdl1.cache.wps.cn/wps/download/ep/Linux2019/${pkgver##*.}/wps-office_${pkgver}_amd64.deb") -sha1sums=('46edeb206182c5ab9f1effdc4eee76f8b6e9a607') +#DLAGENTS=("https::/usr/bin/curl -e https://www.wps.cn/product/wpslinux -o %o %u") + +# https://gitlab.com/cwittlut/wps-tsk/-/blob/main/tsk.sh?ref_type=heads by Ryan Tsien +# https://pastebin.com/29TeRUMj by Asuka Minato +_get_source_url() { + url="https://wps-linux-personal.wpscdn.cn/wps/download/ep/Linux2019/${pkgver##*.}/wps-office_${pkgver}_$1.deb" + uri="${url#https://wps-linux-personal.wpscdn.cn}" + secrityKey='7f8faaaa468174dc1c9cd62e5f218a5b' + timestamp10=$(date '+%s') + md5hash=$(echo -n "${secrityKey}${uri}${timestamp10}" | md5sum) + url+="?t=${timestamp10}&k=${md5hash%% *}" + echo "$url" +} + +#source_x86_64=("https://mirrors.163.com/ubuntukylin/pool/partner/wps-office_${pkgver}_amd64.deb") +source_x86_64=("wps-office_${pkgver}_amd64.deb::$(_get_source_url amd64)") +source_aarch64=("wps-office_${pkgver}_arm64.deb::$(_get_source_url arm64)") +source=('fix-wps-python-parse.patch') +sha1sums=('f3713481edf04ffb08be8d24dce66554dd5a4f13') +sha1sums_x86_64=('31651fdf617b55d22aef19783182e969f8f1e222') +sha1sums_aarch64=('990c3dcc276118d31907e6d17ac3c1d3f304b6c1') prepare() { bsdtar -xpf data.tar.xz cd "${srcdir}/usr/bin" sed -i 's|/opt/kingsoft/wps-office|/usr/lib|' * + [[ "$CARCH" = "aarch64" ]] && sed -i '2a export LD_PRELOAD=/usr/lib/libfreetype.so' * cd "${srcdir}/usr/share/icons/hicolor" for _file in ./*; do @@ -29,11 +50,15 @@ prepare() { cp -p ${_file}/mimetypes/wps-office2019* ${_file}/apps fi done + + cd "${srcdir}" + patch -Np1 -i "${srcdir}/fix-wps-python-parse.patch" } package_wps-office-cn() { - depends=('fontconfig' 'xorg-mkfontdir' 'libxrender' 'gtk2' 'desktop-file-utils' 'shared-mime-info' 'xdg-utils' 'glu' 'openssl-1.0' 'sdl2' 'libpulse' 'hicolor-icon-theme' 'libxss' 'sqlite' 'libtool') - optdepends=('cups: for printing support' + depends=('fontconfig' 'xorg-mkfontdir' 'libxrender' 'desktop-file-utils' 'shared-mime-info' 'xdg-utils' 'glu' 'openssl-1.1' 'sdl2' 'libpulse' 'hicolor-icon-theme' 'libxss' 'sqlite' 'libtool' 'libxslt' 'qt5-base' 'libjpeg-turbo') + optdepends=('libtiff5: Provide libtiff.so.5 for wpspdf working' + 'cups: for printing support' 'libjpeg-turbo: JPEG image codec support' 'pango: for complex (right-to-left) text support' 'curl: An URL retrieval utility and library' @@ -49,7 +74,12 @@ package_wps-office-cn() { install -d "${pkgdir}/usr/lib" cp -r office6 "${pkgdir}/usr/lib" - install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" office6/mui/default/*.txt + # Fix for icu>=71.1 + rm ${pkgdir}/usr/lib/office6/libstdc++.so* + # Use system libjpeg + rm ${pkgdir}/usr/lib/office6/libjpeg.so* + [[ "$CARCH" = "aarch64" ]] && rm "${pkgdir}"/usr/lib/office6/libfreetype.so* + install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" office6/mui/default/*.html rm -r "${pkgdir}/usr/lib/office6/mui/en_US/resource/help" rm -r "${pkgdir}/usr/lib/office6/mui/zh_CN" @@ -75,6 +105,7 @@ package_wps-office-cn() { package_wps-office-mui-zh-cn() { pkgdesc="Chinese (Simplified) mui package for WPS Office" + arch=('any') cd "${srcdir}/opt/kingsoft/wps-office/office6/mui" install -d "${pkgdir}/usr/lib/office6/mui/en_US/resource" @@ -82,11 +113,12 @@ package_wps-office-mui-zh-cn() { cp -r zh_CN "${pkgdir}/usr/lib/office6/mui" cd "${srcdir}/opt/kingsoft/wps-office/" - install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" office6/mui/default/*.txt + install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" office6/mui/default/*.html } package_wps-office-mime-cn() { pkgdesc="Mime files provided by Kingsoft Office (WPS Office) cn version" + arch=('any') depends=('shared-mime-info') conflicts=('wps-office-mime') provides=('wps-office-mime') @@ -96,5 +128,5 @@ package_wps-office-mime-cn() { cp -r mime/* "${pkgdir}/usr/share/mime" cd "${srcdir}/opt/kingsoft/wps-office/" - install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" office6/mui/default/*.txt + install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" office6/mui/default/*.html } diff --git a/fix-wps-python-parse.patch b/fix-wps-python-parse.patch new file mode 100644 index 000000000000..092781f67efc --- /dev/null +++ b/fix-wps-python-parse.patch @@ -0,0 +1,20 @@ +--- a/usr/bin/wps 2022-12-14 14:42:22.494474822 +0800 ++++ b/usr/bin/wps 2022-12-14 14:40:49.544596650 +0800 +@@ -61,7 +61,7 @@ + + gFilePath=$1 + if [ ${gFilePath:0:7} = "file://" ]; then +- gFilePath=$(python -c 'import sys, urllib; print urllib.unquote(sys.argv[1])' "$1") ++ gFilePath=$(python -c 'import sys, urllib.parse; print(urllib.parse.unquote(sys.argv[1]))' "$1") + gFilePath=${gFilePath#file://} + gIsUrl=1 + fi +@@ -83,7 +83,7 @@ + do + gFilePath=$file + if [ ${gFilePath:0:7} = "file://" ]; then +- gFilePath=$(python -c 'import sys, urllib; print urllib.unquote(sys.argv[1])' "$file") ++ gFilePath=$(python -c 'import sys, urllib.parse; print(urllib.parse.unquote(sys.argv[1]))' "$file") + gFilePath=${gFilePath#file://} + else + return 0 |