Magellan Linux

Contents of /branches/magellan-next/include/ooo_i18n.sminc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6654 - (show annotations) (download)
Tue Sep 14 16:46:32 2010 UTC (14 years, 2 months ago) by niro
File size: 1650 byte(s)
imported from trunk
1 # $Header: /magellan-cvs/smage/include/ooo_i18n.sminc,v 1.12 2007-09-05 16:24:17 niro Exp $
2 # functions for openoffice i18n
3 #
4 # OO_HOME, OO_LANG and OO_BUILD must be given
5 # For old smages INSTDIR is valid instead of OO_HOME
6 #
7 # depends on:
8 # needs: openoffice
9 # build: rpm2targz
10
11 # support old smages
12 if [[ -z ${OO_HOME} ]] && [[ -n ${INSTDIR} ]]
13 then
14 OO_HOME="${INSTDIR}"
15 fi
16
17 ooo_i18n_src_prepare()
18 {
19 install -d ${SRCDIR} || die
20 cd ${SRCDIR}
21
22 # install language files
23 for i in ${OO_LANG}
24 do
25 if [[ ${OO_NOUNPACK} != true ]]
26 then
27 if [ -f ${SRCDIR}/openoffice.org-${i}-${PVER}-${OO_BUILD}.tar.gz ]
28 then
29 tar xvzf ${SRCDIR}/openoffice.org-${i}-${PVER}-${OO_BUILD}.tar.gz -C ${SRCDIR} || die
30 # must be removed or rpm2targz my complain about already existing files
31 rm ${SRCDIR}/openoffice.org-${i}-${PVER}-${OO_BUILD}.tar.gz || die
32 else
33 munpack openoffice.org-${i}-${PVER}-${OO_BUILD}.tar.gz ${SRCDIR} || die
34 fi
35 fi
36
37 rpm2targz ${SRCDIR}/openoffice.org-${i}-${PVER}-${OO_BUILD}.rpm || die
38 tar xvzf ${SRCDIR}/openoffice.org-${i}-${PVER}-${OO_BUILD}.tar.gz || die
39
40 rpm2targz ${SRCDIR}/openoffice.org-${i}-help-${PVER}-${OO_BUILD}.rpm || die
41 tar xvzf ${SRCDIR}/openoffice.org-${i}-help-${PVER}-${OO_BUILD}.tar.gz || die
42
43 rpm2targz ${SRCDIR}/openoffice.org-${i}-res-${PVER}-${OO_BUILD}.rpm || die
44 tar xvzf ${SRCDIR}/openoffice.org-${i}-res-${PVER}-${OO_BUILD}.tar.gz || die
45 done
46 }
47
48 ooo_i18n_src_install()
49 {
50 cd ${SRCDIR}
51
52 # needed directories
53 install -d ${BINDIR}${OO_HOME} || die
54 mv ${SRCDIR}/opt/openoffice.org${PVER:0:3}/* ${BINDIR}${OO_HOME} || die
55 }
56
57 export_inherits ooo_i18n src_prepare src_install