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

Diff of /app-office/libreoffice-bin/libreoffice-bin-3.3.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.6 Revision 1.7
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice-bin/Attic/libreoffice-bin-3.3.1.ebuild,v 1.6 2011/03/17 13:49:58 suka Exp $ 3# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice-bin/Attic/libreoffice-bin-3.3.1.ebuild,v 1.7 2011/03/18 22:54:58 suka Exp $
4 4
5EAPI="3" 5EAPI="3"
6 6
7inherit eutils fdo-mime gnome2-utils pax-utils prefix rpm multilib 7inherit eutils fdo-mime gnome2-utils pax-utils prefix rpm multilib
8 8
12MY_PV2="${PV}rc2" 12MY_PV2="${PV}rc2"
13BVER="3.3.1-8" 13BVER="3.3.1-8"
14BVER2="3.3-8" 14BVER2="3.3-8"
15UREVER="1.7.0-8" 15UREVER="1.7.0-8"
16BASIS="libobasis3.3" 16BASIS="libobasis3.3"
17BASIS2="basis3.3"
18NM1="libreoffice"
19NM2="${NM1}3"
20NM3="${NM2}.3"
17FILEPATH="http://download.documentfoundation.org/libreoffice/stable/${PV}/rpm/" 21FILEPATH="http://download.documentfoundation.org/${NM1}/stable/${PV}/rpm/"
18 22
19if [ "${ARCH}" = "amd64" ] ; then 23if [ "${ARCH}" = "amd64" ] ; then
20 LOARCH="x86_64" 24 XARCH="x86_64"
21 LOARCH2="x86-64" 25 XARCH2="x86-64"
22else 26else
23 LOARCH="i586" 27 XARCH="i586"
24 LOARCH2="x86" 28 XARCH2="x86"
25fi 29fi
26 30
27S="${WORKDIR}/en-US/RPMS" 31S="${WORKDIR}/en-US/RPMS"
28UP="LibO_${MY_PV2}_Linux_${LOARCH2}_install-rpm_en-US/RPMS" 32UP="LibO_${MY_PV2}_Linux_${XARCH2}_install-rpm_en-US/RPMS"
29DESCRIPTION="LibreOffice productivity suite." 33DESCRIPTION="LibreOffice productivity suite."
30 34
31SRC_URI="amd64? ( ${FILEPATH}/x86_64/LibO_${PV}_Linux_x86-64_install-rpm_en-US.tar.gz 35SRC_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 ) ) 36 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 37 x86? ( ${FILEPATH}/x86/LibO_${PV}_Linux_x86_install-rpm_en-US.tar.gz
66 70
67PDEPEND="java? ( >=virtual/jre-1.5 )" 71PDEPEND="java? ( >=virtual/jre-1.5 )"
68 72
69RESTRICT="strip" 73RESTRICT="strip"
70 74
71QA_EXECSTACK="usr/$(get_libdir)/libreoffice/basis3.3/program/* 75QA_EXECSTACK="usr/$(get_libdir)/${NM1}/${BASIS2}/program/*
72 usr/$(get_libdir)/libreoffice/ure/lib/*" 76 usr/$(get_libdir)/${NM1}/ure/lib/*"
73QA_TEXTRELS="usr/$(get_libdir)/libreoffice/ure/lib/*" 77QA_TEXTRELS="usr/$(get_libdir)/${NM1}/ure/lib/*"
74QA_PRESTRIPPED="usr/$(get_libdir)/libreoffice/basis3.3/program/* 78QA_PRESTRIPPED="usr/$(get_libdir)/${NM1}/${BASIS2}/program/*
75 usr/$(get_libdir)/libreoffice/basis3.3/program/python-core-2.6.1/lib/lib-dynload/* 79 usr/$(get_libdir)/${NM1}/${BASIS2}/program/python-core-2.6.1/lib/lib-dynload/*
76 usr/$(get_libdir)/libreoffice/program/* 80 usr/$(get_libdir)/${NM1}/program/*
77 usr/$(get_libdir)/libreoffice/ure/bin/* 81 usr/$(get_libdir)/${NM1}/ure/bin/*
78 usr/$(get_libdir)/libreoffice/ure/lib/*" 82 usr/$(get_libdir)/${NM1}/ure/lib/*"
79 83
80src_unpack() { 84src_unpack() {
81 85
82 unpack ${A} 86 unpack ${A}
83 87
84 cp "${FILESDIR}"/{50-libreoffice-bin,wrapper.in} "${T}" 88 cp "${FILESDIR}"/{50-${PN},wrapper.in} "${T}"
85 eprefixify "${T}"/{50-libreoffice-bin,wrapper.in} 89 eprefixify "${T}"/{50-${PN},wrapper.in}
86 90
87 for i in base binfilter calc core01 core02 core03 core04 core05 core06 \ 91 for i in base binfilter calc core01 core02 core03 core04 core05 core06 \
88 core07 draw graphicfilter images impress math ogltrans ooofonts \ 92 core07 draw graphicfilter images impress math ogltrans ooofonts \
89 ooolinguistic pyuno testtool writer xsltfilter ; do 93 ooolinguistic pyuno testtool writer xsltfilter ; do
90 rpm_unpack "./${UP}/${BASIS}-${i}-${BVER}.${LOARCH}.rpm" 94 rpm_unpack "./${UP}/${BASIS}-${i}-${BVER}.${XARCH}.rpm"
91 done 95 done
92 96
93 rpm_unpack "./${UP}/libreoffice3-${BVER}.${LOARCH}.rpm" 97 rpm_unpack "./${UP}/${NM2}-${BVER}.${XARCH}.rpm"
94 rpm_unpack "./${UP}/libreoffice3-ure-${UREVER}.${LOARCH}.rpm" 98 rpm_unpack "./${UP}/${NM2}-ure-${UREVER}.${XARCH}.rpm"
95 99
96 for j in base calc draw impress math writer; do 100 for j in base calc draw impress math writer; do
97 rpm_unpack "./${UP}/libreoffice3-${j}-${BVER}.${LOARCH}.rpm" 101 rpm_unpack "./${UP}/${NM2}-${j}-${BVER}.${XARCH}.rpm"
98 done 102 done
99 103
100 rpm_unpack "./${UP}/desktop-integration/libreoffice3.3-freedesktop-menus-${BVER2}.noarch.rpm" 104 rpm_unpack "./${UP}/desktop-integration/${NM3}-freedesktop-menus-${BVER2}.noarch.rpm"
101 105
102 use gnome && rpm_unpack "./${UP}/${BASIS}-gnome-integration-${BVER}.${LOARCH}.rpm" 106 use gnome && rpm_unpack "./${UP}/${BASIS}-gnome-integration-${BVER}.${XARCH}.rpm"
103 use java && rpm_unpack "./${UP}/${BASIS}-javafilter-${BVER}.${LOARCH}.rpm" 107 use java && rpm_unpack "./${UP}/${BASIS}-javafilter-${BVER}.${XARCH}.rpm"
104 108
105 # Extensions 109 # Extensions
106 for k in mediawiki-publisher nlpsolver pdf-import presentation-minimizer presenter-screen report-builder; do 110 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" 111 rpm_unpack "./${UP}/${BASIS}-extension-${k}-${BVER}.${XARCH}.rpm"
108 done 112 done
109 113
110 # English support installed by default 114 # English support installed by default
111 rpm_unpack "./${UP}/${BASIS}-en-US-${BVER}.${LOARCH}.rpm" 115 rpm_unpack "./${UP}/${BASIS}-en-US-${BVER}.${XARCH}.rpm"
112 rpm_unpack "./${UP}/libreoffice3-en-US-${BVER}.${LOARCH}.rpm" 116 rpm_unpack "./${UP}/${NM2}-en-US-${BVER}.${XARCH}.rpm"
113 rpm_unpack "./${UP}/libreoffice3-dict-en-${BVER}.${LOARCH}.rpm" 117 rpm_unpack "./${UP}/${NM2}-dict-en-${BVER}.${XARCH}.rpm"
114 use offlinehelp && rpm_unpack "./LibO_${MY_PV2}_Linux_${LOARCH2}_helppack-rpm_en-US/RPMS//${BASIS}-en-US-help-${BVER}.${LOARCH}.rpm" 118 use offlinehelp && rpm_unpack "./LibO_${MY_PV2}_Linux_${XARCH2}_helppack-rpm_en-US/RPMS//${BASIS}-en-US-help-${BVER}.${XARCH}.rpm"
115 for s in base binfilter calc math res writer ; do 119 for s in base binfilter calc math res writer ; do
116 rpm_unpack "./${UP}/${BASIS}-en-US-${s}-${BVER}.${LOARCH}.rpm" 120 rpm_unpack "./${UP}/${BASIS}-en-US-${s}-${BVER}.${XARCH}.rpm"
117 done 121 done
118 122
119 # Localization 123 # Localization
120 strip-linguas ${LANGS} 124 strip-linguas ${LANGS}
121 for l in ${LINGUAS}; do 125 for l in ${LINGUAS}; do
122 m="${l/_/-}" 126 m="${l/_/-}"
123 if [[ ${m} != "en" ]] ; then 127 if [[ ${m} != "en" ]] ; then
124 LANGDIR="LibO_${MY_PV2}_Linux_${LOARCH2}_langpack-rpm_${m}/RPMS/" 128 LANGDIR="LibO_${MY_PV2}_Linux_${XARCH2}_langpack-rpm_${m}/RPMS/"
125 rpm_unpack "./${LANGDIR}/${BASIS}-${m}-${BVER}.${LOARCH}.rpm" 129 rpm_unpack "./${LANGDIR}/${BASIS}-${m}-${BVER}.${XARCH}.rpm"
126 rpm_unpack "./${LANGDIR}/libreoffice3-${m}-${BVER}.${LOARCH}.rpm" 130 rpm_unpack "./${LANGDIR}/${NM2}-${m}-${BVER}.${XARCH}.rpm"
127 for n in base binfilter calc math res writer; do 131 for n in base binfilter calc math res writer; do
128 rpm_unpack "./${LANGDIR}/${BASIS}-${m}-${n}-${BVER}.${LOARCH}.rpm" 132 rpm_unpack "./${LANGDIR}/${BASIS}-${m}-${n}-${BVER}.${XARCH}.rpm"
129 done 133 done
130 134
131 for DICT_FILE in `find "./${LANGDIR}" -name "libreoffice3-dict-*-${BVER}.${LOARCH}.rpm"`; do 135 for DICT_FILE in `find "./${LANGDIR}" -name "${NM2}-dict-*-${BVER}.${XARCH}.rpm"`; do
132 DICT_REGEX="s/libreoffice3-dict-(.*?)-${BVER}.${LOARCH}.rpm/\1/" 136 DICT_REGEX="s/${NM2}-dict-(.*?)-${BVER}.${XARCH}.rpm/\1/"
133 DICT_LOCALE=`basename "$DICT_FILE" | sed -E "${DICT_REGEX}"` 137 DICT_LOCALE=`basename "$DICT_FILE" | sed -E "${DICT_REGEX}"`
134 if [[ -n "${DICT_LOCALE}" && ! -d "${WORKDIR}/opt/libreoffice/share/extensions/dict-${DICT_LOCALE}" ]] ; then 138 if [[ -n "${DICT_LOCALE}" && ! -d "${WORKDIR}/opt/${NM1}/share/extensions/dict-${DICT_LOCALE}" ]] ; then
135 rpm_unpack "${DICT_FILE}" 139 rpm_unpack "${DICT_FILE}"
136 fi 140 fi
137 done 141 done
138 142
139 # Help files 143 # Help files
140 if use offlinehelp; then 144 if use offlinehelp; then
141 LANGDIR2="LibO_${MY_PV2}_Linux_${LOARCH2}_helppack-rpm_${m}/RPMS/" 145 LANGDIR2="LibO_${MY_PV2}_Linux_${XARCH2}_helppack-rpm_${m}/RPMS/"
142 rpm_unpack "./${LANGDIR2}/${BASIS}-${m}-help-${BVER}.${LOARCH}.rpm" 146 rpm_unpack "./${LANGDIR2}/${BASIS}-${m}-help-${BVER}.${XARCH}.rpm"
143 fi 147 fi
144 fi 148 fi
145 done 149 done
146 150
147} 151}
148 152
149src_install () { 153src_install () {
150 154
151 INSTDIR="/usr/$(get_libdir)/libreoffice" 155 INSTDIR="/usr/$(get_libdir)/${NM1}"
152
153 einfo "Installing OpenOffice.org into build root..."
154 dodir ${INSTDIR} 156 dodir ${INSTDIR}
155 mv "${WORKDIR}"/opt/libreoffice/* "${ED}${INSTDIR}" || die 157 mv "${WORKDIR}"/opt/${NM1}/* "${ED}${INSTDIR}" || die
156 158
157 #Menu entries, icons and mime-types 159 #Menu entries, icons and mime-types
158 cd "${ED}${INSTDIR}/share/xdg/" 160 cd "${ED}${INSTDIR}/share/xdg/"
159 for desk in base calc draw impress javafilter math printeradmin qstart startcenter writer; do 161 for desk in base calc draw impress javafilter math printeradmin qstart startcenter writer; do
160 if [ "${desk}" = "javafilter" ] ; then 162 if [ "${desk}" = "javafilter" ] ; then
161 use java || { rm javafilter.desktop; continue; } 163 use java || { rm javafilter.desktop; continue; }
162 fi 164 fi
163 mv ${desk}.desktop libreoffice-${desk}.desktop 165 mv ${desk}.desktop ${NM1}-${desk}.desktop
164 domenu libreoffice-${desk}.desktop 166 domenu ${NM1}-${desk}.desktop
165 done 167 done
166 insinto /usr/share 168 insinto /usr/share
167 doins -r "${WORKDIR}"/usr/share/icons 169 doins -r "${WORKDIR}"/usr/share/icons
168 doins -r "${WORKDIR}"/usr/share/mime 170 doins -r "${WORKDIR}"/usr/share/mime
169 171
170 # Install wrapper script 172 # Install wrapper script
171 newbin "${T}/wrapper.in" libreoffice 173 newbin "${T}/wrapper.in" ${NM1}
172 sed -i -e s/LIBDIR/$(get_libdir)/g "${ED}/usr/bin/libreoffice" || die 174 sed -i -e s/LIBDIR/$(get_libdir)/g "${ED}/usr/bin/${NM1}" || die
173 175
174 # Component symlinks 176 # Component symlinks
175 for app in base calc draw impress math writer; do 177 for app in base calc draw impress math writer; do
176 dosym ${INSTDIR}/program/s${app} /usr/bin/lo${app} 178 dosym ${INSTDIR}/program/s${app} /usr/bin/lo${app}
177 done 179 done
178 180
179 dosym ${INSTDIR}/program/spadmin /usr/bin/libreoffice-printeradmin 181 dosym ${INSTDIR}/program/spadmin /usr/bin/${NM1}-printeradmin
180 dosym ${INSTDIR}/program/soffice /usr/bin/soffice 182 dosym ${INSTDIR}/program/soffice /usr/bin/soffice
181 183
182 rm -f "${ED}${INSTDIR}/basis-link" || die 184 rm -f "${ED}${INSTDIR}/basis-link" || die
183 dosym ${INSTDIR}/basis3.3 ${INSTDIR}/basis-link 185 dosym ${INSTDIR}/${BASIS2} ${INSTDIR}/basis-link
184 186
185 # Non-java weirdness see bug #99366 187 # Non-java weirdness see bug #99366
186 use !java && rm -f "${ED}${INSTDIR}/ure/bin/javaldx" 188 use !java && rm -f "${ED}${INSTDIR}/ure/bin/javaldx"
187 189
188 # prevent revdep-rebuild from attempting to rebuild all the time 190 # prevent revdep-rebuild from attempting to rebuild all the time
189 insinto /etc/revdep-rebuild && doins "${T}/50-libreoffice-bin" 191 insinto /etc/revdep-rebuild && doins "${T}/50-${PN}"
190 192
191} 193}
192 194
193pkg_preinst() { 195pkg_preinst() {
194 196
200 202
201 fdo-mime_desktop_database_update 203 fdo-mime_desktop_database_update
202 fdo-mime_mime_database_update 204 fdo-mime_mime_database_update
203 use gnome && gnome2_icon_cache_update 205 use gnome && gnome2_icon_cache_update
204 206
205 pax-mark -m "${EPREFIX}"/usr/$(get_libdir)/libreoffice/program/soffice.bin 207 pax-mark -m "${EPREFIX}"/usr/$(get_libdir)/${NM1}/program/soffice.bin
206 208
207} 209}
208 210
209pkg_postrm() { 211pkg_postrm() {
210 212

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.20