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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Tue Jan 25 13:39:31 2011 UTC (3 years, 7 months ago) by suka
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Bump to final release, also fix some of the wrapper, desktop-file mess

(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.3 # $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice-bin/libreoffice-bin-3.3.0_rc4.ebuild,v 1.2 2011/01/24 20:04:27 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/_/}"
13     BVER="3.3.0-6"
14     UREVER="1.7.0-6"
15     BASIS="libobasis3.3"
16     FILEPATH="http://download.documentfoundation.org/libreoffice/testing/${MY_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_${MY_PV2}_Linux_x86-64_install-rpm_en-US.tar.gz
31     ${FILEPATH}/x86_64/LibO_${MY_PV2}_Linux_x86-64_helppack-rpm_en-US.tar.gz )
32     x86? ( ${FILEPATH}/x86/LibO_${MY_PV2}_Linux_x86_install-rpm_en-US.tar.gz
33     ${FILEPATH}/x86/LibO_${MY_PV2}_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_${MY_PV2}_Linux_x86-64_langpack-rpm_${X/_/-}.tar.gz
40     "${FILEPATH}"/x86_64/LibO_${MY_PV2}_Linux_x86-64_helppack-rpm_${X/_/-}.tar.gz )
41     x86? ( "${FILEPATH}"/x86/LibO_${MY_PV2}_Linux_x86_langpack-rpm_${X/_/-}.tar.gz
42     "${FILEPATH}"/x86/LibO_${MY_PV2}_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 suka 1.2 RDEPEND="!app-office/libreoffice
53     !app-office/openoffice
54     !app-office/openoffice-bin
55     x11-libs/libXaw
56 suka 1.1 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     for l in ${LINGUAS}; do
121     m="${l/_/-}"
122     if [[ ${m} != "en" ]] ; then
123     LANGDIR="LibO_${MY_PV2}_Linux_${LOARCH2}_langpack-rpm_${m}/RPMS/"
124     rpm_unpack "./${LANGDIR}/${BASIS}-${m}-${BVER}.${LOARCH}.rpm"
125     rpm_unpack "./${LANGDIR}/libreoffice3-${m}-${BVER}.${LOARCH}.rpm"
126     for n in base binfilter calc math res writer; do
127     rpm_unpack "./${LANGDIR}/${BASIS}-${m}-${n}-${BVER}.${LOARCH}.rpm"
128     done
129     # Help files
130     LANGDIR2="LibO_${MY_PV2}_Linux_${LOARCH2}_helppack-rpm_${m}/RPMS/"
131     rpm_unpack "./${LANGDIR2}/${BASIS}-${m}-help-${BVER}.${LOARCH}.rpm"
132     fi
133     done
134     }
135    
136     src_install () {
137    
138     INSTDIR="/usr/$(get_libdir)/libreoffice"
139    
140     einfo "Installing OpenOffice.org into build root..."
141     dodir ${INSTDIR}
142     mv "${WORKDIR}"/opt/libreoffice/* "${ED}${INSTDIR}" || die
143    
144     #Menu entries, icons and mime-types
145     cd "${ED}${INSTDIR}/share/xdg/"
146    
147     for desk in base calc draw impress javafilter math printeradmin qstart startcenter writer; do
148     if [ "${desk}" = "javafilter" ] ; then
149     use java || { rm javafilter.desktop; continue; }
150     fi
151     mv ${desk}.desktop libreoffice-${desk}.desktop
152     sed -i -e s/Exec=libreoffice/Exec=loffice/g libreoffice-${desk}.desktop || die
153     domenu libreoffice-${desk}.desktop
154     done
155     insinto /usr/share
156     doins -r "${WORKDIR}"/usr/share/icons
157     doins -r "${WORKDIR}"/usr/share/mime
158    
159     # Install wrapper script
160     newbin "${FILESDIR}/wrapper.in" loffice
161     sed -i -e s/LIBDIR/$(get_libdir)/g "${ED}/usr/bin/loffice" || die
162    
163     # Component symlinks
164     # Disabled, trouble with parallel installing openoffice
165 suka 1.2 for app in base calc draw impress math writer; do
166     dosym loffice /usr/bin/lo${app}
167     done
168 suka 1.1
169     dosym ${INSTDIR}/program/spadmin /usr/bin/loffice-printeradmin
170 suka 1.2 dosym ${INSTDIR}/program/soffice /usr/bin/soffice
171 suka 1.1
172     rm -f "${ED}${INSTDIR}/basis-link" || die
173     dosym ${INSTDIR}/basis3.3 ${INSTDIR}/basis-link
174    
175     # Non-java weirdness see bug #99366
176     use !java && rm -f "${ED}${INSTDIR}/ure/bin/javaldx"
177    
178     # prevent revdep-rebuild from attempting to rebuild all the time
179     insinto /etc/revdep-rebuild && doins "${FILESDIR}/50-libreoffice-bin"
180    
181     }
182    
183     pkg_preinst() {
184     use gnome && gnome2_icon_savelist
185     }
186    
187     pkg_postinst() {
188    
189     fdo-mime_desktop_database_update
190     fdo-mime_mime_database_update
191     use gnome && gnome2_icon_cache_update
192    
193     [[ -x /sbin/chpax ]] && [[ -e /usr/$(get_libdir)/libreoffice/program/soffice.bin ]] && chpax -zm /usr/$(get_libdir)/libreoffice/program/soffice.bin
194    
195     elog " libreoffice-bin does not provide integration with system spell "
196     elog " dictionaries. Please install them manually through the Extensions "
197     elog " Manager (Tools > Extensions Manager) or use the source based "
198     elog " package instead. "
199     elog
200    
201     }
202    
203     pkg_postrm() {
204     fdo-mime_desktop_database_update
205     use gnome && gnome2_icon_cache_update
206     }

  ViewVC Help
Powered by ViewVC 1.1.20