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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Fri Aug 10 12:03:10 2012 UTC (2 years, 1 month ago) by scarabeus
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
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 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice-l10n/libreoffice-l10n-3.6.0.ebuild,v 1.2 2012/08/08 15:54:27 scarabeus Exp $
4
5 EAPI=4
6
7 MY_PV="3.6.0"
8
9 RC_VERSION=".4" # CHECK ME WITH EVERY BUMP!
10 BASE_SRC_URI="http://download.documentfoundation.org/${PN/-l10n/}/stable/${MY_PV}/rpm"
11
12 inherit rpm eutils multilib versionator
13
14 DESCRIPTION="Translations for the Libreoffice suite."
15 HOMEPAGE="http://www.libreoffice.org"
16
17 LICENSE="LGPL-3"
18 SLOT="0"
19 KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
20 IUSE="offlinehelp"
21
22 LANGUAGES_HELP="ast bg bn_IN bn bo bs ca_XV ca cs da de dz el en_GB en en_ZA eo
23 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
24 pt_BR pt ru si sk sl sq sv tg tr ug uk vi zh_CN zh_TW"
25 LANGUAGES="${LANGUAGES_HELP} af am ar as be br brx cy dgo fa ga gd kk kn kok ks
26 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
27 st sw_TZ ta te th tn ts tt uz ve xh zu"
28
29 for lang in ${LANGUAGES_HELP}; do
30 helppack=""
31 [[ ${lang} == en ]] && lang2=${lang/en/en_US} || lang2=${lang}
32 helppack=" offlinehelp? ( ${BASE_SRC_URI}/x86/LibO_${MY_PV}_Linux_x86_helppack-rpm_${lang2/_/-}.tar.gz ) "
33 SRC_URI+=" linguas_${lang}? ( ${helppack} )"
34 done
35
36 for lang in ${LANGUAGES}; do
37 langpack=""
38 [[ ${lang} == en ]] \
39 || langpack=" ${BASE_SRC_URI}/x86/LibO_${MY_PV}_Linux_x86_langpack-rpm_${lang/_/-}.tar.gz "
40 [[ -z ${langpack} ]] || SRC_URI+=" linguas_${lang}? ( ${langpack} )"
41 IUSE+=" linguas_${lang}"
42 done
43 unset lang helppack langpack lang2 i
44
45 RDEPEND+="
46 app-text/hunspell
47 || (
48 >=app-office/libreoffice-$(get_version_component_range 1-2 ${MY_PV})
49 >=app-office/libreoffice-bin-$(get_version_component_range 1-2 ${MY_PV})
50 )
51 "
52
53 RESTRICT="strip"
54
55 S="${WORKDIR}"
56
57 src_unpack() {
58 default
59
60 local lang dir rpmdir i
61 local ooextused=()
62
63 for lang in ${LANGUAGES}; do
64 # break away if not enabled; paludis support
65 use_if_iuse linguas_${lang} || continue
66
67 dir=${lang/_/-}
68
69 # for english we provide just helppack, as translation is always there
70 if [[ ${lang} != en ]]; then
71 rpmdir="LibO_${MY_PV}${RC_VERSION}_Linux_x86_langpack-rpm_${dir}/RPMS/"
72 [[ -d ${rpmdir} ]] || die "Missing directory: \"${rpmdir}\""
73 # First remove dictionaries, we want to use system ones.
74 rm -rf "${S}/${rpmdir}/"*dict*.rpm
75 rpm_unpack "./${rpmdir}/"*.rpm
76 fi
77 if [[ "${LANGUAGES_HELP}" =~ "${lang}" ]] && use offlinehelp; then
78 [[ ${lang} == en ]] && dir="en-US"
79 rpmdir="LibO_${MY_PV}${RC_VERSION}_Linux_x86_helppack-rpm_${dir}/RPMS/"
80 [[ -d ${rpmdir} ]] || die "Missing directory: \"${rpmdir}\""
81 rpm_unpack ./"${rpmdir}/"*.rpm
82 fi
83 done
84 }
85
86 src_prepare() { :; }
87 src_configure() { :; }
88 src_compile() { :; }
89
90 src_install() {
91 local dir="${S}"/opt/${PN/-l10n/}$(get_version_component_range 1-2 ${MY_PV})/
92 # Condition required for people that do not install anything eg no linguas
93 # or just english with no offlinehelp.
94 if [[ -d "${dir}" ]] ; then
95 insinto /usr/$(get_libdir)/${PN/-l10n/}/
96 doins -r "${dir}"/*
97 fi
98 # remove extensions that are in the l10n for some weird reason
99 rm -rf "${ED}"/usr/$(get_libdir)/${PN/-l10n/}/share/extensions/
100 }

  ViewVC Help
Powered by ViewVC 1.1.20