freebsd-ports/deskutils/sunbird-i18n/Makefile
Andrew Pantyukhin f429dbf0c6 Add port deskutils/sunbird-i18n:
Language packs for Sunbird

WWW: http://www.mozilla.org/projects/l10n/
2007-07-03 08:36:47 +00:00

72 lines
2.2 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.5
CATEGORIES= www
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>=0:${PORTSDIR}/www/xpi-quick-locale-switcher
.endif
NO_BUILD= yes
USE_XPI= *sunbird
SUNBIRD_I18N_ALL= ca cs da de es-ES eu fr ga-IE hu it mk mn nb-NO nl pa-IN pl \
pt-BR ru sk sl sv-SE
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'
.include "${.CURDIR}/../../www/xpi-adblock/Makefile.xpi"
.include <bsd.port.mk>