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

Contents of /app-office/libreoffice-bin/libreoffice-bin-3.3.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Thu Mar 17 13:06:21 2011 UTC (3 years, 3 months ago) by suka
Branch: MAIN
Changes since 1.4: +8 -8 lines
Minor ebuild cleanups, fix homepage entry

(Portage version: 2.2.0_alpha27/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.1.ebuild,v 1.4 2011/03/17 12:29:36 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}rc2"
13 BVER="3.3.1-8"
14 BVER2="3.3-8"
15 UREVER="1.7.0-8"
16 BASIS="libobasis3.3"
17 FILEPATH="http://download.documentfoundation.org/libreoffice/stable/${PV}/rpm/"
18
19 if [ "${ARCH}" = "amd64" ] ; then
20 LOARCH="x86_64"
21 LOARCH2="x86-64"
22 else
23 LOARCH="i586"
24 LOARCH2="x86"
25 fi
26
27 S="${WORKDIR}/en-US/RPMS"
28 UP="LibO_${MY_PV2}_Linux_${LOARCH2}_install-rpm_en-US/RPMS"
29 DESCRIPTION="LibreOffice productivity suite."
30
31 SRC_URI="amd64? ( ${FILEPATH}/x86_64/LibO_${PV}_Linux_x86-64_install-rpm_en-US.tar.gz
32 offlinehelp? ( ${FILEPATH}/x86_64/LibO_${PV}_Linux_x86-64_helppack-rpm_en-US.tar.gz ) )
33 x86? ( ${FILEPATH}/x86/LibO_${PV}_Linux_x86_install-rpm_en-US.tar.gz
34 offlinehelp? ( ${FILEPATH}/x86/LibO_${PV}_Linux_x86_helppack-rpm_en-US.tar.gz ) )"
35
36 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 gl gu he hi hr hu id is it ja ka kk km kn ko kok ks ku lo lt lv mai mk ml mn mni mr my nb ne nl nn nr ns oc om or pa_IN pl 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 tn tr ts ug uk uz ve vi xh zh_CN zh_TW zu"
37
38 for X in ${LANGS} ; do
39 [[ ${X} != "en" ]] && SRC_URI="${SRC_URI} linguas_${X}? (
40 amd64? ( "${FILEPATH}"/x86_64/LibO_${PV}_Linux_x86-64_langpack-rpm_${X/_/-}.tar.gz
41 offlinehelp? ( "${FILEPATH}"/x86_64/LibO_${PV}_Linux_x86-64_helppack-rpm_${X/_/-}.tar.gz ) )
42 x86? ( "${FILEPATH}"/x86/LibO_${PV}_Linux_x86_langpack-rpm_${X/_/-}.tar.gz
43 offlinehelp? ( "${FILEPATH}"/x86/LibO_${PV}_Linux_x86_helppack-rpm_${X/_/-}.tar.gz ) ) )"
44 IUSE="${IUSE} linguas_${X}"
45 done
46
47 HOMEPAGE="http://www.libreoffice.org"
48
49 LICENSE="LGPL-3"
50 SLOT="0"
51 KEYWORDS="amd64 ~x86 ~amd64-linux ~x86-linux"
52
53 RDEPEND="!app-office/libreoffice
54 !app-office/openoffice
55 !app-office/openoffice-bin
56 x11-libs/libXaw
57 !prefix? ( sys-libs/glibc )
58 >=dev-lang/perl-5.0
59 app-arch/zip
60 app-arch/unzip
61 x11-libs/libXinerama
62 >=media-libs/freetype-2.1.10-r2"
63
64 DEPEND="${RDEPEND}
65 sys-apps/findutils"
66
67 PDEPEND="java? ( >=virtual/jre-1.5 )"
68
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 src_unpack() {
81
82 unpack ${A}
83
84 cp "${FILESDIR}"/{50-libreoffice-bin,wrapper.in} "${T}"
85 eprefixify "${T}"/{50-libreoffice-bin,wrapper.in}
86
87 for i in base binfilter calc core01 core02 core03 core04 core05 core06 \
88 core07 draw graphicfilter images impress math ogltrans ooofonts \
89 ooolinguistic pyuno testtool writer xsltfilter ; do
90 rpm_unpack "./${UP}/${BASIS}-${i}-${BVER}.${LOARCH}.rpm"
91 done
92
93 rpm_unpack "./${UP}/libreoffice3-${BVER}.${LOARCH}.rpm"
94 rpm_unpack "./${UP}/libreoffice3-ure-${UREVER}.${LOARCH}.rpm"
95
96 for j in base calc draw impress math writer; do
97 rpm_unpack "./${UP}/libreoffice3-${j}-${BVER}.${LOARCH}.rpm"
98 done
99
100 rpm_unpack "./${UP}/desktop-integration/libreoffice3.3-freedesktop-menus-${BVER2}.noarch.rpm"
101
102 use gnome && rpm_unpack "./${UP}/${BASIS}-gnome-integration-${BVER}.${LOARCH}.rpm"
103 use java && rpm_unpack "./${UP}/${BASIS}-javafilter-${BVER}.${LOARCH}.rpm"
104
105 # Extensions
106 for k in mediawiki-publisher nlpsolver pdf-import presentation-minimizer presenter-screen report-builder; do
107 rpm_unpack "./${UP}/${BASIS}-extension-${k}-${BVER}.${LOARCH}.rpm"
108 done
109
110 # English support installed by default
111 rpm_unpack "./${UP}/${BASIS}-en-US-${BVER}.${LOARCH}.rpm"
112 rpm_unpack "./${UP}/libreoffice3-en-US-${BVER}.${LOARCH}.rpm"
113 rpm_unpack "./${UP}/libreoffice3-dict-en-${BVER}.${LOARCH}.rpm"
114 use offlinehelp && rpm_unpack "./LibO_${MY_PV2}_Linux_${LOARCH2}_helppack-rpm_en-US/RPMS//${BASIS}-en-US-help-${BVER}.${LOARCH}.rpm"
115 for s in base binfilter calc math res writer ; do
116 rpm_unpack "./${UP}/${BASIS}-en-US-${s}-${BVER}.${LOARCH}.rpm"
117 done
118
119 # Localization
120 strip-linguas ${LANGS}
121 for l in ${LINGUAS}; do
122 m="${l/_/-}"
123 if [[ ${m} != "en" ]] ; then
124 LANGDIR="LibO_${MY_PV2}_Linux_${LOARCH2}_langpack-rpm_${m}/RPMS/"
125 rpm_unpack "./${LANGDIR}/${BASIS}-${m}-${BVER}.${LOARCH}.rpm"
126 rpm_unpack "./${LANGDIR}/libreoffice3-${m}-${BVER}.${LOARCH}.rpm"
127 for n in base binfilter calc math res writer; do
128 rpm_unpack "./${LANGDIR}/${BASIS}-${m}-${n}-${BVER}.${LOARCH}.rpm"
129 done
130
131 for DICT_FILE in `find "./${LANGDIR}" -name "libreoffice3-dict-*-${BVER}.${LOARCH}.rpm"`; do
132 DICT_REGEX="s/libreoffice3-dict-(.*?)-${BVER}.${LOARCH}.rpm/\1/"
133 DICT_LOCALE=`basename "$DICT_FILE" | sed -E "${DICT_REGEX}"`
134 if [[ -n "${DICT_LOCALE}" && ! -d "${WORKDIR}/opt/libreoffice/share/extensions/dict-${DICT_LOCALE}" ]] ; then
135 rpm_unpack "${DICT_FILE}"
136 fi
137 done
138
139 # Help files
140 if use offlinehelp; then
141 LANGDIR2="LibO_${MY_PV2}_Linux_${LOARCH2}_helppack-rpm_${m}/RPMS/"
142 rpm_unpack "./${LANGDIR2}/${BASIS}-${m}-help-${BVER}.${LOARCH}.rpm"
143 fi
144 fi
145 done
146
147 }
148
149 src_install () {
150
151 INSTDIR="/usr/$(get_libdir)/libreoffice"
152
153 einfo "Installing OpenOffice.org into build root..."
154 dodir ${INSTDIR}
155 mv "${WORKDIR}"/opt/libreoffice/* "${ED}${INSTDIR}" || die
156
157 #Menu entries, icons and mime-types
158 cd "${ED}${INSTDIR}/share/xdg/"
159 for desk in base calc draw impress javafilter math printeradmin qstart startcenter writer; do
160 if [ "${desk}" = "javafilter" ] ; then
161 use java || { rm javafilter.desktop; continue; }
162 fi
163 mv ${desk}.desktop libreoffice-${desk}.desktop
164 domenu libreoffice-${desk}.desktop
165 done
166 insinto /usr/share
167 doins -r "${WORKDIR}"/usr/share/icons
168 doins -r "${WORKDIR}"/usr/share/mime
169
170 # Install wrapper script
171 newbin "${T}/wrapper.in" libreoffice
172 sed -i -e s/LIBDIR/$(get_libdir)/g "${ED}/usr/bin/libreoffice" || die
173
174 # Component symlinks
175 for app in base calc draw impress math writer; do
176 dosym ${INSTDIR}/program/s${app} /usr/bin/lo${app}
177 done
178
179 dosym ${INSTDIR}/program/spadmin /usr/bin/libreoffice-printeradmin
180 dosym ${INSTDIR}/program/soffice /usr/bin/soffice
181
182 rm -f "${ED}${INSTDIR}/basis-link" || die
183 dosym ${INSTDIR}/basis3.3 ${INSTDIR}/basis-link
184
185 # Non-java weirdness see bug #99366
186 use !java && rm -f "${ED}${INSTDIR}/ure/bin/javaldx"
187
188 # prevent revdep-rebuild from attempting to rebuild all the time
189 insinto /etc/revdep-rebuild && doins "${T}/50-libreoffice-bin"
190
191 }
192
193 pkg_preinst() {
194
195 use gnome && gnome2_icon_savelist
196
197 }
198
199 pkg_postinst() {
200
201 fdo-mime_desktop_database_update
202 fdo-mime_mime_database_update
203 use gnome && gnome2_icon_cache_update
204
205 pax-mark -m "${EPREFIX}"/usr/$(get_libdir)/libreoffice/program/soffice.bin
206
207 }
208
209 pkg_postrm() {
210
211 fdo-mime_desktop_database_update
212 use gnome && gnome2_icon_cache_update
213
214 }

  ViewVC Help
Powered by ViewVC 1.1.20