Annotation of /trunk/include/mozilla_i18n.sminc
Parent Directory | Revision Log
Revision 19655 -
(hide annotations)
(download)
Wed Oct 9 08:06:12 2013 UTC (11 years ago) by niro
File size: 1238 byte(s)
Wed Oct 9 08:06:12 2013 UTC (11 years ago) by niro
File size: 1238 byte(s)
-revert last commit
1 | niro | 9863 | # $Id$ |
2 | niro | 2 | # functions for mozilla i18n |
3 | # | ||
4 | # MOZ_SUITE, MOZ_LANG, STATE, PVER and PBUILD must be given | ||
5 | # | ||
6 | |||
7 | niro | 15834 | MOZ_HOME="/usr/$(mlibdir)/${MOZ_SUITE}" |
8 | PNAME="${MOZ_SUITE}-lang-${MOZ_LANG}" | ||
9 | niro | 2 | |
10 | niro | 15837 | PCAT="app-lang" |
11 | niro | 2 | case ${MOZ_SUITE} in |
12 | niro | 15837 | firefox) DEP_PCAT="net-www" ;; |
13 | thunderbird) DEP_PCAT="net-mail" ;; | ||
14 | niro | 2 | esac |
15 | |||
16 | DESCRIPTION="Mozilla ${MOZ_SUITE} ${PVER} - ${MOZ_LANG} language files." | ||
17 | HOMEPAGE="http://www.mozilla.org/products/${MOZ_SUITE}/" | ||
18 | |||
19 | niro | 15837 | DEPEND="== ${DEP_PCAT}/${MOZ_SUITE}-${PVER}" |
20 | niro | 2 | |
21 | niro | 19655 | SDEPEND=">= app-arch/unzip-5 |
22 | >= virtual/sed" | ||
23 | |||
24 | niro | 2 | 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 | niro | 19655 | mozilla_i18n_src_prepare() |
35 | { | ||
36 | install -d ${SRCDIR} | ||
37 | munpack ${SRCFILE} ${SRCDIR} || die | ||
38 | } | ||
39 | |||
40 | niro | 2 | mozilla_i18n_src_install() |
41 | { | ||
42 | cd ${SRCDIR} | ||
43 | |||
44 | niro | 11031 | # get install id for the extension |
45 | niro | 19655 | local id="$(sed -n -e '/install-manifest/,$ { /em:id/!d; s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' install.rdf)" |
46 | niro | 11031 | |
47 | niro | 2 | # needed directories |
48 | niro | 11031 | minstalldir ${MOZ_HOME}/extensions/${id} || die |
49 | niro | 19655 | cp -Rv ${SRCDIR}/* ${BINDIR}/${MOZ_HOME}/extensions/${id} || die |
50 | niro | 2 | } |
51 | |||
52 | niro | 19655 | export_inherits mozilla_i18n src_prepare src_install |