/[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.12 - (hide annotations) (download)
Tue Mar 22 16:50:55 2011 UTC (3 years, 5 months ago) by suka
Branch: MAIN
Changes since 1.11: +3 -3 lines
Fix offlinehelp install, bug #359799

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

  ViewVC Help
Powered by ViewVC 1.1.20