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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Sat Feb 5 11:07:55 2011 UTC (3 years, 7 months ago) by suka
Branch: MAIN
Changes since 1.4: +9 -6 lines
Some more prefix fixes

(Portage version: 2.1.9.35/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 suka 1.5 # $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice-bin/libreoffice-bin-3.3.0.ebuild,v 1.4 2011/02/05 09:11:16 suka Exp $
4 suka 1.1
5     EAPI="3"
6    
7 suka 1.5 inherit eutils fdo-mime gnome2-utils pax-utils prefix rpm multilib
8 suka 1.1
9 suka 1.3 IUSE="gnome java kde offlinehelp"
10 suka 1.1
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 suka 1.3 offlinehelp? ( ${FILEPATH}/x86_64/LibO_${PV}_Linux_x86-64_helppack-rpm_en-US.tar.gz ) )
32 suka 1.1 x86? ( ${FILEPATH}/x86/LibO_${PV}_Linux_x86_install-rpm_en-US.tar.gz
33 suka 1.3 offlinehelp? ( ${FILEPATH}/x86/LibO_${PV}_Linux_x86_helppack-rpm_en-US.tar.gz ) )"
34 suka 1.1
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 suka 1.3 offlinehelp? ( "${FILEPATH}"/x86_64/LibO_${PV}_Linux_x86-64_helppack-rpm_${X/_/-}.tar.gz ) )
41 suka 1.1 x86? ( "${FILEPATH}"/x86/LibO_${PV}_Linux_x86_langpack-rpm_${X/_/-}.tar.gz
42 suka 1.3 offlinehelp? ( "${FILEPATH}"/x86/LibO_${PV}_Linux_x86_helppack-rpm_${X/_/-}.tar.gz ) ) )"
43 suka 1.1 IUSE="${IUSE} linguas_${X}"
44     done
45    
46     HOMEPAGE="http://www.documentfoundation.org"
47    
48     LICENSE="LGPL-3"
49     SLOT="0"
50 suka 1.5 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
51 suka 1.1
52     RDEPEND="!app-office/libreoffice
53     !app-office/openoffice
54     !app-office/openoffice-bin
55     x11-libs/libXaw
56 suka 1.5 !prefix? ( sys-libs/glibc )
57 suka 1.1 >=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 suka 1.5 cp "${FILESDIR}"/{50-libreoffice-bin,wrapper.in} "${T}"
87     eprefixify "${T}"/{50-libreoffice-bin,wrapper.in}
88    
89 suka 1.1 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 kde && rpm_unpack "./${UP}/${BASIS}-kde-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 suka 1.3 use offlinehelp && rpm_unpack "./LibO_${MY_PV2}_Linux_${LOARCH2}_helppack-rpm_en-US/RPMS//${BASIS}-en-US-help-${BVER}.${LOARCH}.rpm"
117 suka 1.1 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 suka 1.2
124     strip-linguas ${LANGS}
125    
126 suka 1.1 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     # Help files
136 suka 1.3 if use offlinehelp; then
137     LANGDIR2="LibO_${MY_PV2}_Linux_${LOARCH2}_helppack-rpm_${m}/RPMS/"
138     rpm_unpack "./${LANGDIR2}/${BASIS}-${m}-help-${BVER}.${LOARCH}.rpm"
139     fi
140 suka 1.1 fi
141     done
142     }
143    
144     src_install () {
145    
146     INSTDIR="/usr/$(get_libdir)/libreoffice"
147    
148     einfo "Installing OpenOffice.org into build root..."
149     dodir ${INSTDIR}
150     mv "${WORKDIR}"/opt/libreoffice/* "${ED}${INSTDIR}" || die
151    
152     #Menu entries, icons and mime-types
153     cd "${ED}${INSTDIR}/share/xdg/"
154    
155     for desk in base calc draw impress javafilter math printeradmin qstart startcenter writer; do
156     if [ "${desk}" = "javafilter" ] ; then
157     use java || { rm javafilter.desktop; continue; }
158     fi
159     mv ${desk}.desktop libreoffice-${desk}.desktop
160     domenu libreoffice-${desk}.desktop
161     done
162     insinto /usr/share
163     doins -r "${WORKDIR}"/usr/share/icons
164     doins -r "${WORKDIR}"/usr/share/mime
165    
166     # Install wrapper script
167 suka 1.5 newbin "${T}/wrapper.in" libreoffice
168 suka 1.1 sed -i -e s/LIBDIR/$(get_libdir)/g "${ED}/usr/bin/libreoffice" || die
169    
170     # Component symlinks
171     # Disabled, trouble with parallel installing openoffice
172     for app in base calc draw impress math writer; do
173     dosym ${INSTDIR}/program/s${app} /usr/bin/lo${app}
174     done
175    
176     dosym ${INSTDIR}/program/spadmin /usr/bin/libreoffice-printeradmin
177     dosym ${INSTDIR}/program/soffice /usr/bin/soffice
178    
179     rm -f "${ED}${INSTDIR}/basis-link" || die
180     dosym ${INSTDIR}/basis3.3 ${INSTDIR}/basis-link
181    
182     # Non-java weirdness see bug #99366
183     use !java && rm -f "${ED}${INSTDIR}/ure/bin/javaldx"
184    
185     # prevent revdep-rebuild from attempting to rebuild all the time
186 suka 1.5 insinto /etc/revdep-rebuild && doins "${T}/50-libreoffice-bin"
187 suka 1.1
188     }
189    
190     pkg_preinst() {
191     use gnome && gnome2_icon_savelist
192     }
193    
194     pkg_postinst() {
195    
196     fdo-mime_desktop_database_update
197     fdo-mime_mime_database_update
198     use gnome && gnome2_icon_cache_update
199    
200 suka 1.4 pax-mark -m "${EPREFIX}"/usr/$(get_libdir)/libreoffice/program/soffice.bin
201 suka 1.1
202     elog " libreoffice-bin does not provide integration with system spell "
203     elog " dictionaries. Please install them manually through the Extensions "
204     elog " Manager (Tools > Extensions Manager) or use the source based "
205     elog " package instead. "
206     elog
207    
208     }
209    
210     pkg_postrm() {
211     fdo-mime_desktop_database_update
212     use gnome && gnome2_icon_cache_update
213     }

  ViewVC Help
Powered by ViewVC 1.1.20