Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


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