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

Contents of /app-office/libreoffice-bin/libreoffice-bin-3.3.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Tue May 15 22:02:23 2012 UTC (2 years, 5 months ago) by dilfridge
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Drop ancient

(Portage version: 2.2.0_alpha104/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20