summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
Diffstat (limited to 'libre')
-rw-r--r--libre/icecat-l10n/PKGBUILD212
1 files changed, 143 insertions, 69 deletions
diff --git a/libre/icecat-l10n/PKGBUILD b/libre/icecat-l10n/PKGBUILD
index 56b642c7a..28cf71d31 100644
--- a/libre/icecat-l10n/PKGBUILD
+++ b/libre/icecat-l10n/PKGBUILD
@@ -1,85 +1,160 @@
-# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
-# Contributor: fauno <fauno@kiwwwi.com.ar>
-# Contributor: Figue <ffigue@gmail.com>
# Maintainer: Márcio Silva <coadde@parabola.nu>
# Maintainer: André Silva <emulatorman@parabola.nu>
-# Based on firefox-i18n package
-
-# When updating to a newer upstream release:
-# - Edit variables in in Makefile.
-# - (optionally) edit PKGBUILD.in
-# - Run 'make'. It will take care of everything else for you.
-
-_langpacks=(ach af an ar as ast be bg bn-BD bn-IN br bs ca cs csb cy da de el en-GB en-US en-ZA eo es-AR es-CL es-ES es-MX et eu fa ff fi fr fy-NL ga-IE gd gl gu-IN he hi-IN hr hsb hu hy-AM id is it ja ja-JP-mac kk km kn ko ku lij lt lv mai mk ml mr ms nb-NO nl nn-NO or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq sr sv-SE ta te th tr uk vi xh zh-CN zh-TW zu)
+# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
+# Contributor: fauno <fauno@kiwwwi.com.ar>
+# Contributor: Figue <ffigue@gmail.com>
-pkgbase=icecat-l10n
-pkgname=(
- $(for lang in ${_langpacks[@]}
- do echo icecat-l10n-$lang | tr A-Z a-z
- done)
-)
+_pkgbase=icecat
+pkgbase=$_pkgbase-l10n
pkgver=31.1.1
-pkgrel=1
-pkgdesc='Language packs for GNU IceCat.'
-arch=(
- any
-)
-license=(
- MPL GPL
-)
-url=http://www.gnu.org/software/gnuzilla/
-depends=(
- ${pkgbase%-l10n}=$pkgver
-)
-makedepends=(
- unzip
- zip
+pkgrel=2
+pkgdesc="Language pack for GNU IceCat."
+arch=('any')
+url="http://www.gnu.org/software/gnuzilla/"
+license=('MPL' 'GPL')
+depends=("$_pkgbase=$pkgver")
+makedepends=('unzip' 'zip')
+
+_languages=(
+ 'ach "Acholi"'
+ 'af "Afrikaans"'
+ 'an "Aragonese"'
+ 'ar "Arabic"'
+ 'as "Assamese"'
+ 'ast "Asturian"'
+ 'be "Belarusian"'
+ 'bg "Bulgarian"'
+ 'bn-BD "Bengali (Bangladesh)"'
+ 'bn-IN "Bengali (India)"'
+ 'br "Breton"'
+ 'bs "Bosnian"'
+ 'ca "Catalan"'
+ 'cs "Czech"'
+ 'csb "Kashubian"'
+ 'cy "Welsh"'
+ 'da "Danish"'
+ 'de "German"'
+ 'el "Greek"'
+ 'en-GB "English (British)"'
+ 'en-US "English (US)"'
+ 'en-ZA "English (South African)"'
+ 'eo "Esperanto"'
+ 'es-AR "Spanish (Argentina)"'
+ 'es-CL "Spanish (Chile)"'
+ 'es-ES "Spanish (Spain)"'
+ 'es-MX "Spanish (Mexico)"'
+ 'et "Estonian"'
+ 'eu "Basque"'
+ 'fa "Persian"'
+ 'ff "Fulah"'
+ 'fi "Finnish"'
+ 'fr "French"'
+ 'fy-NL "Frisian"'
+ 'ga-IE "Irish"'
+ 'gd "Gaelic (Scotland)"'
+ 'gl "Galician"'
+ 'gu-IN "Gujarati (India)"'
+ 'he "Hebrew"'
+ 'hi-IN "Hindi (India)"'
+ 'hr "Croatian"'
+ 'hsb "Upper Sorbian"'
+ 'hu "Hungarian"'
+ 'hy-AM "Armenian"'
+ 'id "Indonesian"'
+ 'is "Icelandic"'
+ 'it "Italian"'
+ 'ja "Japanese"'
+ 'kk "Kazakh"'
+ 'km "Khmer"'
+ 'kn "Kannada"'
+ 'ko "Korean"'
+ 'ku "Kurdish"'
+ 'lij "Ligurian"'
+ 'lt "Lithuanian"'
+ 'lv "Latvian"'
+ 'mai "Maithili"'
+ 'mk "Macedonian"'
+ 'ml "Malayalam"'
+ 'mr "Marathi"'
+ 'ms "Malay"'
+ 'nb-NO "Norwegian (Bokmål)"'
+ 'nl "Dutch"'
+ 'nn-NO "Norwegian (Nynorsk)"'
+ 'or "Oriya"'
+ 'pa-IN "Punjabi (India)"'
+ 'pl "Polish"'
+ 'pt-BR "Portuguese (Brazilian)"'
+ 'pt-PT "Portuguese (Portugal)"'
+ 'rm "Romansh"'
+ 'ro "Romanian"'
+ 'ru "Russian"'
+ 'si "Sinhala"'
+ 'sk "Slovak"'
+ 'sl "Slovenian"'
+ 'son "Songhai"'
+ 'sq "Albanian"'
+ 'sr "Serbian"'
+ 'sv-SE "Swedish"'
+ 'ta "Tamil"'
+ 'te "Telugu"'
+ 'th "Thai"'
+ 'tr "Turkish"'
+ 'uk "Ukrainian"'
+ 'vi "Vietnamese"'
+ 'xh "Xhosa"'
+ 'zh-CN "Chinese (Simplified)"'
+ 'zh-TW "Chinese (Traditional)"'
+ 'zu "Zulu"'
)
-source=('region.properties')
- for lang in ${_langpacks[@]}
- do
- source+=(http://gnuzilla.gnu.org/releases/$pkgver/langpacks/icecat-$pkgver.$lang.langpack.xpi)
- done
-# for lang in ${_langpacks[@]}
-# do
-# source+=(http://mirror.lnx.im/icecat/langpacks/$pkgver/$lang.xpi)
-# done
+pkgname=()
+source=('region.properties')
+_url=http://gnuzilla.gnu.org/releases/$pkgver/langpacks
-noextract=(
- $(for lang in ${_langpacks[@]}
- do echo icecat-$pkgver.$lang.langpack.xpi
- done)
-)
+for _lang in "${_languages[@]}"; do
+ _locale=${_lang%% *}
+ _pkgname=$pkgbase-${_locale,,}
+ pkgname+=($_pkgname)
+ source+=("$_url/$_pkgbase-$pkgver.$_locale.langpack.xpi")
+ eval "package_$_pkgname() {
+ _package $_lang
+ }"
+done
-_path=usr/lib/${pkgbase%-l10n}/browser/extensions
+# Don't extract anything
+noextract=(${source[@]%%::*})
-prepare() {
- cd $srcdir
+_package() {
+ pkgdesc="$2 language pack for GNU IceCat."
+ replaces=(icecat-i18n-${1,,})
+ conflicts=(icecat-i18n-${1,,})
+ provides=(firefox-i18n-${1,,})
- for lang in ${_langpacks[@]}
- do
- cd $srcdir
- unzip -q icecat-$pkgver.$lang.langpack.xpi -d $lang
- install -Dm644 $srcdir/region.properties $lang/browser/chrome/$lang/locale/browser-region
- cd $lang
- zip -q -r $srcdir/langpack-$lang@icecat.mozilla.org.xpi .
- done
+ unzip icecat-$pkgver.$1.langpack.xpi -d $1
+ rm -v icecat-$pkgver.$1.langpack.xpi
+ install -vDm644 $srcdir/region.properties $1/browser/chrome/$1/locale/browser-region
+ rm -rv $1/{browser/{chrome/.mkdir.done,searchplugins},chrome/{.mkdir.done,$1/locale/$1/global-platform/{mac,win}}}
+ cd $1
+ zip -r langpack-$1@icecat.mozilla.org.xpi .
+ mv -v langpack-$1@icecat.mozilla.org.xpi $srcdir
+ cd ..
+ rm -rv $1
- cd $srcdir
-}
+ install -vDm644 langpack-$1@icecat.mozilla.org.xpi \
+ "$pkgdir/usr/lib/icecat/browser/extensions/langpack-$1@icecat.mozilla.org.xpi"
-for lang in ${_langpacks[@]}; do
- eval "
- package_icecat-l10n-$(echo $lang | tr A-Z a-z) () {
- replaces=(icecat-i18n-$(echo $lang | tr A-Z a-z))
- conflicts=(icecat-i18n-$(echo $lang | tr A-Z a-z))
- provides=(icecat-i18n-$(echo $lang | tr A-Z a-z))
- install -Dm644 \"\$srcdir/langpack-$lang@icecat.mozilla.org.xpi\" \"\$pkgdir/$_path/langpack-$lang@icecat.mozilla.org.xpi\"
+ # Fix a few broken langpacks
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=832060
+ if in_array $1 bg csb; then
+ pushd "$pkgdir/usr/lib/icecat/browser/extensions" >/dev/null
+ unzip langpack-$1@icecat.mozilla.org.xpi install.rdf >/dev/null
+ sed -i '/./,$!d' install.rdf
+ zip -u langpack-$1@icecat.mozilla.org.xpi install.rdf >/dev/null
+ rm -v install.rdf
+ popd >/dev/null
+ fi
}
-"
-done
sha512sums=('d772c5b73adaf7dfc7d7304ee94d8e68ff8643fdcabe51fde2a62a2091a81e950728ebb004fd23e715f2f55020b6bfe4008434b4b16f1869e1384de68c69c6e6'
'b03e95691842d4eb28b4e2c5321eb1bf2d7c73eb3e6c9d68cc924a3b2a855563d1562aec9ad64b2dafc22b0f07009916b4e5e34f2286daebd931fb4eff97ec02'
@@ -130,7 +205,6 @@ sha512sums=('d772c5b73adaf7dfc7d7304ee94d8e68ff8643fdcabe51fde2a62a2091a81e95072
'a31435503dda752cf9322652d4739862676d626ec41b413a4ed927ed951dd217383c529b485b6bbaf9c25673d20a17e5c000bba59e76eecd2078354606c82120'
'cde8b0611a69077b12a3fec418124d59bb3bd8e1cb7e1808dee7f1514fed52921b2750622da13ed76f59d6c2c2896b0a6363207c3a960ec0e05ce090bf6452a5'
'6d70d4087448416e9852325120f18d3e6f054ad62ea41ebad5dbc0083573072875b2b0ae3a2049cfad2ba92dcb10739fdf72d524fd6921e87467b4447f69735b'
- '5ddb03cc113c9936cec193f63e40c550ed655335b3c137d46939db443171a7bf7a0bfe3ec8efaedd1c50b341f111764adc0ad57441365b15866ec3bed024aa17'
'aece09e31ddd9c00bba9f7aede845fb8bb65fa933bfa5b3a0bd67ec68ebc0d5960a32c300ff6e02c04d91f846bf8a39933833647f08e555fd5946b9d3a8e0970'
'bd771b39edc2dc01bd30c66cfac5e3d9252896df629ac64fa06ecb802a422ca5e71a930af846d59ec73b0ebaabaed96914a57d361b965e90d0517b4e4534af58'
'04f955c8ce49e3b29ceaebd368f2d49f22f30cd4f863e60bf751187d796fa6b3d263b3063f9400351e7f99207756cefa5a17c11c8e96a833bf99644d46e49ba3'