freebsd-ports/deskutils/sunbird-i18n/Makefile
Andrew Pantyukhin 3a43791e69 - Update to 0.8
2008-04-08 06:53:49 +00:00

77 lines
2.4 KiB
Makefile

# New ports collection makefile for: sunbird-i18n
# Date created: 23 February 2007
# Whom: Andrew Pantyukhin <infofarmer@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= sunbird-i18n
PORTVERSION= 0.8
CATEGORIES= deskutils
MASTER_SITES= MOZILLA_EXTENDED/calendar/sunbird/releases/${DISTVERSION}/langpacks
PKGNAMEPREFIX=
DISTFILES= ${SUNBIRD_I18N_:S|$|.xpi|}
DIST_SUBDIR= xpi/${DISTNAME}
MAINTAINER= infofarmer@FreeBSD.org
COMMENT= Localized interface for Sunbird
.ifndef WITHOUT_SWITCHER
RUN_DEPENDS+= xpi-quick-locale-switcher>=1.6.5.1:${PORTSDIR}/www/xpi-quick-locale-switcher
.endif
NO_BUILD= yes
USE_XPI= *sunbird
SUNBIRD_I18N_ALL= ca cs da de es-AR es-ES eu fr ga-IE hu it ja ka ko \
lt mk nb-NO nl pl pt-BR pt-PT ru sk sl sv-SE tr uk \
zh-CN
SUNBIRD_I18N?= all
.if ${SUNBIRD_I18N} == all
SUNBIRD_I18N_= ${SUNBIRD_I18N_ALL}
.endif
SUNBIRD_I18N_?= ${SUNBIRD_I18N}
WDIR= langpack-*@sunbird.mozilla.org
XPI_DISTNAMES= ${SUNBIRD_I18N_}
.for dist in ${XPI_DISTNAMES}
XPI_ID_${dist}= langpack-${dist}@sunbird.mozilla.org
XPI_FILES_${dist}= chrome.manifest install.rdf chrome/${dist}.jar chrome/calendar-${dist}.jar \
chrome/chromelist.txt
XPI_DIRS_${dist}= chrome
.endfor
do-extract:
@${RM} -rf ${WRKDIR}
@${MKDIR} ${WRKDIR} ${WRKSRC}
@for lang in ${SUNBIRD_I18N_}; do \
if ! (${EXTRACT_CMD} ${_DISTDIR}/$$lang.xpi -d ${WRKSRC}/langpack-$$lang@sunbird.mozilla.org);\
then \
exit 1; \
fi \
done
do-install:
@${INSTALL} -d ${XPI_LIBDIR} ${XPI_SLDIRS_ALL}
@${CP} -R ${WRKSRC}/ ${XPI_LIBDIR}/
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${XPI_LIBDIR}/${WDIR}/
@${CHMOD} -R a+rX,go-w ${XPI_LIBDIR}/${WDIR}/
@for _dir in ${XPI_LINKFARMS} ; { ${LN} -sf ${XPI_LIBDIR}/${WDIR} $$_dir/ ${_Q} ; }
@${ECHO_CMD} '@exec ${INSTALL} -d ${XPI_SLDIRS_ALL:S,^${PREFIX},%D,}' ${_A}
@${ECHO_CMD} '@exec for _dir in ${XPI_LINKFARMS} ; { \
${LN} -sf ${XPI_LIBDIR}/${WDIR} $$_dir/ ${_Q}; }' ${_A}
@${ECHO_CMD} '@unexec for _dir in ${XPI_LINKFARMS} ; { ${RM} -f $$_dir/${WDIR} ; }' ${_A}
@${ECHO_CMD} '@unexec rmdir ${XPI_DIRS_TRY:S,^,%D/,} ${_Q}' ${_A}
post-patch:
${FIND} ${WRKSRC} -name install.rdf -print0 | \
${XARGS} -0L1 ${REINPLACE_CMD} -i '' '/<?xml/,$$!d'
list-langs:
@fetch -o- "http://releases.mozilla.org/pub/mozilla.org/calendar/sunbird/releases/${PORTVERSION}/langpacks"|\
perl -ne 'if(/.*href="([a-zA-Z-]+).xpi.*/){print "$$1 "}'
.include "${.CURDIR}/../../www/xpi-adblock/Makefile.xpi"
.include <bsd.port.mk>