/[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.4 - (hide annotations) (download)
Thu Mar 17 12:29:36 2011 UTC (3 years, 7 months ago) by suka
Branch: MAIN
Changes since 1.3: +1 -3 lines
Fix up RESTRICT settings...

(Portage version: 2.2.0_alpha27/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.1.ebuild,v 1.3 2011/03/16 22:24:08 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     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     src_unpack() {
81    
82     unpack ${A}
83    
84     cp "${FILESDIR}"/{50-libreoffice-bin,wrapper.in} "${T}"
85     eprefixify "${T}"/{50-libreoffice-bin,wrapper.in}
86    
87     for i in base binfilter calc core01 core02 core03 core04 core05 core06 \
88     core07 draw graphicfilter images impress math ogltrans ooofonts \
89     ooolinguistic pyuno testtool writer xsltfilter ; do
90     rpm_unpack "./${UP}/${BASIS}-${i}-${BVER}.${LOARCH}.rpm"
91     done
92    
93     rpm_unpack "./${UP}/libreoffice3-${BVER}.${LOARCH}.rpm"
94     rpm_unpack "./${UP}/libreoffice3-ure-${UREVER}.${LOARCH}.rpm"
95    
96     for j in base calc draw impress math writer; do
97     rpm_unpack "./${UP}/libreoffice3-${j}-${BVER}.${LOARCH}.rpm"
98     done
99    
100     rpm_unpack "./${UP}/desktop-integration/libreoffice3.3-freedesktop-menus-${BVER2}.noarch.rpm"
101    
102     use gnome && rpm_unpack "./${UP}/${BASIS}-gnome-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 "./${UP}/libreoffice3-dict-en-${BVER}.${LOARCH}.rpm"
114     use offlinehelp && rpm_unpack "./LibO_${MY_PV2}_Linux_${LOARCH2}_helppack-rpm_en-US/RPMS//${BASIS}-en-US-help-${BVER}.${LOARCH}.rpm"
115     for s in base binfilter calc math res writer ; do
116     rpm_unpack "./${UP}/${BASIS}-en-US-${s}-${BVER}.${LOARCH}.rpm"
117     done
118    
119     # Lang files
120     # TODO: Install dictionaries
121    
122     strip-linguas ${LANGS}
123    
124     for l in ${LINGUAS}; do
125     m="${l/_/-}"
126     if [[ ${m} != "en" ]] ; then
127     LANGDIR="LibO_${MY_PV2}_Linux_${LOARCH2}_langpack-rpm_${m}/RPMS/"
128     rpm_unpack "./${LANGDIR}/${BASIS}-${m}-${BVER}.${LOARCH}.rpm"
129     rpm_unpack "./${LANGDIR}/libreoffice3-${m}-${BVER}.${LOARCH}.rpm"
130     for n in base binfilter calc math res writer; do
131     rpm_unpack "./${LANGDIR}/${BASIS}-${m}-${n}-${BVER}.${LOARCH}.rpm"
132     done
133    
134     for DICT_FILE in `find "./${LANGDIR}" -name "libreoffice3-dict-*-${BVER}.${LOARCH}.rpm"`; do
135     DICT_REGEX="s/libreoffice3-dict-(.*?)-${BVER}.${LOARCH}.rpm/\1/"
136     DICT_LOCALE=`basename "$DICT_FILE" | sed -E "${DICT_REGEX}"`
137     if [[ -n "${DICT_LOCALE}" && ! -d "${WORKDIR}/opt/libreoffice/share/extensions/dict-${DICT_LOCALE}" ]] ; then
138     rpm_unpack "${DICT_FILE}"
139     fi
140     done
141    
142     # Help files
143     if use offlinehelp; then
144     LANGDIR2="LibO_${MY_PV2}_Linux_${LOARCH2}_helppack-rpm_${m}/RPMS/"
145     rpm_unpack "./${LANGDIR2}/${BASIS}-${m}-help-${BVER}.${LOARCH}.rpm"
146     fi
147     fi
148     done
149     }
150    
151     src_install () {
152    
153     INSTDIR="/usr/$(get_libdir)/libreoffice"
154    
155     einfo "Installing OpenOffice.org into build root..."
156     dodir ${INSTDIR}
157     mv "${WORKDIR}"/opt/libreoffice/* "${ED}${INSTDIR}" || die
158    
159     #Menu entries, icons and mime-types
160     cd "${ED}${INSTDIR}/share/xdg/"
161    
162     for desk in base calc draw impress javafilter math printeradmin qstart startcenter writer; do
163     if [ "${desk}" = "javafilter" ] ; then
164     use java || { rm javafilter.desktop; continue; }
165     fi
166     mv ${desk}.desktop libreoffice-${desk}.desktop
167     domenu libreoffice-${desk}.desktop
168     done
169     insinto /usr/share
170     doins -r "${WORKDIR}"/usr/share/icons
171     doins -r "${WORKDIR}"/usr/share/mime
172    
173     # Install wrapper script
174     newbin "${T}/wrapper.in" libreoffice
175     sed -i -e s/LIBDIR/$(get_libdir)/g "${ED}/usr/bin/libreoffice" || die
176    
177     # Component symlinks
178     # Disabled, trouble with parallel installing openoffice
179     for app in base calc draw impress math writer; do
180     dosym ${INSTDIR}/program/s${app} /usr/bin/lo${app}
181     done
182    
183     dosym ${INSTDIR}/program/spadmin /usr/bin/libreoffice-printeradmin
184     dosym ${INSTDIR}/program/soffice /usr/bin/soffice
185    
186     rm -f "${ED}${INSTDIR}/basis-link" || die
187     dosym ${INSTDIR}/basis3.3 ${INSTDIR}/basis-link
188    
189     # Non-java weirdness see bug #99366
190     use !java && rm -f "${ED}${INSTDIR}/ure/bin/javaldx"
191    
192     # prevent revdep-rebuild from attempting to rebuild all the time
193     insinto /etc/revdep-rebuild && doins "${T}/50-libreoffice-bin"
194    
195     }
196    
197     pkg_preinst() {
198     use gnome && gnome2_icon_savelist
199     }
200    
201     pkg_postinst() {
202    
203     fdo-mime_desktop_database_update
204     fdo-mime_mime_database_update
205     use gnome && gnome2_icon_cache_update
206    
207     pax-mark -m "${EPREFIX}"/usr/$(get_libdir)/libreoffice/program/soffice.bin
208    
209     }
210    
211     pkg_postrm() {
212     fdo-mime_desktop_database_update
213     use gnome && gnome2_icon_cache_update
214     }

  ViewVC Help
Powered by ViewVC 1.1.20