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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Tue Aug 2 11:30:34 2011 UTC (3 years ago) by suka
Branch: MAIN
Bump to LibreOffice 3.4.2

(Portage version: 2.2.0_alpha49/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     # $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice-bin/libreoffice-bin-3.4.1.ebuild,v 1.1 2011/07/06 08:40:13 suka 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}rc3"
13     BVER="3.4.2-203"
14     BVER2="3.4-203"
15     BASIS="libobasis3.4"
16     BASIS2="basis3.4"
17     NM="libreoffice"
18     NM1="${NM}"
19     NM2="${NM1}3.4"
20     FILEPATH="http://download.documentfoundation.org/${NM}/stable/${PV}/rpm/"
21     if [ "${ARCH}" = "amd64" ] ; then
22     XARCH="x86_64"
23     PACKED="LibO_${MY_PV2}_Linux_x86-64"
24     else
25     XARCH="i586"
26     PACKED="LibO_${MY_PV2}_Linux_x86"
27     fi
28     UP="${PACKED}_install-rpm_en-US/RPMS"
29    
30     DESCRIPTION="LibreOffice productivity suite."
31     HOMEPAGE="http://www.libreoffice.org"
32     SRC_URI="amd64? ( ${FILEPATH}/x86_64/LibO_${PV}_Linux_x86-64_install-rpm_en-US.tar.gz
33     offlinehelp? ( ${FILEPATH}/x86_64/LibO_${PV}_Linux_x86-64_helppack-rpm_en-US.tar.gz ) )
34     x86? ( ${FILEPATH}/x86/LibO_${PV}_Linux_x86_install-rpm_en-US.tar.gz
35     offlinehelp? ( ${FILEPATH}/x86/LibO_${PV}_Linux_x86_helppack-rpm_en-US.tar.gz ) )"
36    
37     LANGS="af ar as ast be 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 nso 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"
38    
39     LANGS2="bg bn bo bs ca ca_XV cs da de dz el en en_GB en_ZA eo es et eu fi fr gl gu he hi hr hu id is it ja ka km ko mk nb ne nl nn nso om pl pt pt_BR ru si sk sl sq sv tg tr ug uk vi zh_CN zh_TW"
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     x86? ( "${FILEPATH}"/x86/LibO_${PV}_Linux_x86_langpack-rpm_${X/_/-}.tar.gz ) )"
45     IUSE="${IUSE} linguas_${X}"
46     done
47    
48     for Y in ${LANGS2} ; do
49     [[ ${Y} != "en" ]] && SRC_URI="${SRC_URI} linguas_${Y}? (
50     amd64? ( offlinehelp? ( "${FILEPATH}"/x86_64/LibO_${PV}_Linux_x86-64_helppack-rpm_${Y/_/-}.tar.gz ) )
51     x86? ( offlinehelp? ( "${FILEPATH}"/x86/LibO_${PV}_Linux_x86_helppack-rpm_${Y/_/-}.tar.gz ) ) )"
52     done
53    
54     LICENSE="LGPL-3"
55     SLOT="0"
56     KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
57    
58     RDEPEND="!app-office/libreoffice
59     !app-office/openoffice
60     !app-office/openoffice-bin
61     !prefix? ( sys-libs/glibc )
62     app-arch/unzip
63     app-arch/zip
64     >=dev-lang/perl-5.0
65     >=media-libs/freetype-2.1.10-r2
66     x11-libs/libXaw
67     x11-libs/libXinerama"
68    
69     DEPEND="${RDEPEND}
70     sys-apps/findutils"
71    
72     PDEPEND="java? ( >=virtual/jre-1.5 )"
73    
74     RESTRICT="strip"
75    
76     QA_EXECSTACK="usr/$(get_libdir)/${NM}/${BASIS2}/program/*
77     usr/$(get_libdir)/${NM}/ure/lib/*"
78     QA_TEXTRELS="usr/$(get_libdir)/${NM}/ure/lib/*"
79     QA_PRESTRIPPED="usr/$(get_libdir)/${NM}/${BASIS2}/program/*
80     usr/$(get_libdir)/${NM}/${BASIS2}/program/python-core-2.6.1/lib/lib-dynload/*
81     usr/$(get_libdir)/${NM}/program/*
82     usr/$(get_libdir)/${NM}/ure/bin/*
83     usr/$(get_libdir)/${NM}/ure/lib/*"
84    
85     src_unpack() {
86    
87     unpack ${A}
88    
89     cp "${FILESDIR}"/{50-${PN},wrapper.in} "${T}"
90     eprefixify "${T}"/{50-${PN},wrapper.in}
91    
92     for i in base binfilter calc core01 core02 core03 core04 core05 core06 \
93     core07 draw graphicfilter images impress math ogltrans ooofonts \
94     ooolinguistic pyuno testtool writer xsltfilter ; do
95     rpm_unpack "./${UP}/${BASIS}-${i}-${BVER}.${XARCH}.rpm"
96     done
97    
98     rpm_unpack "./${UP}/${NM2}-${BVER}.${XARCH}.rpm"
99     rpm_unpack "./${UP}/${NM2}-ure-${BVER}.${XARCH}.rpm"
100    
101     for j in base calc draw impress math writer; do
102     rpm_unpack "./${UP}/${NM2}-${j}-${BVER}.${XARCH}.rpm"
103     done
104    
105     rpm_unpack "./${UP}/desktop-integration/${NM2}-freedesktop-menus-${BVER2}.noarch.rpm"
106    
107     use gnome && rpm_unpack "./${UP}/${BASIS}-gnome-integration-${BVER}.${XARCH}.rpm"
108     use java && rpm_unpack "./${UP}/${BASIS}-javafilter-${BVER}.${XARCH}.rpm"
109    
110     # Extensions
111     for k in beanshell-script-provider javascript-script-provider mediawiki-publisher nlpsolver pdf-import presentation-minimizer presenter-screen python-script-provider report-builder; do
112     rpm_unpack "./${UP}/${BASIS}-extension-${k}-${BVER}.${XARCH}.rpm"
113     done
114    
115     # English support installed by default
116     rpm_unpack "./${UP}/${BASIS}-en-US-${BVER}.${XARCH}.rpm"
117     rpm_unpack "./${UP}/${NM2}-en-US-${BVER}.${XARCH}.rpm"
118     rpm_unpack "./${UP}/${NM2}-dict-en-${BVER}.${XARCH}.rpm"
119     use offlinehelp && rpm_unpack "./${PACKED}_helppack-rpm_en-US/RPMS//${BASIS}-en-US-help-${BVER}.${XARCH}.rpm"
120     for s in base binfilter calc math res writer ; do
121     rpm_unpack "./${UP}/${BASIS}-en-US-${s}-${BVER}.${XARCH}.rpm"
122     done
123    
124     # Localization
125     strip-linguas ${LANGS}
126     for l in ${LINGUAS}; do
127     m="${l/_/-}"
128     if [[ ${m} != "en" ]] ; then
129     LANGDIR="${PACKED}_langpack-rpm_${m}/RPMS/"
130     rpm_unpack "./${LANGDIR}/${BASIS}-${m}-${BVER}.${XARCH}.rpm"
131     rpm_unpack "./${LANGDIR}/${NM2}-${m}-${BVER}.${XARCH}.rpm"
132     for n in base binfilter calc math res writer; do
133     rpm_unpack "./${LANGDIR}/${BASIS}-${m}-${n}-${BVER}.${XARCH}.rpm"
134     done
135    
136     for DICT_FILE in `find "./${LANGDIR}" -name "${NM2}-dict-*-${BVER}.${XARCH}.rpm"`; do
137     DICT_REGEX="s/${NM2}-dict-(.*?)-${BVER}.${XARCH}.rpm/\1/"
138     DICT_LOCALE=`basename "$DICT_FILE" | sed -E "${DICT_REGEX}"`
139     if [[ -n "${DICT_LOCALE}" && ! -d "${WORKDIR}/opt/${NM1}/share/extensions/dict-${DICT_LOCALE}" ]] ; then
140     rpm_unpack "${DICT_FILE}"
141     fi
142     done
143    
144     # Help files
145     if use offlinehelp; then
146     LANGDIR2="${PACKED}_helppack-rpm_${m}/RPMS/"
147     rpm_unpack "./${LANGDIR2}/${BASIS}-${m}-help-${BVER}.${XARCH}.rpm"
148     fi
149     fi
150     done
151    
152     }
153    
154     src_install () {
155    
156     INSTDIR="/usr/$(get_libdir)/${NM}"
157     dodir ${INSTDIR}
158     mv "${WORKDIR}"/opt/${NM2}/* "${ED}${INSTDIR}" || die
159    
160     #Menu entries, icons and mime-types
161     cd "${ED}${INSTDIR}/share/xdg/"
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 ${NM1}-${desk}.desktop
167     sed -i -e s/${NM2}/${NM}/g ${NM1}-${desk}.desktop || die
168     domenu ${NM1}-${desk}.desktop
169     done
170     insinto /usr/share
171     doins -r "${WORKDIR}"/usr/share/icons
172     doins -r "${WORKDIR}"/usr/share/mime
173    
174     # Install wrapper script
175     newbin "${T}/wrapper.in" ${NM1}
176     sed -i -e s/LIBDIR/$(get_libdir)/g "${ED}/usr/bin/${NM1}" || die
177    
178     dosym ${INSTDIR}/program/spadmin /usr/bin/${NM1}-printeradmin
179    
180     rm -f "${ED}${INSTDIR}/basis-link" || die
181     dosym ${INSTDIR}/${BASIS2} ${INSTDIR}/basis-link
182    
183     # Non-java weirdness see bug #99366
184     use !java && rm -f "${ED}${INSTDIR}/ure/bin/javaldx"
185    
186     # prevent revdep-rebuild from attempting to rebuild all the time
187     insinto /etc/revdep-rebuild && doins "${T}/50-${PN}"
188    
189     }
190    
191     pkg_preinst() {
192    
193     use gnome && gnome2_icon_savelist
194    
195     }
196    
197     pkg_postinst() {
198    
199     fdo-mime_desktop_database_update
200     fdo-mime_mime_database_update
201     use gnome && gnome2_icon_cache_update
202    
203     pax-mark -m "${EPREFIX}"/usr/$(get_libdir)/${NM}/program/soffice.bin
204    
205     }
206    
207     pkg_postrm() {
208    
209     fdo-mime_desktop_database_update
210     use gnome && gnome2_icon_cache_update
211    
212     }

  ViewVC Help
Powered by ViewVC 1.1.20