# New ports collection makefile for: sunbird-i18n # Date created: 23 February 2007 # Whom: Andrew Pantyukhin # # $FreeBSD$ # PORTNAME= sunbird-i18n PORTVERSION= 0.9 CATEGORIES= deskutils MASTER_SITES= MOZILLA_EXTENDED/calendar/sunbird/releases/${DISTVERSION}/langpacks PKGNAMEPREFIX= DISTFILES= ${SUNBIRD_I18N_:S|$|.xpi|} DIST_SUBDIR= xpi/${DISTNAME} MAINTAINER= gecko@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 is it ja ka \ ko lt nb-NO nl pl pt-BR pt-PT ro ru sk sl sv-SE 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 '' '/