aboutsummaryrefslogtreecommitdiff
path: root/editors/libreoffice/Makefile.common
blob: b1d524ef8d77a2687735a47caa70183f54e0947c (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# $FreeBSD$

PORTNAME=	libreoffice
PORTVERSION=	4.0.4
RCVER=		2
#PRERELEASE=	yes
LOVERSION=	${PORTVERSION}.${RCVER}
CATEGORIES?=	editors
MAINTAINER?=	office@FreeBSD.org

LICENSE=	LGPL3 MPL
LICENSE_COMB=	dual

MASTER_SITES?=	http://ftp.rediris.es/mirror/TDF/libreoffice/${MASTER_SITE_SUBDIR} \
		http://mirrors.supportex.net/tdf/libreoffice/${MASTER_SITE_SUBDIR} \
		http://mirror.netcologne.de/tdf/libreoffice/${MASTER_SITE_SUBDIR} \
		http://mirror.informatik.uni-mannheim.de/pub/mirrors/tdf/libreoffice/${MASTER_SITE_SUBDIR} \
		http://ftp.uni-muenster.de/pub/software/DocumentFoundation/libreoffice/${MASTER_SITE_SUBDIR} \
		http://ftp.rz.tu-bs.de/pub/mirror/tdf/tdf-pub/libreoffice/${MASTER_SITE_SUBDIR} \
		http://artfiles.org/documentfoundation.org/libreoffice/${MASTER_SITE_SUBDIR} \
		http://mirror.galpon.org/tdf/libreoffice/${MASTER_SITE_SUBDIR} \
		http://ftp.tu-chemnitz.de/pub/tdf/libreoffice/${MASTER_SITE_SUBDIR} \
		http://tdf.panu.it/libreoffice/${MASTER_SITE_SUBDIR} \
		http://ftp.wh2.tu-dresden.de/pub/mirrors/tdf/libreoffice/${MASTER_SITE_SUBDIR} \
		http://ftp.klid.dk/ftp/tdf/libreoffice/${MASTER_SITE_SUBDIR} \
		http://gd.tuwien.ac.at/tdf/libreoffice/${MASTER_SITE_SUBDIR} \
		http://archive.sunet.se/pub/Office/tdf/libreoffice/${MASTER_SITE_SUBDIR} \
		http://ftp.astral.ro/mirrors/tdf/libreoffice/${MASTER_SITE_SUBDIR} \
		http://ftp.roedu.net/mirrors/tdf/libreoffice/${MASTER_SITE_SUBDIR} \
		http://ftp.unicamp.br/pub/tdf/libreoffice/${MASTER_SITE_SUBDIR} \
		http://mirror.yongbok.net/tdf/libreoffice/${MASTER_SITE_SUBDIR} \
		http://mirror3.mirrors.tds.net/pub/documentfoundation.org/libreoffice/${MASTER_SITE_SUBDIR} \
		http://ftp.osuosl.org/pub/tdf/libreoffice/${MASTER_SITE_SUBDIR}

ONLY_FOR_ARCH=	i386 amd64

# for dynamic plist generation
PLISTD?=	${WRKDIR}/plist_dirs
PLISTF?=	${WRKDIR}/plist_files

.if defined(LO_I18N)
NO_BUILD=	yes

RUN_DEPENDS=	libreoffice:${PORTSDIR}/editors/libreoffice

.if defined(PRERELEASE)
MASTER_SITE_SUBDIR=	testing/${PORTVERSION}/deb/x86/
LO_I18N_FILE=	LibreOffice_${LOVERSION}_Linux_x86_deb
.else
MASTER_SITE_SUBDIR=	stable/${PORTVERSION}/deb/x86/
LO_I18N_FILE=	LibreOffice_${PORTVERSION}_Linux_x86_deb
.endif

DIST_SUBDIR?=	libreoffice/i18n

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
COMMENT?=	${LO_I18N} language pack for ${PORTNAME}

EXTRACT_AFTER_ARGS=	--strip-components 1

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

do-install:
	@rm -f ${PLISTD} ${PLISTF}
	cd ${WRKSRC}/opt/${PORTNAME}${PORTVERSION:R} ; ${FIND} * -type d -exec ${ECHO_CMD} "@unexec ${RMDIR} %D/lib/${PORTNAME}/{} || ${TRUE}" \; >> ${PLISTD}
	cd ${WRKSRC}/opt/${PORTNAME}${PORTVERSION:R} ; ${FIND} * \( -type f -o -type l \) -exec ${ECHO_CMD} "lib/${PORTNAME}/{} " \; >> ${PLISTF}

	${SORT} ${PLISTF} >> ${TMPPLIST}
	${SORT} -r ${PLISTD} >> ${TMPPLIST}

	${MKDIR} ${PREFIX}/lib/${PORTNAME}
	cd ${WRKSRC}/opt/${PORTNAME}${PORTVERSION:R} ; ${PAX} -rw . ${PREFIX}/lib/${PORTNAME}

.endif