wok-next annotate thunderbird-langpack/receipt @ rev 21057

Deal with HOST_ARCH="any"
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Dec 03 14:47:30 2018 +0200 (2018-12-03)
parents fc8399b41cda
children
rev   line source
al@20989 1 # SliTaz package receipt v2.
al@20989 2
al@20989 3 PACKAGE="thunderbird-langpack"
al@20989 4 VERSION="17.0.11esr"
al@20989 5 CATEGORY="meta"
al@20989 6 SHORT_DESC="Thunderbird language pack"
al@20989 7 MAINTAINER="al.bobylev@gmail.com"
al@20989 8 LICENSE="MPL2"
al@20989 9 WEB_SITE="https://www.thunderbird.net/en-GB/"
al@20989 10 HOST_ARCH="any"
al@20989 11 REPOLOGY="-"
al@20989 12
al@21020 13 SPLIT="\
al@21020 14 $PACKAGE-cs $PACKAGE-da $PACKAGE-de $PACKAGE-el $PACKAGE-en_GB \
al@21020 15 $PACKAGE-en_US $PACKAGE-es_AR $PACKAGE-es_ES $PACKAGE-fr $PACKAGE-hu \
al@21020 16 $PACKAGE-id $PACKAGE-it $PACKAGE-pl $PACKAGE-pt_BR $PACKAGE-pt_PT \
al@21020 17 $PACKAGE-ru $PACKAGE-sl $PACKAGE-sv_SE $PACKAGE-zh_CN $PACKAGE-zh_TW"
al@20989 18 COOKOPTS="!strip" # waste of time to search, nothing to strip
al@20989 19
al@20989 20 compile_rules() {
al@20989 21 for i in $SPLIT; do
al@20989 22 lang=${i##*-}
al@20989 23 Lang=${lang/_/-}
al@20989 24 TARBALL="$PACKAGE-$lang-$VERSION.zip"
al@20989 25 WGET_URL="http://ftp.mozilla.org/pub/thunderbird/releases/$VERSION/linux-i686/xpi/$Lang.xpi"
al@20989 26 [ -e "$SRC/$TARBALL" ] || wget -O $SRC/$TARBALL $WGET_URL
al@20989 27
al@20989 28 extdir="$install/usr/lib/thunderbird-$VERSION/extensions/langpack-$Lang@thunderbird.mozilla.org"
al@20989 29 mkdir -p $extdir
al@20989 30 unzip -q $SRC/$TARBALL -d $extdir
al@20989 31
al@20989 32 find $install -type f -name '.mkdir.done' -delete
al@20989 33 for i in mac win; do
al@20989 34 rm -r $extdir/chrome/$Lang/locale/$Lang/global-platform/$i
al@20989 35 done
al@20989 36 done
al@20989 37 }
al@20989 38
al@20989 39 genpkg_rules() {
al@20989 40 [ "$PACKAGE" == 'thunderbird-langpack' ] && return
al@20989 41 lang="${PACKAGE##*-}"
al@20989 42 copy langpack-${lang/_/-}@thunderbird.mozilla.org/
al@20989 43 case $lang in
al@20989 44 cs) desc="Czech";;
al@20989 45 da) desc="Danish";;
al@20989 46 de) desc="German";;
al@20989 47 el) desc="Greek";;
al@20989 48 en_GB) desc="British English";;
al@20989 49 en_US) desc="American English";;
al@20989 50 es_AR) desc="Argentinian Spanish";;
al@20989 51 es_ES) desc="Spanish";;
al@20989 52 fr) desc="French";;
al@20989 53 hu) desc="Hungarian";;
al@20989 54 id) desc="Indonesian";;
al@20989 55 it) desc="Italian";;
al@20989 56 pl) desc="Polish";;
al@20989 57 pt_BR) desc="Brazilian Portuguese";;
al@20989 58 pt_PT) desc="Portuguese";;
al@20989 59 ru) desc="Russian";;
al@20989 60 sl) desc="Slovenian";;
al@20989 61 sv_SE) desc="Swedish";;
al@20989 62 zh_CN) desc="Simplified Chinese";;
al@20989 63 zh_TW) desc="Chinese Traditional";;
al@20989 64 esac
al@20989 65 CAT="localization|$desc"
al@20989 66 DEPENDS="thunderbird"
al@20989 67 }