PKGBUILD 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # Maintainer (arch): Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
  2. # Contributor: Thomas Baechler <thomas@archlinux.org>
  3. # Contributor: Jaroslaw Swierczynski <swiergot@juvepoland.com>
  4. # Contributor: Michal Hybner <dta081@gmail.com>
  5. # Contributor: Andrea Scarpino <andrea@archlinux.org>
  6. # Maintainer: Andreas Grapentin <andreas@grapentin.org>
  7. # Contributor: Márcio Silva <coadde@hyperbola.info>
  8. # Contributor: André Silva <emulatorman@hyperbola.info>
  9. # Contributor: Luke Shumaker <lukeshu@parabola.nu>
  10. # Contributor: fauno <fauno@kiwwwi.com.ar>
  11. # Contributor: Figue <ffigue@gmail.com>
  12. # Contributor: bill-auger <bill-auger@programmer.net>
  13. _pkgbase=icecat
  14. pkgbase=${_pkgbase}-l10n
  15. _pkgver_armv7h=60.7.0_gnu1
  16. _pkgver_i686=78.7.0_pre
  17. _pkgver_x86_64=78.7.0_pre
  18. _pkgrel_armv7h=1
  19. _pkgrel_i686=1
  20. _pkgrel_x86_64=1
  21. eval "pkgver=\$_pkgver_${CARCH}" # this is actually an 'any' package
  22. eval "pkgrel=\$_pkgrel_${CARCH}" # but our different arches do not always roll at the same speed
  23. pkgdesc="Language pack for GNU IceCat."
  24. arch=('armv7h' 'i686' 'x86_64')
  25. url="http://www.gnu.org/software/gnuzilla/"
  26. license=('MPL' 'GPL')
  27. depends=("${_pkgbase}=${pkgver}")
  28. makedepends=('unzip' 'zip')
  29. pkgname=()
  30. source=(region.properties
  31. languages.${CARCH}
  32. sha512sums.${CARCH})
  33. # load languages list and .xpi checksums
  34. source languages.${CARCH} &> /dev/null # sets $_languages
  35. source sha512sums.${CARCH} &> /dev/null # sets $_sha512sums
  36. # compile package names and .xpi sources
  37. #_src_url=http://ftp.gnu.org/gnu/gnuzilla/${pkgver%_*}/langpacks # FIXME: normal releases - gnuzilla lang-packs
  38. _src_url=https://ftp.mozilla.org/pub/firefox/releases/${pkgver%_*}esr/linux-x86_64/xpi # FIXME: pre-release - no gnuzilla lang-packs
  39. for _lang in "${_languages[@]}"; do
  40. _locale=${_lang%% *}
  41. _pkgname=${pkgbase}-${_locale,,}
  42. pkgname+=(${_pkgname})
  43. # source+=(${_src_url}/${_pkgbase}-${pkgver%_*}.${_locale}.langpack.xpi) # FIXME: normal releases - gnuzilla lang-packs
  44. source+=(${_src_url}/${_locale}.xpi) # FIXME: pre-release - no gnuzilla lang-packs
  45. eval "package_${_pkgname}() {
  46. _package ${_lang}
  47. }"
  48. done
  49. # compile checksums
  50. _languages_armv7h_shasum='215312aa1489de846eefd92881b09ded48da5b3340168f65b568d191d500c646023553d699ba1f4c5ec0d59b321facfebed14a910c0bcb385f4b729ab1a3fb2a'
  51. _languages_i686_shasum="e27aa22697942c950c71a6466a70579d326bcce5cc547592c4b1fe0c9b4fa819f7fd7c2a354f2982d65d16f8bb7997635d9b9344d68330eec979e03258b5e5e7"
  52. _languages_x86_64_shasum="e27aa22697942c950c71a6466a70579d326bcce5cc547592c4b1fe0c9b4fa819f7fd7c2a354f2982d65d16f8bb7997635d9b9344d68330eec979e03258b5e5e7"
  53. _sha512sums_armv7h_shasum='f37875c1e34337da36626de8e90921828acd347db72d6de4ccfbd000ae075ae038f1084c261a7328cd44c4aa02fd7fb68d32710c3a7b7f04ada374ad15e58492'
  54. _sha512sums_i686_shasum="eab6b49777e497ed347a7ec3561b25544a4a6ccc49b36e369d1f428e8a791ca347f4a8a62577fd783ccb3b1f761eba1b3357483501cf92e4b787117bb41b5a8f"
  55. _sha512sums_x86_64_shasum="eab6b49777e497ed347a7ec3561b25544a4a6ccc49b36e369d1f428e8a791ca347f4a8a62577fd783ccb3b1f761eba1b3357483501cf92e4b787117bb41b5a8f"
  56. sha512sums=('5d35275f6ccfbbce6ee37357e91df5a4d94b79dd6e78074c3b0e8640e190b0b7c1758186818b9e0ac681ca6c6859b5c84dbe4ca3d5ebbb350fd6a0d39f25252a' # 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 GNU IceCat."
  64. replaces=(icecat-i18n-${1,,})
  65. conflicts=(icecat-i18n-${1,,})
  66. # unzip icecat-${pkgver%_*}.$1.langpack.xpi -d $1 # FIXME: normal releases - gnuzilla lang-packs
  67. # rm -v icecat-${pkgver%_*}.$1.langpack.xpi # FIXME: normal releases - gnuzilla lang-packs
  68. unzip $1.xpi -d $1 # FIXME: pre-release - no gnuzilla lang-packs
  69. rm -v $1.xpi # FIXME: pre-release - no gnuzilla lang-packs
  70. install -vDm644 $srcdir/region.properties $1/browser/chrome/$1/locale/browser-region
  71. rm -rv $1/chrome/$1/locale/$1/global-platform/{mac,win}
  72. cd $1
  73. zip -r langpack-$1@icecat.mozilla.org.xpi .
  74. mv -v langpack-$1@icecat.mozilla.org.xpi $srcdir
  75. cd ..
  76. rm -rv $1
  77. install -vDm644 langpack-$1@icecat.mozilla.org.xpi \
  78. "$pkgdir/usr/lib/icecat/browser/extensions/langpack-$1@icecat.mozilla.org.xpi"
  79. }