/[gentoo-x86]/app-office/libreoffice-l10n/libreoffice-l10n-3.6.0.4.ebuild
Gentoo

Contents of /app-office/libreoffice-l10n/libreoffice-l10n-3.6.0.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Fri Aug 10 12:03:10 2012 UTC (2 years, 4 months ago) by scarabeus
Branch: MAIN
Changes since 1.1: +3 -5 lines
Change the dep to block older versions to get more meaningfull block message. Wrt bug#430464.

(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)

1 scarabeus 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 scarabeus 1.2 # $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice-l10n/libreoffice-l10n-3.6.0.4.ebuild,v 1.1 2012/08/09 09:12:48 scarabeus Exp $
4 scarabeus 1.1
5     EAPI=4
6    
7     inherit rpm eutils multilib versionator
8    
9     MY_PV=$(get_version_component_range 1-3)
10    
11     DESCRIPTION="Translations for the Libreoffice suite."
12     HOMEPAGE="http://www.libreoffice.org"
13     BASE_SRC_URI="http://download.documentfoundation.org/${PN/-l10n/}/stable/${MY_PV}/rpm"
14    
15     LICENSE="|| ( LGPL-3 MPL-1.1 )"
16     SLOT="0"
17     KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
18     IUSE="offlinehelp"
19    
20     LANGUAGES_HELP="ast bg bn_IN bn bo bs ca_XV ca cs da de dz el en_GB en en_ZA eo
21     es et eu fi fr gl gu he hi hr hu id is it ja ka km ko lb mk nb ne nl nn om pl
22     pt_BR pt ru si sk sl sq sv tg tr ug uk vi zh_CN zh_TW"
23     LANGUAGES="${LANGUAGES_HELP} af am ar as be br brx cy dgo fa ga gd kk kn kok ks
24     ku lo lt lv mai ml mn mni mr my nr nso oc or pa_IN ro rw sa_IN sat sd sh sr ss
25     st sw_TZ ta te th tn ts tt uz ve xh zu"
26    
27     for lang in ${LANGUAGES_HELP}; do
28     helppack=""
29     [[ ${lang} == en ]] && lang2=${lang/en/en_US} || lang2=${lang}
30     helppack="offlinehelp? ( ${BASE_SRC_URI}/x86/LibO_${MY_PV}_Linux_x86_helppack-rpm_${lang2/_/-}.tar.gz )"
31     SRC_URI+=" linguas_${lang}? ( ${helppack} )"
32     done
33     for lang in ${LANGUAGES}; do
34     langpack=""
35     [[ ${lang} == en ]] \
36     || langpack="${BASE_SRC_URI}/x86/LibO_${MY_PV}_Linux_x86_langpack-rpm_${lang/_/-}.tar.gz"
37     [[ -z ${langpack} ]] || SRC_URI+=" linguas_${lang}? ( ${langpack} )"
38     IUSE+=" linguas_${lang}"
39     done
40     unset lang helppack langpack lang2
41    
42     RDEPEND+="
43     app-text/hunspell
44 scarabeus 1.2 !<app-office/libreoffice-$(get_version_component_range 1-2)
45     !<app-office/libreoffice-bin-$(get_version_component_range 1-2)
46 scarabeus 1.1 "
47    
48     RESTRICT="strip"
49    
50     S="${WORKDIR}"
51    
52     src_unpack() {
53     default
54    
55     local lang dir rpmdir i
56     local ooextused=()
57    
58     for lang in ${LANGUAGES}; do
59     # break away if not enabled; paludis support
60     use_if_iuse linguas_${lang} || continue
61    
62     dir=${lang/_/-}
63    
64     # for english we provide just helppack, as translation is always there
65     if [[ ${lang} != en ]]; then
66     rpmdir="LibO_${PV}_Linux_x86_langpack-rpm_${dir}/RPMS/"
67     [[ -d ${rpmdir} ]] || die "Missing directory: \"${rpmdir}\""
68     # First remove dictionaries, we want to use system ones.
69     rm -rf "${S}/${rpmdir}/"*dict*.rpm
70     rpm_unpack "./${rpmdir}/"*.rpm
71     fi
72     if [[ "${LANGUAGES_HELP}" =~ "${lang}" ]] && use offlinehelp; then
73     [[ ${lang} == en ]] && dir="en-US"
74     rpmdir="LibO_${PV}_Linux_x86_helppack-rpm_${dir}/RPMS/"
75     [[ -d ${rpmdir} ]] || die "Missing directory: \"${rpmdir}\""
76     rpm_unpack ./"${rpmdir}/"*.rpm
77     fi
78     done
79     }
80    
81     src_prepare() { :; }
82     src_configure() { :; }
83     src_compile() { :; }
84    
85     src_install() {
86     local dir="${S}"/opt/${PN/-l10n/}$(get_version_component_range 1-2)/
87     # Condition required for people that do not install anything eg no linguas
88     # or just english with no offlinehelp.
89     if [[ -d "${dir}" ]] ; then
90     insinto /usr/$(get_libdir)/${PN/-l10n/}/
91     doins -r "${dir}"/*
92     fi
93     # remove extensions that are in the l10n for some weird reason
94     rm -rf "${ED}"/usr/$(get_libdir)/${PN/-l10n/}/share/extensions/
95     }

  ViewVC Help
Powered by ViewVC 1.1.20