diff options
author | 2015-08-08 13:49:04 -0700 | |
---|---|---|
committer | 2015-08-08 17:38:18 -0700 | |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-office/libreoffice-l10n/files | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-office/libreoffice-l10n/files')
-rw-r--r-- | app-office/libreoffice-l10n/files/lo_gen_langs.sh | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/app-office/libreoffice-l10n/files/lo_gen_langs.sh b/app-office/libreoffice-l10n/files/lo_gen_langs.sh new file mode 100644 index 000000000000..baafa56cfe2b --- /dev/null +++ b/app-office/libreoffice-l10n/files/lo_gen_langs.sh @@ -0,0 +1,65 @@ +#!/bin/bash +# Licensed under the GNU General Public License, v2 + +# +# Author: Ralph Sennhauser +# +# Find l10n packs for libreoffice and format it for use in ebuilds. +# + +VERSION=${1:-4.1.5} +BASE_SRC_URI="http://download.documentfoundation.org/libreoffice/stable/${VERSION}/rpm/x86" + +# needs lxml +print_available_tarballs() { + python << EOL +import sys, urllib +from xml.dom.minidom import parseString +from BeautifulSoup import BeautifulSoup + +opener = urllib.urlopen("${BASE_SRC_URI}") +html = opener.read() +opener.close() +# broken html, try to sanitize +html = BeautifulSoup(html).prettify() + +dom = parseString(html) +for elem in dom.getElementsByTagName('a'): + attr = elem.getAttribute("href") + if attr.endswith('tar.gz'): + if "install" in attr: continue + print(attr) +EOL +} + +tarballs=( $(print_available_tarballs) ) +help_packs=() +lang_packs=() +lang_packs_reduced=() + +for tb in "${tarballs[@]}"; do + pack=${tb%.tar.gz} + pack=${pack##*rpm_} + pack=${pack/en-US/en} + pack=${pack/-/_} + pack=${pack/en-US/en} + if [[ ${tb} =~ helppack ]]; then + pack=${pack/helppack_/} + help_packs+=( ${pack} ) + elif [[ ${tb} =~ langpack ]]; then + pack=${pack/langpack_/} + lang_packs+=( ${pack} ) + fi +done + +for lpack in "${lang_packs[@]}"; do + for hpack in "${help_packs[@]}"; do + if [[ ${hpack} == ${lpack} ]]; then + continue 2 + fi + done + lang_packs_reduced+=( ${lpack} ) +done + +echo "LANGUAGES_HELP=\" ${help_packs[@]} \"" +echo "LANGUAGES=\"\${LANGUAGES_HELP}${lang_packs_reduced[@]} \"" |