summaryrefslogtreecommitdiff
path: root/editors/libreoffice/Makefile.i18n
blob: e58effc07d23d2d367be25795b458846971538ed (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
# $FreeBSD$

.include "${.CURDIR}/../../editors/libreoffice/Makefile.common"

MASTER_SITES=	https://download.documentfoundation.org/libreoffice/${MASTER_SITE_SUBDIR}/
.if defined(PRERELEASE)
MASTER_SITES+=	https://dev-builds.libreoffice.org/pre-releases/deb/x86_64/
MASTER_SITE_SUBDIR=	testing/${LOVERSION}/deb/x86_64
.	if defined(DEVRELEASE)
LO_NAME=	LibreOfficeDev
.	else
LO_NAME=	LibreOffice
.	endif
LO_I18N_FILE=	${LO_NAME}_${DISTVERSION}_Linux_x86-64_deb
.else
MASTER_SITE_SUBDIR=	stable/${LOVERSION}/deb/x86_64
LO_NAME=	LibreOffice
LO_I18N_FILE=	${LO_NAME}_${LOVERSION}_Linux_x86-64_deb
.endif
PKGNAMEPREFIX=	${LO_I18N}-
DISTFILES=	${LO_I18N_FILE}_langpack_${LO_I18N:S/_/-/}${EXTRACT_SUFX}
.if defined(LO_HAS_HELPPACK)
DISTFILES+=	${LO_I18N_FILE}_helppack_${LO_I18N:S/_/-/}${EXTRACT_SUFX}
.endif
DIST_SUBDIR=	libreoffice/i18n

COMMENT?=	${LO_I18N} language pack for ${PORTNAME}

DESCR?=	${.CURDIR}/../../editors/libreoffice/pkg-descr.i18n

RUN_DEPENDS?=	libreoffice:editors/libreoffice

NO_ARCH=	yes
NO_BUILD=	yes

EXTRACT_AFTER_ARGS=	--exclude '${PORTNAME}*-dict-*.deb' \
			--strip-components 1

post-extract:
	@${MKDIR} ${WRKSRC}
	for deb in ${WRKDIR}/DEBS/*.deb ; do \
		${TAR} xfO $${deb} data.tar.xz | ${TAR} -C ${WRKSRC} -xf - ; \
	done

do-install:
	@${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}
	cd ${WRKSRC}/opt/${LO_NAME:tl}${LOVERSION:R} ; \
	    ${PAX} -rw . ${STAGEDIR}${PREFIX}/lib/${PORTNAME}

post-install:
	@cd ${WRKSRC}/opt/${LO_NAME:tl}${LOVERSION:R} && \
		${FIND} -s * -not -type d \
			-exec ${ECHO_CMD} "lib/${PORTNAME}/{}" \; >> ${TMPPLIST} && \
		${FIND} -d * -type d -empty \
			-exec ${ECHO_CMD} "@dir lib/${PORTNAME}/{}" \; >> ${TMPPLIST}