aboutsummaryrefslogtreecommitdiff
path: root/chinese/linux-wps-office-zh_CN/Makefile
blob: 072a66018786a4f619b15a1b08bc235dc2b3d2e0 (plain) (blame)
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
PORTNAME=	wps-office
DISTVERSION=	11.1.0.10161
DISTVERSIONSUFFIX=	-zh_CN
CATEGORIES=	chinese editors linux
MASTER_SITES=	https://wdl1.cache.wps.cn/wps/download/ep/Linux2019/10161/
PKGNAMEPREFIX=	linux-
PKGNAMESUFFIX=	-zh_CN
DISTNAME=	${PORTNAME}-${PORTVERSION}-1.x86_64
EXTRACT_SUFX=   .rpm

MAINTAINER=	ygy@FreeBSD.org
COMMENT=	Complete office suite with PDF editor

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

ONLY_FOR_ARCHS= amd64

CONFLICTS_INSTALL=	linux-wps-office

USES=		desktop-file-utils gnome 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>