/[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.10 - (hide annotations) (download)
Sat Mar 19 15:55:44 2011 UTC (3 years, 4 months ago) by phajdan.jr
Branch: MAIN
Changes since 1.9: +2 -2 lines
x86 stable wrt bug #358909

(Portage version: 2.1.9.42/cvs/Linux i686)

1 suka 1.1 # Copyright 1999-2011 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 phajdan.jr 1.10 # $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice-bin/libreoffice-bin-3.3.1.ebuild,v 1.9 2011/03/19 00:33:12 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 suka 1.7 BASIS2="basis3.3"
18 suka 1.8 NM="libreoffice"
19     NM1="${NM}"
20 suka 1.7 NM2="${NM1}3"
21     NM3="${NM2}.3"
22 suka 1.8 FILEPATH="http://download.documentfoundation.org/${NM}/stable/${PV}/rpm/"
23 suka 1.1
24     if [ "${ARCH}" = "amd64" ] ; then
25 suka 1.7 XARCH="x86_64"
26 suka 1.8 PACKED="LibO_${MY_PV2}_Linux_x86-64"
27 suka 1.1 else
28 suka 1.7 XARCH="i586"
29 suka 1.8 PACKED="LibO_${MY_PV2}_Linux_x86"
30 suka 1.1 fi
31    
32 suka 1.8 UP="${PACKED}_install-rpm_en-US/RPMS"
33 suka 1.1 DESCRIPTION="LibreOffice productivity suite."
34    
35     SRC_URI="amd64? ( ${FILEPATH}/x86_64/LibO_${PV}_Linux_x86-64_install-rpm_en-US.tar.gz
36     offlinehelp? ( ${FILEPATH}/x86_64/LibO_${PV}_Linux_x86-64_helppack-rpm_en-US.tar.gz ) )
37     x86? ( ${FILEPATH}/x86/LibO_${PV}_Linux_x86_install-rpm_en-US.tar.gz
38     offlinehelp? ( ${FILEPATH}/x86/LibO_${PV}_Linux_x86_helppack-rpm_en-US.tar.gz ) )"
39    
40     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"
41    
42     for X in ${LANGS} ; do
43     [[ ${X} != "en" ]] && SRC_URI="${SRC_URI} linguas_${X}? (
44     amd64? ( "${FILEPATH}"/x86_64/LibO_${PV}_Linux_x86-64_langpack-rpm_${X/_/-}.tar.gz
45     offlinehelp? ( "${FILEPATH}"/x86_64/LibO_${PV}_Linux_x86-64_helppack-rpm_${X/_/-}.tar.gz ) )
46     x86? ( "${FILEPATH}"/x86/LibO_${PV}_Linux_x86_langpack-rpm_${X/_/-}.tar.gz
47     offlinehelp? ( "${FILEPATH}"/x86/LibO_${PV}_Linux_x86_helppack-rpm_${X/_/-}.tar.gz ) ) )"
48     IUSE="${IUSE} linguas_${X}"
49     done
50    
51 suka 1.5 HOMEPAGE="http://www.libreoffice.org"
52 suka 1.1
53     LICENSE="LGPL-3"
54     SLOT="0"
55 phajdan.jr 1.10 KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
56 suka 1.1
57     RDEPEND="!app-office/libreoffice
58     !app-office/openoffice
59     !app-office/openoffice-bin
60     x11-libs/libXaw
61     !prefix? ( sys-libs/glibc )
62     >=dev-lang/perl-5.0
63     app-arch/zip
64     app-arch/unzip
65     x11-libs/libXinerama
66     >=media-libs/freetype-2.1.10-r2"
67    
68     DEPEND="${RDEPEND}
69     sys-apps/findutils"
70    
71     PDEPEND="java? ( >=virtual/jre-1.5 )"
72    
73 suka 1.6 RESTRICT="strip"
74 suka 1.1
75 suka 1.8 QA_EXECSTACK="usr/$(get_libdir)/${NM}/${BASIS2}/program/*
76     usr/$(get_libdir)/${NM}/ure/lib/*"
77     QA_TEXTRELS="usr/$(get_libdir)/${NM}/ure/lib/*"
78     QA_PRESTRIPPED="usr/$(get_libdir)/${NM}/${BASIS2}/program/*
79     usr/$(get_libdir)/${NM}/${BASIS2}/program/python-core-2.6.1/lib/lib-dynload/*
80     usr/$(get_libdir)/${NM}/program/*
81     usr/$(get_libdir)/${NM}/ure/bin/*
82     usr/$(get_libdir)/${NM}/ure/lib/*"
83 suka 1.1
84     src_unpack() {
85    
86     unpack ${A}
87    
88 suka 1.7 cp "${FILESDIR}"/{50-${PN},wrapper.in} "${T}"
89     eprefixify "${T}"/{50-${PN},wrapper.in}
90 suka 1.1
91     for i in base binfilter calc core01 core02 core03 core04 core05 core06 \
92     core07 draw graphicfilter images impress math ogltrans ooofonts \
93     ooolinguistic pyuno testtool writer xsltfilter ; do
94 suka 1.7 rpm_unpack "./${UP}/${BASIS}-${i}-${BVER}.${XARCH}.rpm"
95 suka 1.1 done
96    
97 suka 1.7 rpm_unpack "./${UP}/${NM2}-${BVER}.${XARCH}.rpm"
98     rpm_unpack "./${UP}/${NM2}-ure-${UREVER}.${XARCH}.rpm"
99 suka 1.1
100     for j in base calc draw impress math writer; do
101 suka 1.7 rpm_unpack "./${UP}/${NM2}-${j}-${BVER}.${XARCH}.rpm"
102 suka 1.1 done
103    
104 suka 1.7 rpm_unpack "./${UP}/desktop-integration/${NM3}-freedesktop-menus-${BVER2}.noarch.rpm"
105 suka 1.1
106 suka 1.7 use gnome && rpm_unpack "./${UP}/${BASIS}-gnome-integration-${BVER}.${XARCH}.rpm"
107     use java && rpm_unpack "./${UP}/${BASIS}-javafilter-${BVER}.${XARCH}.rpm"
108 suka 1.1
109     # Extensions
110     for k in mediawiki-publisher nlpsolver pdf-import presentation-minimizer presenter-screen report-builder; do
111 suka 1.7 rpm_unpack "./${UP}/${BASIS}-extension-${k}-${BVER}.${XARCH}.rpm"
112 suka 1.1 done
113    
114     # English support installed by default
115 suka 1.7 rpm_unpack "./${UP}/${BASIS}-en-US-${BVER}.${XARCH}.rpm"
116     rpm_unpack "./${UP}/${NM2}-en-US-${BVER}.${XARCH}.rpm"
117     rpm_unpack "./${UP}/${NM2}-dict-en-${BVER}.${XARCH}.rpm"
118     use offlinehelp && rpm_unpack "./LibO_${MY_PV2}_Linux_${XARCH2}_helppack-rpm_en-US/RPMS//${BASIS}-en-US-help-${BVER}.${XARCH}.rpm"
119 suka 1.1 for s in base binfilter calc math res writer ; do
120 suka 1.7 rpm_unpack "./${UP}/${BASIS}-en-US-${s}-${BVER}.${XARCH}.rpm"
121 suka 1.1 done
122    
123 suka 1.5 # Localization
124 suka 1.1 strip-linguas ${LANGS}
125     for l in ${LINGUAS}; do
126     m="${l/_/-}"
127     if [[ ${m} != "en" ]] ; then
128 suka 1.8 LANGDIR="${PACKED}_langpack-rpm_${m}/RPMS/"
129 suka 1.7 rpm_unpack "./${LANGDIR}/${BASIS}-${m}-${BVER}.${XARCH}.rpm"
130     rpm_unpack "./${LANGDIR}/${NM2}-${m}-${BVER}.${XARCH}.rpm"
131 suka 1.1 for n in base binfilter calc math res writer; do
132 suka 1.7 rpm_unpack "./${LANGDIR}/${BASIS}-${m}-${n}-${BVER}.${XARCH}.rpm"
133 suka 1.1 done
134    
135 suka 1.7 for DICT_FILE in `find "./${LANGDIR}" -name "${NM2}-dict-*-${BVER}.${XARCH}.rpm"`; do
136     DICT_REGEX="s/${NM2}-dict-(.*?)-${BVER}.${XARCH}.rpm/\1/"
137 suka 1.1 DICT_LOCALE=`basename "$DICT_FILE" | sed -E "${DICT_REGEX}"`
138 suka 1.7 if [[ -n "${DICT_LOCALE}" && ! -d "${WORKDIR}/opt/${NM1}/share/extensions/dict-${DICT_LOCALE}" ]] ; then
139 suka 1.1 rpm_unpack "${DICT_FILE}"
140     fi
141     done
142    
143     # Help files
144     if use offlinehelp; then
145 suka 1.7 LANGDIR2="LibO_${MY_PV2}_Linux_${XARCH2}_helppack-rpm_${m}/RPMS/"
146     rpm_unpack "./${LANGDIR2}/${BASIS}-${m}-help-${BVER}.${XARCH}.rpm"
147 suka 1.1 fi
148     fi
149     done
150 suka 1.5
151 suka 1.1 }
152    
153     src_install () {
154    
155 suka 1.8 INSTDIR="/usr/$(get_libdir)/${NM}"
156 suka 1.1 dodir ${INSTDIR}
157 suka 1.7 mv "${WORKDIR}"/opt/${NM1}/* "${ED}${INSTDIR}" || die
158 suka 1.1
159     #Menu entries, icons and mime-types
160     cd "${ED}${INSTDIR}/share/xdg/"
161     for desk in base calc draw impress javafilter math printeradmin qstart startcenter writer; do
162     if [ "${desk}" = "javafilter" ] ; then
163     use java || { rm javafilter.desktop; continue; }
164     fi
165 suka 1.7 mv ${desk}.desktop ${NM1}-${desk}.desktop
166     domenu ${NM1}-${desk}.desktop
167 suka 1.1 done
168     insinto /usr/share
169     doins -r "${WORKDIR}"/usr/share/icons
170     doins -r "${WORKDIR}"/usr/share/mime
171    
172     # Install wrapper script
173 suka 1.7 newbin "${T}/wrapper.in" ${NM1}
174     sed -i -e s/LIBDIR/$(get_libdir)/g "${ED}/usr/bin/${NM1}" || die
175 suka 1.1
176     # Component symlinks
177     for app in base calc draw impress math writer; do
178     dosym ${INSTDIR}/program/s${app} /usr/bin/lo${app}
179     done
180    
181 suka 1.7 dosym ${INSTDIR}/program/spadmin /usr/bin/${NM1}-printeradmin
182 suka 1.1 dosym ${INSTDIR}/program/soffice /usr/bin/soffice
183    
184     rm -f "${ED}${INSTDIR}/basis-link" || die
185 suka 1.7 dosym ${INSTDIR}/${BASIS2} ${INSTDIR}/basis-link
186 suka 1.1
187     # Non-java weirdness see bug #99366
188     use !java && rm -f "${ED}${INSTDIR}/ure/bin/javaldx"
189    
190     # prevent revdep-rebuild from attempting to rebuild all the time
191 suka 1.7 insinto /etc/revdep-rebuild && doins "${T}/50-${PN}"
192 suka 1.1
193     }
194    
195     pkg_preinst() {
196 suka 1.5
197 suka 1.1 use gnome && gnome2_icon_savelist
198 suka 1.5
199 suka 1.1 }
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 suka 1.8 pax-mark -m "${EPREFIX}"/usr/$(get_libdir)/${NM}/program/soffice.bin
208 suka 1.1
209     }
210    
211     pkg_postrm() {
212 suka 1.5
213 suka 1.1 fdo-mime_desktop_database_update
214     use gnome && gnome2_icon_cache_update
215 suka 1.5
216 suka 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20