diff options
author | Ted Alff | 2020-06-09 11:07:45 -0400 |
---|---|---|
committer | Ted Alff | 2020-06-09 11:07:45 -0400 |
commit | a3f8217f4bea84b4963808aae5e0bd3a514c38a9 (patch) | |
tree | 08b3310e5658b24197db224ac8d68c4cfe016bc5 /PKGBUILD | |
download | aur-a3f8217f4bea84b4963808aae5e0bd3a514c38a9.tar.gz |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 216 |
1 files changed, 216 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8608ae61266c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,216 @@ +# Maintainer: twa022 <twa022 at gmail dot com> + +pkgbase=libreoffice-dev-i18n + +_pkgnamefmt=LibreOfficeDev +_pkgver=7.0.0.0.beta1 +pkgver=7.0.0.0beta1 +pkgrel=1 +#_basever=$( cut -f1-2 -d'.' <<< ${_LOver} ) + +arch=('any') +url="https://www.documentfoundation.org" +license=('LGPL') + +_url="https://dev-builds.libreoffice.org/pre-releases/rpm/x86_64/" + +# An array of the country codes for the language packs to build. If empty, will build all +# e.g. _build=( 'de' 'es' ) # Build german and spanish only +_build=() + +_languages=( + 'af "Afrikaans" 0' + 'am "Amharic" 1' + 'ar "Arabic" 1' + 'as "Assamese (India)" 0' + 'ast "Asturianu" 1' + 'be "Belarusian" 0' + 'bg "Bulgarian" 1' + 'bn-IN "Bengali (India)" 1' + 'bn "Bengali" 1' + 'bo "Tibetan" 1' + 'br "Breton" 0' + 'brx "Bodo" 0' + 'bs "Bosnian" 1' + 'ca-valencia "Catalan (Valencia)" 1' + 'ca "Catalan" 1' + 'cs "Czech" 1' + 'cy "Welsh" 0' + 'da "Danish" 1' + 'de "German" 1' + 'dgo "Dogri" 0' + 'dsb "Lower Sorbian" 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' + 'fur "Friulian" 0' + 'fy "Western Frisian" 0' + 'ga "Irish" 0' + 'gd "Gaelic (Scottish)" 0' + 'gl "Galician" 1' + 'gu "Gujarati" 1' + 'gug "Paraguayan GuaranĂ" 0' + 'he "Hebrew" 1' + 'hi "Hindi" 1' + 'hr "Croatian" 1' + 'hsb "Upper Sorbian" 0' + 'hu "Hungarian" 1' + 'id "Indonesian" 1' + 'is "Icelandic" 1' + 'it "Italian" 1' + 'ja "Japanese" 1' + 'ka "Georgian" 1' + 'kab "Kabyle" 0' + '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-BR "Portuguese (Brasil)" 1' + 'pt "Portuguese" 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-Latn "Serbian (Latin)" 0' + 'sr "Serbian" 0' + 'ss "Swati" 0' + 'st "Southern Sotho" 0' + 'sv "Swedish" 1' + 'sw-TZ "Swahili (Tanzania)" 0' + 'szl "Silesian" 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' + 'vec "Venetian" 0' + 'vi "Vietnamese" 1' + 'xh "Xhosa" 0' + 'zh-CN "Chinese (simplified)" 1' + 'zh-TW "Chinese (traditional)" 1' + 'zu "Zulu" 0' +) +# 'qtz "Reserved" 1' ## Reserved language code? + +validpgpkeys=('C2839ECAD9408FBE9531C3E9F434A1EFAFEEAEA3') # "LibreOffice Build Team (CODE SIGNING KEY) <build@documentfoundation.org>" + +prepare() { + for _lang in "${_languages[@]}"; do + declare -a "_langa=($_lang)" + _locale="${_langa[0]}" + _helppack="${_langa[2]}" + _pkg=1 + if [[ ${#_build[@]} -gt 0 ]] ; then + _pkg=0 + for (( i=0 ; $i < ${#_build[@]} ; i++ )) ; do + if [[ "${_build[$i]}" == "${_locale}" ]] ; then + _pkg=1 + break + fi + done + fi + [[ $_pkg -eq 0 ]] && continue + + echo ${_locale} " unpacking..." + cd "${srcdir}"/${_pkgnamefmt}_${_pkgver}_Linux_x86-64_rpm_langpack_${_locale}/RPMS + + # remove dictionaries if shipped - we ship them now in separate packages + rm -vf *-dict-*.rpm || /bin/true + + for j in *.rpm + do bsdtar -x -f $j + done + + # the helppack rpm goes also into the langpack dir + if (( $_helppack )); then + bsdtar -x -f "${srcdir}"/${_pkgnamefmt}_${_pkgver}_Linux_x86-64_rpm_helppack_${_locale}/RPMS/*.rpm + fi + done +} + +_package() { + pkgdesc="$2 language pack for LibreOffice Dev" + depends=('libreoffice-dev-bin') + + cd "$srcdir"/${_pkgnamefmt}_${_pkgver}_Linux_x86-64_rpm_langpack_$1/RPMS + cp -R opt "$pkgdir" + chown root:root -R "$pkgdir" +} + +for _lang in "${_languages[@]}"; do + declare -a "_langa=($_lang)" + _locale="${_langa[0]}" + _pkg=1 + if [[ ${#_build[@]} -gt 0 ]] ; then + _pkg=0 + for (( i=0 ; $i < ${#_build[@]} ; i++ )) ; do + if [[ "${_build[$i]}" == "${_locale}" ]] ; then + _pkg=1 + break + fi + done + fi + [[ $_pkg -eq 0 ]] && continue + _helppack="${_langa[2]}" + _pkgname=libreoffice-dev-${_locale,,} + + pkgname+=($_pkgname) + source+=(${_url}/${_pkgnamefmt}_${_pkgver}_Linux_x86-64_rpm_langpack_${_locale}.tar.gz{,.asc}) + sha256sums+=('SKIP' 'SKIP') + + if (( $_helppack )); then + source+=(${_url}/${_pkgnamefmt}_${_pkgver}_Linux_x86-64_rpm_helppack_${_locale}.tar.gz{,.asc}) + sha256sums+=('SKIP' 'SKIP') + fi + + eval "package_${_pkgname}() { + _package $_lang + }" +done |