/[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.2 - (hide annotations) (download)
Thu Jan 27 10:25:00 2011 UTC (4 years, 2 months ago) by suka
Branch: MAIN
Changes since 1.1: +4 -1 lines
Add accidentally lost strip-linguas statement, bug #352820

(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.2 # $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice-bin/libreoffice-bin-3.3.0.ebuild,v 1.1 2011/01/25 13:39:30 suka Exp $
4 suka 1.1
5     EAPI="3"
6    
7     inherit eutils fdo-mime gnome2-utils rpm multilib
8    
9     IUSE="gnome java kde"
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     ${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     ${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     "${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     "${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"
51    
52     RDEPEND="!app-office/libreoffice
53     !app-office/openoffice
54     !app-office/openoffice-bin
55     x11-libs/libXaw
56     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     for i in base binfilter calc core01 core02 core03 core04 core05 core06 \
87     core07 draw graphicfilter images impress math ogltrans ooofonts \
88     ooolinguistic pyuno testtool writer xsltfilter ; do
89     rpm_unpack "./${UP}/${BASIS}-${i}-${BVER}.${LOARCH}.rpm"
90     done
91    
92     rpm_unpack "./${UP}/libreoffice3-${BVER}.${LOARCH}.rpm"
93     rpm_unpack "./${UP}/libreoffice3-ure-${UREVER}.${LOARCH}.rpm"
94    
95     for j in base calc draw impress math writer; do
96     rpm_unpack "./${UP}/libreoffice3-${j}-${BVER}.${LOARCH}.rpm"
97     done
98    
99     rpm_unpack "./${UP}/desktop-integration/libreoffice3.3-freedesktop-menus-3.3-6.noarch.rpm"
100    
101     use gnome && rpm_unpack "./${UP}/${BASIS}-gnome-integration-${BVER}.${LOARCH}.rpm"
102     use kde && rpm_unpack "./${UP}/${BASIS}-kde-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 "./LibO_${MY_PV2}_Linux_${LOARCH2}_helppack-rpm_en-US/RPMS//${BASIS}-en-US-help-${BVER}.${LOARCH}.rpm"
114     for s in base binfilter calc math res writer ; do
115     rpm_unpack "./${UP}/${BASIS}-en-US-${s}-${BVER}.${LOARCH}.rpm"
116     done
117    
118     # Lang files
119     # TODO: Install dictionaries
120 suka 1.2
121     strip-linguas ${LANGS}
122    
123 suka 1.1 for l in ${LINGUAS}; do
124     m="${l/_/-}"
125     if [[ ${m} != "en" ]] ; then
126     LANGDIR="LibO_${MY_PV2}_Linux_${LOARCH2}_langpack-rpm_${m}/RPMS/"
127     rpm_unpack "./${LANGDIR}/${BASIS}-${m}-${BVER}.${LOARCH}.rpm"
128     rpm_unpack "./${LANGDIR}/libreoffice3-${m}-${BVER}.${LOARCH}.rpm"
129     for n in base binfilter calc math res writer; do
130     rpm_unpack "./${LANGDIR}/${BASIS}-${m}-${n}-${BVER}.${LOARCH}.rpm"
131     done
132     # Help files
133     LANGDIR2="LibO_${MY_PV2}_Linux_${LOARCH2}_helppack-rpm_${m}/RPMS/"
134     rpm_unpack "./${LANGDIR2}/${BASIS}-${m}-help-${BVER}.${LOARCH}.rpm"
135     fi
136     done
137     }
138    
139     src_install () {
140    
141     INSTDIR="/usr/$(get_libdir)/libreoffice"
142    
143     einfo "Installing OpenOffice.org into build root..."
144     dodir ${INSTDIR}
145     mv "${WORKDIR}"/opt/libreoffice/* "${ED}${INSTDIR}" || die
146    
147     #Menu entries, icons and mime-types
148     cd "${ED}${INSTDIR}/share/xdg/"
149    
150     for desk in base calc draw impress javafilter math printeradmin qstart startcenter writer; do
151     if [ "${desk}" = "javafilter" ] ; then
152     use java || { rm javafilter.desktop; continue; }
153     fi
154     mv ${desk}.desktop libreoffice-${desk}.desktop
155     domenu libreoffice-${desk}.desktop
156     done
157     insinto /usr/share
158     doins -r "${WORKDIR}"/usr/share/icons
159     doins -r "${WORKDIR}"/usr/share/mime
160    
161     # Install wrapper script
162     newbin "${FILESDIR}/wrapper.in" libreoffice
163     sed -i -e s/LIBDIR/$(get_libdir)/g "${ED}/usr/bin/libreoffice" || die
164    
165     # Component symlinks
166     # Disabled, trouble with parallel installing openoffice
167     for app in base calc draw impress math writer; do
168     dosym ${INSTDIR}/program/s${app} /usr/bin/lo${app}
169     done
170    
171     dosym ${INSTDIR}/program/spadmin /usr/bin/libreoffice-printeradmin
172     dosym ${INSTDIR}/program/soffice /usr/bin/soffice
173    
174     rm -f "${ED}${INSTDIR}/basis-link" || die
175     dosym ${INSTDIR}/basis3.3 ${INSTDIR}/basis-link
176    
177     # Non-java weirdness see bug #99366
178     use !java && rm -f "${ED}${INSTDIR}/ure/bin/javaldx"
179    
180     # prevent revdep-rebuild from attempting to rebuild all the time
181     insinto /etc/revdep-rebuild && doins "${FILESDIR}/50-libreoffice-bin"
182    
183     }
184    
185     pkg_preinst() {
186     use gnome && gnome2_icon_savelist
187     }
188    
189     pkg_postinst() {
190    
191     fdo-mime_desktop_database_update
192     fdo-mime_mime_database_update
193     use gnome && gnome2_icon_cache_update
194    
195     [[ -x /sbin/chpax ]] && [[ -e /usr/$(get_libdir)/libreoffice/program/soffice.bin ]] && chpax -zm /usr/$(get_libdir)/libreoffice/program/soffice.bin
196    
197     elog " libreoffice-bin does not provide integration with system spell "
198     elog " dictionaries. Please install them manually through the Extensions "
199     elog " Manager (Tools > Extensions Manager) or use the source based "
200     elog " package instead. "
201     elog
202    
203     }
204    
205     pkg_postrm() {
206     fdo-mime_desktop_database_update
207     use gnome && gnome2_icon_cache_update
208     }

  ViewVC Help
Powered by ViewVC 1.1.20