summaryrefslogtreecommitdiff
path: root/libre/iceweasel-l10n/PKGBUILD
blob: 1eb6bb91d9c4ff6efc95977e126727db0f79450c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# Maintainer: André Silva <emulatorman@parabola.nu>
# Contributor: Márcio Silva <coadde@parabola.nu>
# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
# Contributor: fauno <fauno@kiwwwi.com.ar>
# Contributor: Figue <ffigue@gmail.com>
# Based on icecat-i18n package, which is in turn based on firefox-i18n

_debname=iceweasel
_debver=27.0
_debrel=deb2
_debrepo=http://ftp.debian.org/debian/pool/main/
debfile() { echo $@|sed -r 's@(.).*@\1/&/&@'; }

_langpacks=(ach af an ar as ast be bg bn-BD br bs ca cs csb cy da de el en-GB 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 hu hy-AM id is it ja kk km kn ko lij lt lv mai mk ml mr nb-NO nl nn-NO or pa-IN pl pt-BR pt-PT rm ro ru si sk sl sq sr sv-SE ta te th tr uk vi xh zh-CN zh-TW)

pkgbase=iceweasel-l10n
pkgname=(
  $(for lang in ${_langpacks[@]}; do
    echo $pkgbase-$lang | tr A-Z a-z
  done)
)
epoch=1
pkgver=$_debver.$_debrel
pkgrel=1

pkgdesc="Language packs for Debian Iceweasel."
arch=('any')
url="http://packages.debian.org/experimental/iceweasel"
license=('MPL' 'GPL')
depends=("iceweasel-libre>=$epoch:$pkgver")
makedepends=('unzip' 'zip')
source=('region.properties')
for lang in ${_langpacks[@]}; do
  source+=("${_debrepo}/`debfile ${_debname}`-l10n-$(echo $lang | tr A-Z a-z)_${_debver}-${_debrel#deb}_all.deb")
done

_path=usr/lib/iceweasel/browser/extensions

prepare() {
  cd $srcdir
  for f in *.deb; do
    bsdtar xf $f
    bsdtar xf data.tar.xz
  done

  mv $_path/* .
  rm -r {control.tar.gz,data.tar.xz,debian-binary,etc,usr}
  rm -r *.deb

  for lang in ${_langpacks[@]}; do
    unzip -q langpack-$lang@iceweasel.mozilla.org.xpi -d $lang
    rm langpack-$lang@iceweasel.mozilla.org.xpi
    install -Dm644 $srcdir/region.properties $lang/browser/chrome/$lang/locale/browser-region
    cd $lang
    zip -q -r langpack-$lang@iceweasel.mozilla.org.xpi .
    mv langpack-$lang@iceweasel.mozilla.org.xpi $srcdir
    cd ..
    rm -r $lang
  done
}

for lang in ${_langpacks[@]}; do
  eval "
    package_iceweasel-l10n-$(echo $lang | tr A-Z a-z)() {
      replaces=(firefox-i18n-$(echo $lang | tr A-Z a-z) iceweasel-i18n-$(echo $lang | tr A-Z a-z) iceweasel-libre-l10n-$(echo $lang | tr A-Z a-z))
      conflicts=(firefox-i18n-$(echo $lang | tr A-Z a-z) iceweasel-i18n-$(echo $lang | tr A-Z a-z) iceweasel-libre-l10n-$(echo $lang | tr A-Z a-z))
      provides=(firefox-i18n-$(echo $lang | tr A-Z a-z) iceweasel-i18n-$(echo $lang | tr A-Z a-z) iceweasel-libre-l10n-$(echo $lang | tr A-Z a-z))
      install -Dm644 \"\$srcdir/langpack-$lang@iceweasel.mozilla.org.xpi\" \"\$pkgdir/$_path/langpack-$lang@iceweasel.mozilla.org.xpi\"
    }
  "
done

md5sums=('a4593936bf1c7a9ec9368ff249f9cc56'
         'de575fedef8fd6b811334d8b9c082479'
         '36043f6b423fd8c0a378c2e5fcb3a3c1'
         '306ef53afb18ffa3ec57feb0063ab433'
         '9af26b5177f1b20cb682299345ad1a87'
         '21d7586f0dcc740835c9d3a6e9cee397'
         '94c11e19db72eea7a5630bbf6c4a992d'
         '86f1a539a8f9af7ea81a63f11a882b70'
         'c62fdd3ce834337d43c4e59af3b87553'
         '0678ff6935296e17e36c40b3fc17ac96'
         '680ff4dbae9ce0b9f1bcd092169e6a34'
         'dc8e478e69b1ee22126cb6addc744fe5'
         'a513f4af7f608347225cd4180e89dee6'
         '17d1e0cd0c7023461fc5dde7b97ee4b1'
         'c08f2cd5a29737b20ecc2f7c2892bd74'
         '8ff5f9ea03c3fff51142df8c52626b22'
         'f8a42eb22e2192793a85112adb8e2278'
         'f1b221697547feff3e69889a9e9dd1b4'
         '1c106f032476d2443b368e52d9e1bc69'
         'dbf5e2a01c84e18dc19ed9be5e12920b'
         '9d6e6b497af88a0b5c44845adf275f9d'
         'aeb7f058aabd5d7d4e05f8e7917bd59b'
         '4612bf235fdfd328e176b3e682e61072'
         'ebf5aefb15834234fbac6a4310b8f8ab'
         '7591125ee445836f9e1247f5a7f6a474'
         '410d090d68240f1f304ff94c4847817e'
         '96a9dbd806a336936a4642ae95d12a26'
         '4924dd568df7dc0428f3458758eadca1'
         '62d46770f79074fc90ce4c1e4f5e5169'
         'c57d361eaa5d0fb90e872dd8f1d3fce1'
         'dbbba15f93f960c19bab63599b8f771c'
         '0025e4609f5d1f72bf784f35d42934a9'
         '638306adb405c506baa2728a00237d50'
         '7ae2cbe9e2888b95a513eb8238e6e5d2'
         '8b560d4ae6f62bb64d8fa8c1a62abe27'
         '52bd4641b6066a2a0596c7b4f64b25c1'
         '9293f6d596e7586c7955cc0d6d71dbbb'
         'a634db784e4bb6efda49e2508d58c96c'
         'ebf52ea0d70699f5d2651054b975dac2'
         '6fbf98e9d4477d3355369bbf9c33c9aa'
         'a0c6cb16be15cdca746f52fe07af0ab8'
         '934f4c14a9242228da3322bd844f001b'
         '29df15b3dad1764cb236e1913adb6895'
         '8f4bd42afb2b0042300b50dbd575ed76'
         '9f1d8951c50f6dd133089824db8e811b'
         'df683c5a6b64226311f1158e1cfd7387'
         'ddf59c931fb1d11337dfb30796172222'
         '3c69e0fa5c10427c9d95b26fecb73366'
         'fdf86cfbcf7e6084f01fda86b3907d68'
         '4f602efbc5ee7dbcf315b7c00c5a9824'
         '30012df56189ba8de7a2be3089ac7037'
         '90660c135667807a35d5a424a14a03c7'
         '39e8128c27e68f03db07ec9d3a4661f4'
         '34c9463b7bd4000cb6c2178568ea5d57'
         'd6008349e2b26e11b4bf29d182236d15'
         '1d51c2c91f10f459227a2c4e16e2cf52'
         '59b1f8e007070d0ac598cc8782cc775d'
         '23f7deb8fbbf8b74426299cf239e83bd'
         '81ec70e9b9fdf887d00c9422d94803d0'
         'b4aea1741607118d5d128df88181c363'
         '52dbb00c5e7adcdee972b2daf689401b'
         'a180a40f9651e8ca3ebdb3001fce6fa7'
         'fed061bc838b9eec2e1c187e64b93176'
         '09b9eae4bdfbc1f7f4939f01a325bb40'
         '337f7aaf9a2d7b94a9c33648a9734287'
         '647abcd745c18a80e5187bc28b1b67b8'
         'b9c5f0043fe7c26e23ba42450afb57b6'
         '6c9bb760adb3ae75ddb969c595649732'
         '70917dca185cf1f150df72eb848b6315'
         'cc16dd7b22855338055429a3fd1a2367'
         '236a36024c7660e7ec0ab2c7931b9ea0'
         '471e98027910bcbfba3957df1e6a3c4a'
         'cea62f763650bb50e770055288e3bd7c'
         '0f4abd8240ecc996fd434b0139a9996b'
         'cec783e074568d1c750ee88a2bbb003f'
         '437d59dd764666147bfe5d27b0848b94'
         'f05ac803378d996351a277ebcc99e0e2'
         '13ddcd0d7c10e381458d5563476d53c3'
         'f33a663b92b61fa02c28b881deae2376'
         '4c4b58d49295b0b873f265ffa369a27d'
         '67e54d3c0058263192700617500045e7'
         '1022e9f23438b96df2f0dd054ff195b0'
         '8274a6aafc5b097ab0659675d66b87c6')