/[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.4 - (hide annotations) (download)
Sat Feb 5 09:11:16 2011 UTC (3 years, 10 months ago) by suka
Branch: MAIN
Changes since 1.3: +3 -3 lines
Fix pax check, bug #353587

(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.4 # $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice-bin/libreoffice-bin-3.3.0.ebuild,v 1.3 2011/01/27 14:59:13 suka Exp $
4 suka 1.1
5     EAPI="3"
6    
7 suka 1.4 inherit eutils fdo-mime gnome2-utils pax-utils 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     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 suka 1.3 use offlinehelp && rpm_unpack "./LibO_${MY_PV2}_Linux_${LOARCH2}_helppack-rpm_en-US/RPMS//${BASIS}-en-US-help-${BVER}.${LOARCH}.rpm"
114 suka 1.1 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 suka 1.3 if use offlinehelp; then
134     LANGDIR2="LibO_${MY_PV2}_Linux_${LOARCH2}_helppack-rpm_${m}/RPMS/"
135     rpm_unpack "./${LANGDIR2}/${BASIS}-${m}-help-${BVER}.${LOARCH}.rpm"
136     fi
137 suka 1.1 fi
138     done
139     }
140    
141     src_install () {
142    
143     INSTDIR="/usr/$(get_libdir)/libreoffice"
144    
145     einfo "Installing OpenOffice.org into build root..."
146     dodir ${INSTDIR}
147     mv "${WORKDIR}"/opt/libreoffice/* "${ED}${INSTDIR}" || die
148    
149     #Menu entries, icons and mime-types
150     cd "${ED}${INSTDIR}/share/xdg/"
151    
152     for desk in base calc draw impress javafilter math printeradmin qstart startcenter writer; do
153     if [ "${desk}" = "javafilter" ] ; then
154     use java || { rm javafilter.desktop; continue; }
155     fi
156     mv ${desk}.desktop libreoffice-${desk}.desktop
157     domenu libreoffice-${desk}.desktop
158     done
159     insinto /usr/share
160     doins -r "${WORKDIR}"/usr/share/icons
161     doins -r "${WORKDIR}"/usr/share/mime
162    
163     # Install wrapper script
164     newbin "${FILESDIR}/wrapper.in" libreoffice
165     sed -i -e s/LIBDIR/$(get_libdir)/g "${ED}/usr/bin/libreoffice" || die
166    
167     # Component symlinks
168     # Disabled, trouble with parallel installing openoffice
169     for app in base calc draw impress math writer; do
170     dosym ${INSTDIR}/program/s${app} /usr/bin/lo${app}
171     done
172    
173     dosym ${INSTDIR}/program/spadmin /usr/bin/libreoffice-printeradmin
174     dosym ${INSTDIR}/program/soffice /usr/bin/soffice
175    
176     rm -f "${ED}${INSTDIR}/basis-link" || die
177     dosym ${INSTDIR}/basis3.3 ${INSTDIR}/basis-link
178    
179     # Non-java weirdness see bug #99366
180     use !java && rm -f "${ED}${INSTDIR}/ure/bin/javaldx"
181    
182     # prevent revdep-rebuild from attempting to rebuild all the time
183     insinto /etc/revdep-rebuild && doins "${FILESDIR}/50-libreoffice-bin"
184    
185     }
186    
187     pkg_preinst() {
188     use gnome && gnome2_icon_savelist
189     }
190    
191     pkg_postinst() {
192    
193     fdo-mime_desktop_database_update
194     fdo-mime_mime_database_update
195     use gnome && gnome2_icon_cache_update
196    
197 suka 1.4 pax-mark -m "${EPREFIX}"/usr/$(get_libdir)/libreoffice/program/soffice.bin
198 suka 1.1
199     elog " libreoffice-bin does not provide integration with system spell "
200     elog " dictionaries. Please install them manually through the Extensions "
201     elog " Manager (Tools > Extensions Manager) or use the source based "
202     elog " package instead. "
203     elog
204    
205     }
206    
207     pkg_postrm() {
208     fdo-mime_desktop_database_update
209     use gnome && gnome2_icon_cache_update
210     }

  ViewVC Help
Powered by ViewVC 1.1.20