/[gentoo-x86]/app-office/libreoffice-bin/libreoffice-bin-3.3.0-r1.ebuild
Gentoo

Contents of /app-office/libreoffice-bin/libreoffice-bin-3.3.0-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Feb 10 21:20:22 2011 UTC (3 years, 7 months ago) by suka
Branch: MAIN
Changes since 1.1: +2 -3 lines
Remove kde use flag, as the integration is actually missing in the upstream packages, bug #352723

(Portage version: 2.1.9.39/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice-bin/libreoffice-bin-3.3.0-r1.ebuild,v 1.1 2011/02/09 08:20:50 suka Exp $
4
5 EAPI="3"
6
7 inherit eutils fdo-mime gnome2-utils pax-utils prefix rpm multilib
8
9 IUSE="gnome java offlinehelp"
10
11 MY_PV="${PV/_/-}"
12 MY_PV2="${PV}rc4"
13 BVER="3.3.0-6"
14 UREVER="1.7.0-6"
15 BASIS="libobasis3.3"
16 FILEPATH="http://download.documentfoundation.org/libreoffice/stable/${PV}/rpm/"
17
18 if [ "${ARCH}" = "amd64" ] ; then
19 LOARCH="x86_64"
20 LOARCH2="x86-64"
21 else
22 LOARCH="i586"
23 LOARCH2="x86"
24 fi
25
26 S="${WORKDIR}/en-US/RPMS"
27 UP="LibO_${MY_PV2}_Linux_${LOARCH2}_install-rpm_en-US/RPMS"
28 DESCRIPTION="LibreOffice productivity suite."
29
30 SRC_URI="amd64? ( ${FILEPATH}/x86_64/LibO_${PV}_Linux_x86-64_install-rpm_en-US.tar.gz
31 offlinehelp? ( ${FILEPATH}/x86_64/LibO_${PV}_Linux_x86-64_helppack-rpm_en-US.tar.gz ) )
32 x86? ( ${FILEPATH}/x86/LibO_${PV}_Linux_x86_install-rpm_en-US.tar.gz
33 offlinehelp? ( ${FILEPATH}/x86/LibO_${PV}_Linux_x86_helppack-rpm_en-US.tar.gz ) )"
34
35 LANGS="af ar as ast be_BY bg bn bo br brx bs ca ca_XV cs cy da de dgo dz el en en_GB en_ZA eo es et eu fa fi fr ga gd gl gu he hi hr hu id is it ja ka kk km kn ko kok ks ku ky lo lt lv mai mk ml mn mni mr ms my nb ne nl nn nr ns oc om or pa_IN pap pl ps pt pt_BR ro ru rw sa_IN sat sd sh si sk sl sq sr ss st sv sw_TZ ta te tg th ti tn tr ts ug uk uz ve vi xh zh_CN zh_TW zu"
36
37 for X in ${LANGS} ; do
38 [[ ${X} != "en" ]] && SRC_URI="${SRC_URI} linguas_${X}? (
39 amd64? ( "${FILEPATH}"/x86_64/LibO_${PV}_Linux_x86-64_langpack-rpm_${X/_/-}.tar.gz
40 offlinehelp? ( "${FILEPATH}"/x86_64/LibO_${PV}_Linux_x86-64_helppack-rpm_${X/_/-}.tar.gz ) )
41 x86? ( "${FILEPATH}"/x86/LibO_${PV}_Linux_x86_langpack-rpm_${X/_/-}.tar.gz
42 offlinehelp? ( "${FILEPATH}"/x86/LibO_${PV}_Linux_x86_helppack-rpm_${X/_/-}.tar.gz ) ) )"
43 IUSE="${IUSE} linguas_${X}"
44 done
45
46 HOMEPAGE="http://www.documentfoundation.org"
47
48 LICENSE="LGPL-3"
49 SLOT="0"
50 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
51
52 RDEPEND="!app-office/libreoffice
53 !app-office/openoffice
54 !app-office/openoffice-bin
55 x11-libs/libXaw
56 !prefix? ( sys-libs/glibc )
57 >=dev-lang/perl-5.0
58 app-arch/zip
59 app-arch/unzip
60 x11-libs/libXinerama
61 >=media-libs/freetype-2.1.10-r2"
62
63 DEPEND="${RDEPEND}
64 sys-apps/findutils"
65
66 PDEPEND="java? ( >=virtual/jre-1.5 )"
67
68 PROVIDE="virtual/ooo"
69 RESTRICT="strip binchecks"
70
71 QA_EXECSTACK="usr/$(get_libdir)/libreoffice/basis3.3/program/*
72 usr/$(get_libdir)/libreoffice/ure/lib/*"
73 QA_TEXTRELS="usr/$(get_libdir)/libreoffice/ure/lib/*"
74 QA_PRESTRIPPED="usr/$(get_libdir)/libreoffice/basis3.3/program/*
75 usr/$(get_libdir)/libreoffice/basis3.3/program/python-core-2.6.1/lib/lib-dynload/*
76 usr/$(get_libdir)/libreoffice/program/*
77 usr/$(get_libdir)/libreoffice/ure/bin/*
78 usr/$(get_libdir)/libreoffice/ure/lib/*"
79
80 RESTRICT="mirror"
81
82 src_unpack() {
83
84 unpack ${A}
85
86 cp "${FILESDIR}"/{50-libreoffice-bin,wrapper.in} "${T}"
87 eprefixify "${T}"/{50-libreoffice-bin,wrapper.in}
88
89 for i in base binfilter calc core01 core02 core03 core04 core05 core06 \
90 core07 draw graphicfilter images impress math ogltrans ooofonts \
91 ooolinguistic pyuno testtool writer xsltfilter ; do
92 rpm_unpack "./${UP}/${BASIS}-${i}-${BVER}.${LOARCH}.rpm"
93 done
94
95 rpm_unpack "./${UP}/libreoffice3-${BVER}.${LOARCH}.rpm"
96 rpm_unpack "./${UP}/libreoffice3-ure-${UREVER}.${LOARCH}.rpm"
97
98 for j in base calc draw impress math writer; do
99 rpm_unpack "./${UP}/libreoffice3-${j}-${BVER}.${LOARCH}.rpm"
100 done
101
102 rpm_unpack "./${UP}/desktop-integration/libreoffice3.3-freedesktop-menus-3.3-6.noarch.rpm"
103
104 use gnome && rpm_unpack "./${UP}/${BASIS}-gnome-integration-${BVER}.${LOARCH}.rpm"
105 use java && rpm_unpack "./${UP}/${BASIS}-javafilter-${BVER}.${LOARCH}.rpm"
106
107 # Extensions
108 for k in mediawiki-publisher nlpsolver pdf-import presentation-minimizer presenter-screen report-builder; do
109 rpm_unpack "./${UP}/${BASIS}-extension-${k}-${BVER}.${LOARCH}.rpm"
110 done
111
112 # English support installed by default
113 rpm_unpack "./${UP}/${BASIS}-en-US-${BVER}.${LOARCH}.rpm"
114 rpm_unpack "./${UP}/libreoffice3-en-US-${BVER}.${LOARCH}.rpm"
115 rpm_unpack "./${UP}/libreoffice3-dict-en-${BVER}.${LOARCH}.rpm"
116 use offlinehelp && rpm_unpack "./LibO_${MY_PV2}_Linux_${LOARCH2}_helppack-rpm_en-US/RPMS//${BASIS}-en-US-help-${BVER}.${LOARCH}.rpm"
117 for s in base binfilter calc math res writer ; do
118 rpm_unpack "./${UP}/${BASIS}-en-US-${s}-${BVER}.${LOARCH}.rpm"
119 done
120
121 # Lang files
122 # TODO: Install dictionaries
123
124 strip-linguas ${LANGS}
125
126 for l in ${LINGUAS}; do
127 m="${l/_/-}"
128 if [[ ${m} != "en" ]] ; then
129 LANGDIR="LibO_${MY_PV2}_Linux_${LOARCH2}_langpack-rpm_${m}/RPMS/"
130 rpm_unpack "./${LANGDIR}/${BASIS}-${m}-${BVER}.${LOARCH}.rpm"
131 rpm_unpack "./${LANGDIR}/libreoffice3-${m}-${BVER}.${LOARCH}.rpm"
132 for n in base binfilter calc math res writer; do
133 rpm_unpack "./${LANGDIR}/${BASIS}-${m}-${n}-${BVER}.${LOARCH}.rpm"
134 done
135
136 for DICT_FILE in `find "./${LANGDIR}" -name "libreoffice3-dict-*-${BVER}.${LOARCH}.rpm"`; do
137 DICT_REGEX="s/libreoffice3-dict-(.*?)-${BVER}.${LOARCH}.rpm/\1/"
138 DICT_LOCALE=`basename "$DICT_FILE" | sed -E "${DICT_REGEX}"`
139 if [[ -n "${DICT_LOCALE}" && ! -d "${WORKDIR}/opt/libreoffice/share/extensions/dict-${DICT_LOCALE}" ]] ; then
140 rpm_unpack "${DICT_FILE}"
141 fi
142 done
143
144 # Help files
145 if use offlinehelp; then
146 LANGDIR2="LibO_${MY_PV2}_Linux_${LOARCH2}_helppack-rpm_${m}/RPMS/"
147 rpm_unpack "./${LANGDIR2}/${BASIS}-${m}-help-${BVER}.${LOARCH}.rpm"
148 fi
149 fi
150 done
151 }
152
153 src_install () {
154
155 INSTDIR="/usr/$(get_libdir)/libreoffice"
156
157 einfo "Installing OpenOffice.org into build root..."
158 dodir ${INSTDIR}
159 mv "${WORKDIR}"/opt/libreoffice/* "${ED}${INSTDIR}" || die
160
161 #Menu entries, icons and mime-types
162 cd "${ED}${INSTDIR}/share/xdg/"
163
164 for desk in base calc draw impress javafilter math printeradmin qstart startcenter writer; do
165 if [ "${desk}" = "javafilter" ] ; then
166 use java || { rm javafilter.desktop; continue; }
167 fi
168 mv ${desk}.desktop libreoffice-${desk}.desktop
169 domenu libreoffice-${desk}.desktop
170 done
171 insinto /usr/share
172 doins -r "${WORKDIR}"/usr/share/icons
173 doins -r "${WORKDIR}"/usr/share/mime
174
175 # Install wrapper script
176 newbin "${T}/wrapper.in" libreoffice
177 sed -i -e s/LIBDIR/$(get_libdir)/g "${ED}/usr/bin/libreoffice" || die
178
179 # Component symlinks
180 # Disabled, trouble with parallel installing openoffice
181 for app in base calc draw impress math writer; do
182 dosym ${INSTDIR}/program/s${app} /usr/bin/lo${app}
183 done
184
185 dosym ${INSTDIR}/program/spadmin /usr/bin/libreoffice-printeradmin
186 dosym ${INSTDIR}/program/soffice /usr/bin/soffice
187
188 rm -f "${ED}${INSTDIR}/basis-link" || die
189 dosym ${INSTDIR}/basis3.3 ${INSTDIR}/basis-link
190
191 # Non-java weirdness see bug #99366
192 use !java && rm -f "${ED}${INSTDIR}/ure/bin/javaldx"
193
194 # prevent revdep-rebuild from attempting to rebuild all the time
195 insinto /etc/revdep-rebuild && doins "${T}/50-libreoffice-bin"
196
197 }
198
199 pkg_preinst() {
200 use gnome && gnome2_icon_savelist
201 }
202
203 pkg_postinst() {
204
205 fdo-mime_desktop_database_update
206 fdo-mime_mime_database_update
207 use gnome && gnome2_icon_cache_update
208
209 pax-mark -m "${EPREFIX}"/usr/$(get_libdir)/libreoffice/program/soffice.bin
210
211 }
212
213 pkg_postrm() {
214 fdo-mime_desktop_database_update
215 use gnome && gnome2_icon_cache_update
216 }

  ViewVC Help
Powered by ViewVC 1.1.20