Magellan Linux

Diff of /smage/trunk/include/mozilla_i18n.sminc

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

revision 4781 by niro, Wed Apr 17 07:24:14 2013 UTC revision 5214 by niro, Mon Dec 16 10:18:54 2013 UTC
# Line 1  Line 1 
1  # $Id$  # $Id$
2  # functions for mozilla i18n  # functions for mozilla i18n
3  #  #
4  # MOZ_SUITE, MOZ_LANG, STATE, PVER and PBUILD must be given  # MOZ_SUITE, MOZ_LANG, STATE, PNAME, PVER and PBUILD must be given
5  #  #
6    
7  MOZ_HOME="/usr/$(mlibdir)/${MOZ_SUITE}"  # check for esr releases
8  PNAME="${MOZ_SUITE}-lang-${MOZ_LANG}"  case ${PNAME} in
9     *-esr-*) DEP_PNAME="${MOZ_SUITE}-esr"; DEP_DESCRIPTION="Firefox ESR" ;;
10     *) DEP_PNAME="${MOZ_SUITE}"; DEP_DESCRIPTION="Firefox" ;;
11    esac
12    
13    : ${MOZ_HOME="/usr/$(mlibdir)/${DEP_PNAME}"}
14    : ${PNAME="${MOZ_SUITE}-lang-${MOZ_LANG}"}
15    
16  PCAT="app-lang"  PCAT="app-lang"
17  case ${MOZ_SUITE} in  case ${MOZ_SUITE} in
18   firefox) DEP_PCAT="net-www" ;;   firefox) DEP_PCAT="net-www"; MOZ_APP_DIR="${MOZ_HOME}/browser" ;;
19   thunderbird) DEP_PCAT="net-mail" ;;   thunderbird) DEP_PCAT="net-mail"; MOZ_APP_DIR="${MOZ_HOME}" ;;
20  esac  esac
21    
22  DESCRIPTION="Mozilla ${MOZ_SUITE} ${PVER} - ${MOZ_LANG} language files."  DESCRIPTION="Mozilla ${DEP_DESCRIPTION} ${PVER} - ${MOZ_LANG} language files."
23  HOMEPAGE="http://www.mozilla.org/products/${MOZ_SUITE}/"  HOMEPAGE="http://www.mozilla.org/products/${MOZ_SUITE}/"
24    
25  DEPEND="== ${DEP_PCAT}/${MOZ_SUITE}-${PVER}"  DEPEND="== ${DEP_PCAT}/${DEP_PNAME}-${PVER}"
   
 SDEPEND=">= app-arch/unzip-5  
  >= virtual/sed"  
26    
27  SRCFILE="${MOZ_LANG}.xpi"  SRCFILE="${MOZ_LANG}.xpi"
28  SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"  SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
# Line 27  SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" Line 30  SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
30  sminclude mtools  sminclude mtools
31    
32  SRC_URI=(  SRC_URI=(
33   ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_SUITE}/releases/${PVER}/linux-i686/xpi/${SRCFILE}   http://ftp.mozilla.org/pub/mozilla.org/${MOZ_SUITE}/releases/${PVER}/linux-i686/xpi/${SRCFILE}
34   mirror://${PNAME/-${MOZ_LANG}/}/${PVER}/${SRCFILE}   mirror://${PNAME/-${MOZ_LANG}/}/${PVER}/${SRCFILE}
35  )  )
36    
37  mozilla_i18n_src_prepare()  mozilla_i18n_src_prepare()
38  {  {
39   install -d ${SRCDIR}   install -d ${SRCDIR} || die
40   munpack ${SRCFILE} ${SRCDIR} || die   cd ${SRCDIR}
41     cp ${SOURCEDIR}/$(mpname)/${SRCFILE} ${SRCDIR}/ || die
42  }  }
43    
44  mozilla_i18n_src_install()  mozilla_i18n_src_install()
45  {  {
  cd ${SRCDIR}  
   
46   # get install id for the extension   # get install id for the extension
47   local id="$(sed -n -e '/install-manifest/,$ { /em:id/!d; s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' install.rdf)"   local id="langpack-${MOZ_LANG}@firefox.mozilla.org"
48    
49   # needed directories   # needed directories
50   minstalldir ${MOZ_HOME}/extensions/${id} || die   minstalldir ${MOZ_APP_DIR}/extensions || die
51   cp -Rv ${SRCDIR}/* ${BINDIR}/${MOZ_HOME}/extensions/${id} || die   minstallfile ${SRCDIR}/${SRCFILE} ${MOZ_APP_DIR}/extensions/${id}.xpi || die
52  }  }
53    
54  export_inherits mozilla_i18n src_prepare src_install  export_inherits mozilla_i18n src_prepare src_install

Legend:
Removed from v.4781  
changed lines
  Added in v.5214