summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4934dbf1eebf08c339a8e14927b9bae4220691d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Maintainer: yifwon <wyf9661 [at] gmail.com>
pkgbase=wps-office-bin
pkgname=('wps-office-bin')
pkgver=12.1.0.17900
pkgrel=3
pkgdesc="WPS Office, is an office productivity suite."
arch=('x86_64')
url="https://linux.wps.cn"
_srcurl="https://archive2.kylinos.cn/DEB/KYLIN_DEB/pool/main/deb/wpsoffice"
license=('LicenseRef-WPS-EULA')
makedepends=(
  'tar')
depends=(
  'fontconfig' 'libxrender' 'xdg-utils' 'glu'
  'libpulse' 'libxss' 'sqlite' 'libtool' 'libtiff'
  'libxslt' 'freetype2')
optdepends=(
  'wps-office-fonts: FZ TTF fonts provided by wps office'
  'cups: for printing support'
  'libjpeg-turbo: JPEG image codec support'
  'libpng12: PNG image codec support'
  'ttf-wps-fonts: Symbol fonts required by wps-office'
  'ttf-ms-fonts: Microsft Fonts recommended for wps-office')
conflicts=('wps-office')
provides=('wps-office')
options=(!strip !zipman !debug)

source_x86_64=("wps-office_${pkgver}_amd64.deb::${_srcurl}/wpsoffice_${pkgver}_amd64.deb")
sha1sums_x86_64=('c7ea086728f7c2a140d1d51c507fc0e6d4f30b18')

package(){
  xz -df data.tar.xz
  tar --no-same-owner -C "${pkgdir}" -xf data.tar --exclude './usr/share/fonts'\
  --exclude './usr/share/desktop-directories' ./opt/kingsoft ./usr

  cd "${pkgdir}"
  # use system lib
  rm opt/kingsoft/wps-office/office6/lib{jpeg,stdc++}.so*

  # fix python2 call
  sed -i "s/python -c 'import sys, urllib; print urllib\.unquote(sys\.argv\[1\])'/\
  python -c 'import sys, urllib.parse; print(urllib.parse.unquote(sys.argv[1]))'/" usr/bin/wps
}