/[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.2 - (hide annotations) (download)
Mon Mar 14 20:48:33 2011 UTC (3 years, 9 months ago) by hwoarang
Branch: MAIN
Changes since 1.1: +2 -2 lines
Stable on amd64 wrt bug #358909

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

1 suka 1.1 # Copyright 1999-2011 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 hwoarang 1.2 # $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice-bin/libreoffice-bin-3.3.1.ebuild,v 1.1 2011/02/23 14:34:12 suka Exp $
4 suka 1.1
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.documentfoundation.org"
48    
49     LICENSE="LGPL-3"
50     SLOT="0"
51 hwoarang 1.2 KEYWORDS="amd64 ~x86 ~amd64-linux ~x86-linux"
52 suka 1.1
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     PROVIDE="virtual/ooo"
70     RESTRICT="strip binchecks"
71    
72     QA_EXECSTACK="usr/$(get_libdir)/libreoffice/basis3.3/program/*
73     usr/$(get_libdir)/libreoffice/ure/lib/*"
74     QA_TEXTRELS="usr/$(get_libdir)/libreoffice/ure/lib/*"
75     QA_PRESTRIPPED="usr/$(get_libdir)/libreoffice/basis3.3/program/*
76     usr/$(get_libdir)/libreoffice/basis3.3/program/python-core-2.6.1/lib/lib-dynload/*
77     usr/$(get_libdir)/libreoffice/program/*
78     usr/$(get_libdir)/libreoffice/ure/bin/*
79     usr/$(get_libdir)/libreoffice/ure/lib/*"
80    
81     RESTRICT="mirror"
82    
83     src_unpack() {
84    
85     unpack ${A}
86    
87     cp "${FILESDIR}"/{50-libreoffice-bin,wrapper.in} "${T}"
88     eprefixify "${T}"/{50-libreoffice-bin,wrapper.in}
89    
90     for i in base binfilter calc core01 core02 core03 core04 core05 core06 \
91     core07 draw graphicfilter images impress math ogltrans ooofonts \
92     ooolinguistic pyuno testtool writer xsltfilter ; do
93     rpm_unpack "./${UP}/${BASIS}-${i}-${BVER}.${LOARCH}.rpm"
94     done
95    
96     rpm_unpack "./${UP}/libreoffice3-${BVER}.${LOARCH}.rpm"
97     rpm_unpack "./${UP}/libreoffice3-ure-${UREVER}.${LOARCH}.rpm"
98    
99     for j in base calc draw impress math writer; do
100     rpm_unpack "./${UP}/libreoffice3-${j}-${BVER}.${LOARCH}.rpm"
101     done
102    
103     rpm_unpack "./${UP}/desktop-integration/libreoffice3.3-freedesktop-menus-${BVER2}.noarch.rpm"
104    
105     use gnome && rpm_unpack "./${UP}/${BASIS}-gnome-integration-${BVER}.${LOARCH}.rpm"
106     use java && rpm_unpack "./${UP}/${BASIS}-javafilter-${BVER}.${LOARCH}.rpm"
107    
108     # Extensions
109     for k in mediawiki-publisher nlpsolver pdf-import presentation-minimizer presenter-screen report-builder; do
110     rpm_unpack "./${UP}/${BASIS}-extension-${k}-${BVER}.${LOARCH}.rpm"
111     done
112    
113     # English support installed by default
114     rpm_unpack "./${UP}/${BASIS}-en-US-${BVER}.${LOARCH}.rpm"
115     rpm_unpack "./${UP}/libreoffice3-en-US-${BVER}.${LOARCH}.rpm"
116     rpm_unpack "./${UP}/libreoffice3-dict-en-${BVER}.${LOARCH}.rpm"
117     use offlinehelp && rpm_unpack "./LibO_${MY_PV2}_Linux_${LOARCH2}_helppack-rpm_en-US/RPMS//${BASIS}-en-US-help-${BVER}.${LOARCH}.rpm"
118     for s in base binfilter calc math res writer ; do
119     rpm_unpack "./${UP}/${BASIS}-en-US-${s}-${BVER}.${LOARCH}.rpm"
120     done
121    
122     # Lang files
123     # TODO: Install dictionaries
124    
125     strip-linguas ${LANGS}
126    
127     for l in ${LINGUAS}; do
128     m="${l/_/-}"
129     if [[ ${m} != "en" ]] ; then
130     LANGDIR="LibO_${MY_PV2}_Linux_${LOARCH2}_langpack-rpm_${m}/RPMS/"
131     rpm_unpack "./${LANGDIR}/${BASIS}-${m}-${BVER}.${LOARCH}.rpm"
132     rpm_unpack "./${LANGDIR}/libreoffice3-${m}-${BVER}.${LOARCH}.rpm"
133     for n in base binfilter calc math res writer; do
134     rpm_unpack "./${LANGDIR}/${BASIS}-${m}-${n}-${BVER}.${LOARCH}.rpm"
135     done
136    
137     for DICT_FILE in `find "./${LANGDIR}" -name "libreoffice3-dict-*-${BVER}.${LOARCH}.rpm"`; do
138     DICT_REGEX="s/libreoffice3-dict-(.*?)-${BVER}.${LOARCH}.rpm/\1/"
139     DICT_LOCALE=`basename "$DICT_FILE" | sed -E "${DICT_REGEX}"`
140     if [[ -n "${DICT_LOCALE}" && ! -d "${WORKDIR}/opt/libreoffice/share/extensions/dict-${DICT_LOCALE}" ]] ; then
141     rpm_unpack "${DICT_FILE}"
142     fi
143     done
144    
145     # Help files
146     if use offlinehelp; then
147     LANGDIR2="LibO_${MY_PV2}_Linux_${LOARCH2}_helppack-rpm_${m}/RPMS/"
148     rpm_unpack "./${LANGDIR2}/${BASIS}-${m}-help-${BVER}.${LOARCH}.rpm"
149     fi
150     fi
151     done
152     }
153    
154     src_install () {
155    
156     INSTDIR="/usr/$(get_libdir)/libreoffice"
157    
158     einfo "Installing OpenOffice.org into build root..."
159     dodir ${INSTDIR}
160     mv "${WORKDIR}"/opt/libreoffice/* "${ED}${INSTDIR}" || die
161    
162     #Menu entries, icons and mime-types
163     cd "${ED}${INSTDIR}/share/xdg/"
164    
165     for desk in base calc draw impress javafilter math printeradmin qstart startcenter writer; do
166     if [ "${desk}" = "javafilter" ] ; then
167     use java || { rm javafilter.desktop; continue; }
168     fi
169     mv ${desk}.desktop libreoffice-${desk}.desktop
170     domenu libreoffice-${desk}.desktop
171     done
172     insinto /usr/share
173     doins -r "${WORKDIR}"/usr/share/icons
174     doins -r "${WORKDIR}"/usr/share/mime
175    
176     # Install wrapper script
177     newbin "${T}/wrapper.in" libreoffice
178     sed -i -e s/LIBDIR/$(get_libdir)/g "${ED}/usr/bin/libreoffice" || die
179    
180     # Component symlinks
181     # Disabled, trouble with parallel installing openoffice
182     for app in base calc draw impress math writer; do
183     dosym ${INSTDIR}/program/s${app} /usr/bin/lo${app}
184     done
185    
186     dosym ${INSTDIR}/program/spadmin /usr/bin/libreoffice-printeradmin
187     dosym ${INSTDIR}/program/soffice /usr/bin/soffice
188    
189     rm -f "${ED}${INSTDIR}/basis-link" || die
190     dosym ${INSTDIR}/basis3.3 ${INSTDIR}/basis-link
191    
192     # Non-java weirdness see bug #99366
193     use !java && rm -f "${ED}${INSTDIR}/ure/bin/javaldx"
194    
195     # prevent revdep-rebuild from attempting to rebuild all the time
196     insinto /etc/revdep-rebuild && doins "${T}/50-libreoffice-bin"
197    
198     }
199    
200     pkg_preinst() {
201     use gnome && gnome2_icon_savelist
202     }
203    
204     pkg_postinst() {
205    
206     fdo-mime_desktop_database_update
207     fdo-mime_mime_database_update
208     use gnome && gnome2_icon_cache_update
209    
210     pax-mark -m "${EPREFIX}"/usr/$(get_libdir)/libreoffice/program/soffice.bin
211    
212     }
213    
214     pkg_postrm() {
215     fdo-mime_desktop_database_update
216     use gnome && gnome2_icon_cache_update
217     }

  ViewVC Help
Powered by ViewVC 1.1.20