[arch-commits] Commit in libreoffice-fresh-i18n/trunk (PKGBUILD)

Jan Steffens heftig at archlinux.org
Fri Nov 10 22:44:15 UTC 2017


    Date: Friday, November 10, 2017 @ 22:44:14
  Author: heftig
Revision: 309406

Remove use of curl

Modified:
  libreoffice-fresh-i18n/trunk/PKGBUILD

----------+
 PKGBUILD |  244 +++++++++++++++++++++++++++++++------------------------------
 1 file changed, 124 insertions(+), 120 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-11-10 22:42:02 UTC (rev 309405)
+++ PKGBUILD	2017-11-10 22:44:14 UTC (rev 309406)
@@ -25,115 +25,115 @@
 #_url+="/rpm/x86"
 
 _languages=(
-  'af            "Afrikaans"'
-  'am            "Amharic"'
-  'ar            "Arabic"'
-  'as            "Assamese (India)"'
-  'ast           "Asturianu"'
-  'be            "Belarusian"'
-  'bg            "Bulgarian"'
-  'bn            "Bengali"'
-  'bn-IN         "Bengali (India)"'
-  'bo            "Tibetan"'
-  'br            "Breton"'
-  'brx           "Bodo"'
-  'bs            "Bosnian"'
-  'ca            "Catalan"'
-  'ca-valencia   "Catalan (Valencia)"'
-  'cs            "Czech"'
-  'cy            "Welsh"'
-  'da            "Danish"'
-  'de            "German"'
-  'dgo           "Dogri"'
-  'dz            "Dzongkha"'
-  'el            "Greek"'
-  'en-GB         "English (GB)"'
-  'en-ZA         "English (ZA)"'
-  'eo            "Esperanto"'
-  'es            "Spanish"'
-  'et            "Estonian"'
-  'eu            "Basque"'
-  'fa            "Persian"'
-  'fi            "Finnish"'
-  'fr            "French"'
-  'ga            "Irish"'
-  'gd            "Gaelic (Scottish)"'
-  'gl            "Galician"'
-  'gu            "Gujarati"'
-  'he            "Hebrew"'
-  'hi            "Hindi"'
-  'hr            "Croatian"'
-  'hu            "Hungarian"'
-  'id            "Indonesian"'
-  'is            "Icelandic"'
-  'it            "Italian"'
-  'ja            "Japanese"'
-  'ka            "Georgian"'
-  'kk            "Kazakh"'
-  'km            "Khmer (Cambodia)"'
-  'kmr-Latn      "Kurdish"'
-  'kn            "Kannada"'
-  'ko            "Korean"'
-  'kok           "Konkani"'
-  'ks            "Kashmiri"'
-  'lb            "Luxembourgish"'
-  'lo            "Lao"'
-  'lt            "Lithuanian"'
-  'lv            "Latvian"'
-  'mai           "Maithili"'
-  'mk            "Macedonian"'
-  'ml            "Malayalam"'
-  'mn            "Mongolian"'
-  'mni           "Manipuri"'
-  'mr            "Marathi"'
-  'my            "Burmese"'
-  'nb            "Norwegian Bokmal"'
-  'ne            "Nepali"'
-  'nl            "Dutch"'
-  'nn            "Norwegian Nynorsk"'
-  'nr            "Ndebele (South)"'
-  'nso           "Northern Sotho"'
-  'oc            "Occitan"'
-  'om            "Oromo"'
-  'or            "Oriya"'
-  'pa-IN         "Punjabi (India)"'
-  'pl            "Polish"'
-  'pt            "Portuguese"'
-  'pt-BR         "Portuguese (Brasil)"'
-  'ro            "Romanian"'
-  'ru            "Russian"'
-  'rw            "Kinyarwanda"'
-  'sa-IN         "Sanskrit (India)"'
-  'sat           "Santali"'
-  'sd            "Sindhi"'
-  'si            "Singhalese"'
-  'sid           "Sidama"'
-  'sk            "Slovak"'
-  'sl            "Slovenian"'
-  'sq            "Albanien"'
-  'sr            "Serbian"'
-  'sr-Latn       "Serbian (Latin)"'
-  'ss            "Swati"'
-  'st            "Southern Sotho"'
-  'sv            "Swedish"'
-  'sw-TZ         "Swahili (Tanzania)"'
-  'ta            "Tamil"'
-  'te            "Telugu"'
-  'tg            "Tajik"'
-  'th            "Thai"'
-  'tn            "Tswana"'
-  'tr            "Turkish"'
-  'ts            "Tsonga"'
-  'tt            "Tatar"'
-  'ug            "Uighur"'
-  'uk            "Ukrainian"'
-  'uz            "Uzbek"'
-  've            "Venda"'
-  'vi            "Vietnamese"'
-  'xh            "Xhosa"'
-  'zh-CN         "Chinese (simplified)"'
-  'zh-TW         "Chinese (traditional)"'
-  'zu            "Zulu"'
+  'af            "Afrikaans"               0'
+  'am            "Amharic"                 1'
+  'ar            "Arabic"                  1'
+  'as            "Assamese (India)"        0'
+  'ast           "Asturianu"               1'
+  'be            "Belarusian"              0'
+  'bg            "Bulgarian"               1'
+  'bn            "Bengali"                 1'
+  'bn-IN         "Bengali (India)"         1'
+  'bo            "Tibetan"                 1'
+  'br            "Breton"                  0'
+  'brx           "Bodo"                    0'
+  'bs            "Bosnian"                 1'
+  'ca            "Catalan"                 1'
+  'ca-valencia   "Catalan (Valencia)"      1'
+  'cs            "Czech"                   1'
+  'cy            "Welsh"                   0'
+  'da            "Danish"                  1'
+  'de            "German"                  1'
+  'dgo           "Dogri"                   0'
+  'dz            "Dzongkha"                1'
+  'el            "Greek"                   1'
+  'en-GB         "English (GB)"            1'
+  'en-ZA         "English (ZA)"            1'
+  'eo            "Esperanto"               1'
+  'es            "Spanish"                 1'
+  'et            "Estonian"                1'
+  'eu            "Basque"                  1'
+  'fa            "Persian"                 0'
+  'fi            "Finnish"                 1'
+  'fr            "French"                  1'
+  'ga            "Irish"                   0'
+  'gd            "Gaelic (Scottish)"       0'
+  'gl            "Galician"                1'
+  'gu            "Gujarati"                1'
+  'he            "Hebrew"                  1'
+  'hi            "Hindi"                   1'
+  'hr            "Croatian"                1'
+  'hu            "Hungarian"               1'
+  'id            "Indonesian"              1'
+  'is            "Icelandic"               1'
+  'it            "Italian"                 1'
+  'ja            "Japanese"                1'
+  'ka            "Georgian"                1'
+  'kk            "Kazakh"                  0'
+  'km            "Khmer (Cambodia)"        1'
+  'kmr-Latn      "Kurdish"                 0'
+  'kn            "Kannada"                 0'
+  'ko            "Korean"                  1'
+  'kok           "Konkani"                 0'
+  'ks            "Kashmiri"                0'
+  'lb            "Luxembourgish"           0'
+  'lo            "Lao"                     1'
+  'lt            "Lithuanian"              1'
+  'lv            "Latvian"                 1'
+  'mai           "Maithili"                0'
+  'mk            "Macedonian"              1'
+  'ml            "Malayalam"               0'
+  'mn            "Mongolian"               0'
+  'mni           "Manipuri"                0'
+  'mr            "Marathi"                 0'
+  'my            "Burmese"                 0'
+  'nb            "Norwegian Bokmal"        1'
+  'ne            "Nepali"                  1'
+  'nl            "Dutch"                   1'
+  'nn            "Norwegian Nynorsk"       1'
+  'nr            "Ndebele (South)"         0'
+  'nso           "Northern Sotho"          0'
+  'oc            "Occitan"                 0'
+  'om            "Oromo"                   1'
+  'or            "Oriya"                   0'
+  'pa-IN         "Punjabi (India)"         0'
+  'pl            "Polish"                  1'
+  'pt            "Portuguese"              1'
+  'pt-BR         "Portuguese (Brasil)"     1'
+  'ro            "Romanian"                1'
+  'ru            "Russian"                 1'
+  'rw            "Kinyarwanda"             0'
+  'sa-IN         "Sanskrit (India)"        0'
+  'sat           "Santali"                 0'
+  'sd            "Sindhi"                  0'
+  'si            "Singhalese"              1'
+  'sid           "Sidama"                  1'
+  'sk            "Slovak"                  1'
+  'sl            "Slovenian"               1'
+  'sq            "Albanien"                1'
+  'sr            "Serbian"                 0'
+  'sr-Latn       "Serbian (Latin)"         0'
+  'ss            "Swati"                   0'
+  'st            "Southern Sotho"          0'
+  'sv            "Swedish"                 1'
+  'sw-TZ         "Swahili (Tanzania)"      0'
+  'ta            "Tamil"                   1'
+  'te            "Telugu"                  0'
+  'tg            "Tajik"                   1'
+  'th            "Thai"                    0'
+  'tn            "Tswana"                  0'
+  'tr            "Turkish"                 1'
+  'ts            "Tsonga"                  0'
+  'tt            "Tatar"                   0'
+  'ug            "Uighur"                  1'
+  'uk            "Ukrainian"               1'
+  'uz            "Uzbek"                   0'
+  've            "Venda"                   0'
+  'vi            "Vietnamese"              1'
+  'xh            "Xhosa"                   0'
+  'zh-CN         "Chinese (simplified)"    1'
+  'zh-TW         "Chinese (traditional)"   1'
+  'zu            "Zulu"                    0'
 )
 validpgpkeys=('C2839ECAD9408FBE9531C3E9F434A1EFAFEEAEA3') # "LibreOffice Build Team (CODE SIGNING KEY) <build at documentfoundation.org>"
 sha256sums=('f2e80367daba4746ca39dd497b03e41735e74512952265791bff78f095d7470d'
@@ -484,12 +484,13 @@
             'SKIP')
 
 prepare() {
-  for i in ${pkgname[@]}; do
-    _pkglang=${i#*-}
-    _pkglang=${_pkglang/fresh-}
+  for _lang in "${_languages[@]}"; do
+    declare -a "_langa=($_lang)"
+    _locale="${_langa[0]}"
+    _helppack="${_langa[2]}"
 
-    echo ${_pkglang} " unpacking..."
-    cd "${srcdir}"/LibreOffice_${_rcver}_Linux_x86_rpm_langpack_${_pkglang}/RPMS
+    echo ${_locale} " unpacking..."
+    cd "${srcdir}"/LibreOffice_${_rcver}_Linux_x86_rpm_langpack_${_locale}/RPMS
 
     # remove dictionaries if shipped - we ship them now in separate packages
     rm -vf *-dict-*.rpm || /bin/true
@@ -499,9 +500,9 @@
     done
 
     # the helppack rpm goes also into the langpack dir
-    bsdtar -x -f \
-      "${srcdir}"/LibreOffice_${_rcver}_Linux_x86_rpm_helppack_${_pkglang}/RPMS/*.rpm \
-      || true
+    if (( $_helppack )); then
+      bsdtar -x -f "${srcdir}"/LibreOffice_${_rcver}_Linux_x86_rpm_helppack_${_locale}/RPMS/*.rpm
+    fi
   done
 }
 
@@ -518,15 +519,18 @@
 }
 
 for _lang in "${_languages[@]}"; do
-  _locale=${_lang%% *}
+  declare -a "_langa=($_lang)"
+  _locale="${_langa[0]}"
+  _helppack="${_langa[2]}"
   _pkgname=libreoffice-fresh-$_locale
+
+  pkgname+=($_pkgname)
   source+=(${_url}/LibreOffice_${_oodlver}_Linux_x86_rpm_langpack_${_locale}.tar.gz{,.asc})
 
-  if curl -o /dev/null -s -I -f ${_url}/LibreOffice_${_oodlver}_Linux_x86_rpm_helppack_${_locale}.tar.gz; then
+  if (( $_helppack )); then
     source+=(${_url}/LibreOffice_${_oodlver}_Linux_x86_rpm_helppack_${_locale}.tar.gz{,.asc})
   fi
 
-  pkgname+=($_pkgname)
   eval "package_${_pkgname}() {
     _package $_lang
   }"


More information about the arch-commits mailing list