2012-11-21 00:01:15 +01:00
# Created by: Andrew Pantyukhin <infofarmer@FreeBSD.org>
2011-08-02 01:43:20 +02:00
# $FreeBSD$
PORTNAME = seamonkey-i18n
2013-04-03 22:27:48 +02:00
PORTVERSION = 2.17
2011-08-02 01:43:20 +02:00
CATEGORIES = www
MASTER_SITE_SUBDIR = seamonkey/releases/${ PORTVERSION } /langpack
PKGNAMEPREFIX =
DISTFILES = ${ SEAMONKEY_I18N_ : S / $/.langpack.xpi/ : S /^/seamonkey- ${ PORTVERSION } ./ }
DIST_SUBDIR = xpi/${ DISTNAME }
MAINTAINER = gecko@FreeBSD.org
2012-02-02 11:10:48 +01:00
COMMENT = Localized interface for SeaMonkey
2011-08-02 01:43:20 +02:00
2011-08-10 23:32:08 +02:00
EXTRACT_DEPENDS = zip:${ PORTSDIR } /archivers/zip
2011-08-02 01:43:20 +02:00
2012-03-22 08:30:27 +01:00
PLIST ?= ${ WRKDIR } /plist
PLISTD ?= ${ WRKDIR } /plist_dirs
PLISTF ?= ${ WRKDIR } /plist_files
2013-04-03 22:27:48 +02:00
USE_SEAMONKEY = 17
2011-09-30 15:33:08 +02:00
USE_XPI = seamonkey linux-seamonkey
2011-08-02 01:43:20 +02:00
USE_SUBMAKE = yes
WDIR = langpack-*@seamonkey.mozilla.org
XPI_DISTNAMES = ${ SEAMONKEY_I18N_ }
. i f n d e f W I T H O U T _ S W I T C H E R
RUN_DEPENDS += xpi-quick-locale-switcher>= 0:${ PORTSDIR } /www/xpi-quick-locale-switcher
. e n d i f
. i n c l u d e "${.CURDIR}/Makefile.option"
. i n c l u d e < b s d . p o r t . o p t i o n s . m k >
. i n c l u d e "${.CURDIR}/Makefile.lang"
SEAMONKEY_I18N_ ?= ${ SEAMONKEY_I18N }
. f o r d i s t i n $ { X P I _ D I S T N A M E S }
XPI_ID_${dist} = langpack-${ dist } @seamonkey.mozilla.org
. e n d f o r
pre-everything ::
@${ ECHO_CMD }
@${ ECHO_CMD } "Please define SEAMONKEY_I18N_ALL to install all languages."
@${ ECHO_CMD }
do-extract :
2012-02-02 11:10:48 +01:00
@${ MKDIR } ${ WRKSRC }
2011-08-02 01:43:20 +02:00
@for lang in ${ SEAMONKEY_I18N_ } ; do \
2013-04-03 22:27:48 +02:00
if ! ( ${ EXTRACT_CMD } ${ EXTRACT_BEFORE_ARGS } ${ _DISTDIR } /seamonkey-${ PORTVERSION } .$$ lang.langpack.xpi -d ${ WRKSRC } /langpack-$$ lang@seamonkey.mozilla.org) ; \
2011-08-02 01:43:20 +02:00
then \
exit 1; \
fi ; \
2012-03-22 08:30:27 +01:00
cd ${ WRKSRC } /langpack-$$ lang@seamonkey.mozilla.org/; \
${ FIND } -H -s * ! -type d | \
${ SED } -e " s|^|lib/xpi/langpack- $$ lang@seamonkey.mozilla.org/| " >> ${ PLISTF } && \
${ FIND } -d * -type d | \
${ SED } -e " s|^|@dirrm lib/xpi/langpack- $$ lang@seamonkey.mozilla.org/| " >> ${ PLISTD } ; \
2011-08-02 01:43:20 +02:00
done
2012-03-22 08:30:27 +01:00
${ CAT } ${ PLISTF } | ${ SORT } >> ${ PLIST }
${ CAT } ${ PLISTD } | ${ SORT } -r >> ${ PLIST }
2011-08-02 01:43:20 +02:00
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} ${XPI_LIBDIR}; { ${RM} -fR $$_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 '' -e '/<?xml/,$$!d'
List-Langs :
@fetch -o- " http://releases.mozilla.org/pub/mozilla.org/seamonkey/releases/ ${ PORTVERSION } /langpack " | \
${ PERL } -ne 'if(/.*href="seamonkey-${PORTVERSION}.([a-zA-Z-]+).langpack.xpi"/){print "$$1\n"}' | \
${ AWK } 'BEGIN{ORS=" "}{print $1}END{printf "\nNumber of languages: %d\n",NR}'
. i n c l u d e "${.CURDIR}/../xpi-adblock/Makefile.xpi"
. i n c l u d e < b s d . p o r t . m k >