Magellan Linux

Annotation of /branches/magellan-next/include/ooo3_i18n.sminc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5145 - (hide annotations) (download)
Wed Mar 10 23:20:14 2010 UTC (14 years, 7 months ago) by niro
Original Path: trunk/core/include/ooo3_i18n.sminc
File size: 1486 byte(s)
-ooo3 compat
1 niro 5145 # $Id$
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     local i
23     local x
24    
25     # install language files
26     for i in ${OO_LANG}
27     do
28     if [[ ${OO_NOUNPACK} != true ]]
29     then
30     if [ -f ${SRCDIR}/openoffice.org-${i}-${PVER}-${OO_BUILD}.tar.gz ]
31     then
32     tar xvzf ${SRCDIR}/openoffice.org-${i}-${PVER}-${OO_BUILD}.tar.gz -C ${SRCDIR} || die
33     # must be removed or rpm2targz my complain about already existing files
34     rm ${SRCDIR}/openoffice.org-${i}-${PVER}-${OO_BUILD}.tar.gz || die
35     else
36     munpack openoffice.org-${i}-${PVER}-${OO_BUILD}.tar.gz ${SRCDIR} || die
37     fi
38     fi
39    
40     for x in "" base binfilter calc draw help impress math res writer
41     do
42     rpm2targz ${SRCDIR}/${OO_BASIS}-${i}-${x}-${PVER}-${OO_BUILD}.rpm || die
43     tar xvzf ${SRCDIR}/${OO_BASIS}-${i}-${x}-${PVER}-${OO_BUILD}.tar.gz || die
44     done
45    
46     rpm2targz ${SRCDIR}/${OO_OTHER}-${i}-${PVER}-${OO_BUILD}.rpm || die
47     tar xvzf ${SRCDIR}/${OO_OTHER}-${i}-${PVER}-${OO_BUILD}.tar.gz || die
48     done
49     }
50    
51     ooo_i18n_src_install()
52     {
53     cd ${SRCDIR}
54    
55     # needed directories
56     install -d ${BINDIR}${OO_HOME} || die
57     mv ${SRCDIR}/opt/openoffice.org/* ${BINDIR}${OO_HOME} || die
58     }
59    
60     export_inherits ooo_i18n src_prepare src_install