blob: 61008fad3922604e8baf17f0943d498b4cc540c0 (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
# Maintainer: Ouyang Jun <ouyangjun1999@gmail.com>
# Maintainer: Astro Benzene <universebenzene at sina dot com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Jove Yu <yushijun110 [at] gmail.com>
# Contributor: Ariel AxionL <axionl at aosc dot io>
# Contributor: v71
pkgbase=wps-office
pkgname=('wps-office' 'wps-office-mime')
pkgver=11.1.0.11723
#_pkgver=8372
pkgrel=1
#_pkgrel=1
pkgdesc="Kingsoft Office (WPS Office) - an office productivity suite"
arch=('x86_64')
license=('LicenseRef-WPS-EULA')
url="http://wps-community.org"
options=('!emptydirs')
#[[ "$CARCH" = "i686" ]] && _archext=x86 || _archext=x86_64
#source_i686=("http://kdl.cc.ksosoft.com/wps-community/download/${pkgver##*.}/wps-office_${pkgver}_i386.deb"
# 'add_no_kdialog_variable.patch')
#source=("http://kdl.cc.ksosoft.com/wps-community/download/${pkgver##*.}/wps-office_${pkgver}_amd64.deb"
source=("https://wdl1.pcfg.cache.wpscdn.com/wpsdl/wpsoffice/download/linux/${pkgver##*.}/wps-office_${pkgver}.XA_amd64.deb"
'fix-wps-python-parse.patch')
#sha1sums_i686=('60b1c9e33ee6fc1edcefe40dc9ec529d4a668825'
# 'dd8b5283ee17a88a3eb0531976abccd6e5e08c48')
sha1sums=('24132c03e1b53fe8983274c5165caa9128bdb1a6'
'f3713481edf04ffb08be8d24dce66554dd5a4f13')
prepare() {
bsdtar -xpf data.tar.xz
cd "${srcdir}/usr/bin"
sed -i 's|/opt/kingsoft/wps-office|/usr/lib|' *
# sed -i 's|/office6/${gApp} ${gOptExt}|/office6/${gApp} -style gtk+ ${gOptExt}|' wps
# sed -i 's|/office6/${gApp} ${gOptExt}|/office6/${gApp} -style gtk+ ${gOptExt}|' wpp et
cd "${srcdir}/usr/share/icons/hicolor"
for _file in ./*; do
if [ -e ${_file}/mimetypes/wps-office2019-etmain.png ]; then
mkdir -p ${_file}/apps
cp -p ${_file}/mimetypes/wps-office2019* ${_file}/apps
fi
done
cd "${srcdir}"
# patch -Np1 -i "${srcdir}/fix_desktop_exec.patch"
patch -Np1 -i "${srcdir}/fix-wps-python-parse.patch"
}
package_wps-office() {
depends=('fontconfig' 'xorg-mkfontdir' 'libxrender' 'desktop-file-utils' 'shared-mime-info' 'xdg-utils' 'glu' 'sdl2' 'libpulse' 'hicolor-icon-theme' 'libxss' 'sqlite' 'libtool' 'libxslt' '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'
'ttf-wps-fonts: Symbol fonts required by wps-office'
'ttf-ms-fonts: Microsft Fonts recommended for wps-office'
'wps-office-fonts: FZ TTF fonts provided by wps community'
'wps-office-mime: Use mime files provided by Kingsoft'
'wps-office-mui-zh-cn: zh_CN support for WPS Office')
install=${pkgname}.install
conflicts=('kingsoft-office')
# cd wps-office_${pkgver}_$_archext
cd "${srcdir}/opt/kingsoft/wps-office/"
install -d "${pkgdir}/usr/lib"
cp -r office6 "${pkgdir}/usr/lib"
# Fix for icu>=71.1
rm ${pkgdir}/usr/lib/office6/libstdc++.so*
# Use system libjpeg
rm ${pkgdir}/usr/lib/office6/libjpeg.so*
# chmod -x "${pkgdir}/usr/lib/office6/wpsoffice"
# ln -rTsf "${pkgdir}/usr/lib/office6"/{libcef.so,addons/cef/libcef.so}
install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" office6/mui/default/*.html
install -d "${pkgdir}/usr/bin"
cd "${srcdir}/usr/bin"
install -m755 * "${pkgdir}/usr/bin"
cd "${srcdir}/usr/share"
install -d "${pkgdir}/usr/share/applications"
cp -r applications/* "${pkgdir}/usr/share/applications"
# rm "${pkgdir}/usr/share/applications/appurl.desktop"
install -d "${pkgdir}/usr/share/desktop-directories"
cp -r desktop-directories/* "${pkgdir}/usr/share/desktop-directories"
install -d "${pkgdir}/usr/share/icons"
cp -r icons/* "${pkgdir}/usr/share/icons"
# cp -r "$srcdir/usr/share" "${pkgdir}/usr/"
install -Dm644 -t "${pkgdir}/usr/share/fonts/wps-office" fonts/wps-office/*
install -Dm644 -t "${pkgdir}/etc/xdg/menus/applications-merged" "${srcdir}/etc/xdg/menus/applications-merged/wps-office.menu"
}
package_wps-office-mime() {
pkgdesc="Mime files provided by Kingsoft Office (WPS Office)"
arch=('any')
depends=('shared-mime-info')
cd "${srcdir}/usr/share"
install -d "${pkgdir}/usr/share/mime"
cp -r mime/* "${pkgdir}/usr/share/mime"
cd "${srcdir}/opt/kingsoft/wps-office/"
install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" office6/mui/default/*.html
}
|