Skip to content

Commit

Permalink
editors/linux-wps-office: New port: WPS Office for Linux
Browse files Browse the repository at this point in the history
WPS Office is a complete office suite with PDF editor.

PR:		252736
Submitted by:	Martin Filla <freebsd@sysctl.cz> (in part)
Approved by:	lwhsu (mentor)
  • Loading branch information
yzgyyang committed Jun 11, 2021
1 parent 89f32ef commit 3381abb
Show file tree
Hide file tree
Showing 5 changed files with 4,347 additions and 0 deletions.
1 change: 1 addition & 0 deletions editors/Makefile
Expand Up @@ -187,6 +187,7 @@
SUBDIR += libreoffice6
SUBDIR += linux-sublime
SUBDIR += linux-sublime3
SUBDIR += linux-wps-office
SUBDIR += madedit
SUBDIR += marker
SUBDIR += mg
Expand Down
60 changes: 60 additions & 0 deletions editors/linux-wps-office/Makefile
@@ -0,0 +1,60 @@
PORTNAME= wps-office
DISTVERSION= 11.1.0.10161
CATEGORIES= editors linux
MASTER_SITES= https://wdl1.pcfg.cache.wpscdn.com/wpsdl/wpsoffice/download/linux/10161/
PKGNAMEPREFIX= linux-
DISTNAME= ${PORTNAME}-${PORTVERSION}.XA-1.x86_64
EXTRACT_SUFX= .rpm

MAINTAINER= freebsd@sysctl.cz
COMMENT= Complete office suite with PDF editor

LICENSE= commercial
LICENSE_NAME= End User License Agreement
LICENSE_TEXT= See: https://www.wps.com/eula
LICENSE_PERMS= no-auto-accept no-dist-mirror no-dist-sell no-pkg-mirror no-pkg-sell

ONLY_FOR_ARCHS= amd64

USES= desktop-file-utils linux shebangfix
INSTALLS_ICONS= yes
USE_LINUX= png pulseaudio-libs xorglibs

SHEBANG_FILES= usr/bin/et \
usr/bin/wpp \
usr/bin/wps \
usr/bin/wpspdf

NO_BUILD= yes
NO_WRKSUBDIR= yes
PLIST_SUB= LINUXBASE=${LINUXBASE}

WPS_BINS= et wpp wps wpspdf
WPS_DESK= et wpp wps pdf prometheus

post-patch:
.for d in ${WPS_DESK}
@${REINPLACE_CMD} -i '' -e 's|/usr/bin|${PREFIX}/bin|' ${WRKSRC}/opt/kingsoft/${PORTNAME}/desktops/${PORTNAME}-${d}.desktop
.endfor
.for b in ${WPS_BINS}
@${REINPLACE_CMD} -e 's|gInstallPath=/opt|gInstallPath=${LINUXBASE}/opt|' ${WRKSRC}/usr/bin/${b}
.endfor

do-install:
.for s in 16 20 24 32 40 48 60 64 72 80 96 128 256 512
${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps
${INSTALL_DATA} ${WRKSRC}/usr/share/icons/hicolor/${s}x${s}/mimetypes/*.png \
${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps/
.endfor
.for d in ${WPS_DESK}
${INSTALL_DATA} ${WRKSRC}/opt/kingsoft/${PORTNAME}/desktops/${PORTNAME}-${d}.desktop \
${STAGEDIR}${DESKTOPDIR}
.endfor
${MKDIR} ${STAGEDIR}${LINUXBASE}
(cd ${WRKSRC} && ${COPYTREE_SHARE} opt ${STAGEDIR}${LINUXBASE})
.for b in ${WPS_BINS}
${INSTALL_SCRIPT} ${WRKSRC}/usr/bin/${b} ${STAGEDIR}${PREFIX}/bin
${CHMOD} +x ${STAGEDIR}${LINUXBASE}/opt/kingsoft/wps-office/office6/${b}
.endfor

.include <bsd.port.mk>
3 changes: 3 additions & 0 deletions editors/linux-wps-office/distinfo
@@ -0,0 +1,3 @@
TIMESTAMP = 1610797552
SHA256 (wps-office-11.1.0.10161.XA-1.x86_64.rpm) = d8d16c3eea4bb902c12a79866072754ee460adba16fcc79a1f52eae011cf462d
SIZE (wps-office-11.1.0.10161.XA-1.x86_64.rpm) = 226208326
8 changes: 8 additions & 0 deletions editors/linux-wps-office/pkg-descr
@@ -0,0 +1,8 @@
WPS Office is a free productivity office suite. WPS Office contains
four major functional modules: WPS Word, WPS PDF, WPS Excel, and WPS
Presentation. It is accessible and compatible with doc, xls, ppt, and
other file formats. You can directly save and open Microsoft Word,
Excel, and PowerPoint files. You can also easily edit WPS files with
Microsoft Office 365.

WWW: https://www.wps.com/

0 comments on commit 3381abb

Please sign in to comment.