PKGBUILD 4.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. # Maintainer: Andreas Grapentin <andreas@grapentin.org>
  2. # Contributor: Márcio Silva <coadde@hyperbola.info>
  3. # Contributor: André Silva <emulatorman@hyperbola.info>
  4. _pkgbase=iceape
  5. pkgbase=${_pkgbase}-l10n
  6. epoch=1
  7. _pkgver_armv7h=2.49.4
  8. _pkgver_i686=2.49.4
  9. _pkgver_x86_64=2.49.4
  10. _pkgrel_armv7h=1
  11. _pkgrel_i686=1
  12. _pkgrel_x86_64=1
  13. eval "pkgver=\$_pkgver_${CARCH}" # this is actually an 'any' package
  14. eval "pkgrel=\$_pkgrel_${CARCH}" # but our different arches do not always roll at the same speed
  15. pkgdesc="Language pack for ${_pkgbase^}"
  16. arch=('armv7h' 'i686' 'x86_64')
  17. url="https://wiki.parabola.nu/$_pkgbase"
  18. license=(MPL GPL)
  19. depends=("$_pkgbase=$epoch:$pkgver")
  20. makedepends=('unzip' 'zip')
  21. pkgname=()
  22. source=(brand.dtd
  23. brand.properties
  24. communicator-region.properties
  25. editor-region.properties
  26. messenger-region.properties
  27. navigator-region.properties
  28. languages.${CARCH}
  29. sha512sums.${CARCH})
  30. # load languages list and .xpi checksums
  31. source languages.${CARCH} &> /dev/null # sets $_languages
  32. source sha512sums.${CARCH} &> /dev/null # sets $_sha512sums
  33. # compile package names and .xpi sources
  34. _src_url=https://ftp.mozilla.org/pub/seamonkey/releases/${pkgver}/langpack
  35. for _lang in "${_languages[@]}"; do
  36. _locale=${_lang%% *}
  37. _pkgname=${pkgbase}-${_locale,,}
  38. pkgname+=($_pkgname)
  39. source+=(${pkgbase}-${pkgver}-${_locale}.xpi::${_url}/seamonkey-${pkgver}.${_locale}.langpack.xpi)
  40. eval "package_${_pkgname}() {
  41. _package ${_lang}
  42. }"
  43. done
  44. # compile checksums
  45. _languages_x86_64_shasum='1cc581a43b69834c94836b4f891cb9e35538d3df0538d449fa3efe8f26b79b96f05c7f210e48fefe5ba96c95cd40a8a3180f8611f31367c4f16930327f9e4585'
  46. _languages_i686_shasum='1cc581a43b69834c94836b4f891cb9e35538d3df0538d449fa3efe8f26b79b96f05c7f210e48fefe5ba96c95cd40a8a3180f8611f31367c4f16930327f9e4585'
  47. _languages_armv7h_shasum='1cc581a43b69834c94836b4f891cb9e35538d3df0538d449fa3efe8f26b79b96f05c7f210e48fefe5ba96c95cd40a8a3180f8611f31367c4f16930327f9e4585'
  48. _sha512sums_x86_64_shasum='947f493bd305ea4993367122cd78df76db9b54f3e7aecb87dcfcb94010cee84585bb18bec7cd63a6f15b8c40dd29f131cfeba92e8945ff57bbcde0d11e3a1629'
  49. _sha512sums_i686_shasum='947f493bd305ea4993367122cd78df76db9b54f3e7aecb87dcfcb94010cee84585bb18bec7cd63a6f15b8c40dd29f131cfeba92e8945ff57bbcde0d11e3a1629'
  50. _sha512sums_armv7h_shasum='947f493bd305ea4993367122cd78df76db9b54f3e7aecb87dcfcb94010cee84585bb18bec7cd63a6f15b8c40dd29f131cfeba92e8945ff57bbcde0d11e3a1629'
  51. sha256sums=('08b88f2ef2b9d780945389628d7fe4940d8270554e76d025449f6908e2c1affad1faa8cfe1e95889c59b7fa4dfbee60f67d68b8ac031b568256bb2f8a9106910' # brand.dtd
  52. '69460ad8100fba9dfaf6993a8f061717cb3cb39fa13b1d8d040d7f91d1c482c62548ae184c698e23f28abc0ecfec7e7b11f22b55083e65a9b41d3fc7715a6633' # brand.properties
  53. 'fca487a975a58ade57edc35674ce4ebdffabcf5e241ab1ac0eb08dc6d64e26a4990fbc6229d972fa3172e747368b35b5396a4f7d9c2ed1a55fc25c72a75f2842' # communicator-region.properties
  54. 'f6fcb5294acab6ad26942da9466da7ee653c54ead4d8b5835894e35acf87d874e95a2357569574ec645c6ab67aa333210666e9a8462e7a36a7463100e78386a6' # editor-region.properties
  55. '3b40d16c9871502005b81ed7e35d4d5a6ca1ba17d75d53b0e623274fd6be49071cb16e2a36e35e06485b7d5eebbdfc66e511b975c2fa029f97d7e437fdf57fa9' # messenger-region.properties
  56. '7542559b4da72739cf5a1f96c2ecbf771a3c6e559c7ac9a50eb67e4dbe5c34ac47ce1684286ae88a80f52b17131ac881fb30be83be001b385184c5e2e2c8683f' # navigator-region.properties
  57. $(eval "echo \$_languages_${CARCH}_shasum") # languages.${CARCH}
  58. $(eval "echo \$_sha512sums_${CARCH}_shasum") # sha512sums.${CARCH}
  59. "${_sha512sums[@]}")
  60. # Don't extract anything
  61. noextract=(${source[@]%%::*})
  62. _package() {
  63. pkgdesc="$2 for ${_pkgbase^}."
  64. unzip iceape-l10n-$pkgver-$1.xpi -d $1
  65. rm -v iceape-l10n-$pkgver-$1.xpi
  66. install -vDm644 $srcdir/brand.dtd $1/chrome/$1/locale/$1/branding
  67. install -vDm644 $srcdir/brand.properties $1/chrome/$1/locale/$1/branding
  68. install -vDm644 $srcdir/navigator-region.properties $1/chrome/$1/locale/$1/navigator-region/region.properties
  69. install -vDm644 $srcdir/messenger-region.properties $1/chrome/$1/locale/$1/messenger-region/region.properties
  70. install -vDm644 $srcdir/communicator-region.properties $1/chrome/$1/locale/$1/communicator-region/region.properties
  71. install -vDm644 $srcdir/editor-region.properties $1/chrome/$1/locale/$1/editor-region/region.properties
  72. sed -i -e 's/seamonkey/iceape/' $1/install.rdf
  73. rm -rv $1/chrome/$1/locale/$1/global-platform/{mac,win}
  74. cd $1
  75. zip -r langpack-$1@iceape.mozilla.org.xpi .
  76. mv -v langpack-$1@iceape.mozilla.org.xpi $srcdir
  77. cd ..
  78. rm -rv $1
  79. install -vDm644 langpack-$1@iceape.mozilla.org.xpi \
  80. "$pkgdir/usr/lib/iceape-$pkgver/extensions/langpack-$1@iceape.mozilla.org.xpi"
  81. }