Annotation of /trunk/include/mozilla_i18n.sminc
Parent Directory | Revision Log
Revision 20241 -
(hide annotations)
(download)
Wed Nov 27 08:11:25 2013 UTC (10 years, 11 months ago) by niro
File size: 1430 byte(s)
Wed Nov 27 08:11:25 2013 UTC (10 years, 11 months ago) by niro
File size: 1430 byte(s)
-do not overwrite already given vars
1 | niro | 9863 | # $Id$ |
2 | niro | 2 | # functions for mozilla i18n |
3 | # | ||
4 | niro | 20235 | # MOZ_SUITE, MOZ_LANG, STATE, PNAME, PVER and PBUILD must be given |
5 | niro | 2 | # |
6 | |||
7 | niro | 20235 | # check for esr releases |
8 | 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 | niro | 20241 | : ${MOZ_HOME="/usr/$(mlibdir)/${DEP_PNAME}"} |
14 | : ${PNAME="${MOZ_SUITE}-lang-${MOZ_LANG}"} | ||
15 | niro | 2 | |
16 | niro | 15837 | PCAT="app-lang" |
17 | niro | 2 | case ${MOZ_SUITE} in |
18 | niro | 20075 | firefox) DEP_PCAT="net-www"; MOZ_APP_DIR="${MOZ_HOME}/browser" ;; |
19 | thunderbird) DEP_PCAT="net-mail"; MOZ_APP_DIR="${MOZ_HOME}" ;; | ||
20 | niro | 2 | esac |
21 | |||
22 | niro | 20235 | DESCRIPTION="Mozilla ${DEP_DESCRIPTION} ${PVER} - ${MOZ_LANG} language files." |
23 | niro | 2 | HOMEPAGE="http://www.mozilla.org/products/${MOZ_SUITE}/" |
24 | |||
25 | niro | 20235 | DEPEND="== ${DEP_PCAT}/${DEP_PNAME}-${PVER}" |
26 | niro | 2 | |
27 | SRCFILE="${MOZ_LANG}.xpi" | ||
28 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
29 | |||
30 | sminclude mtools | ||
31 | |||
32 | SRC_URI=( | ||
33 | niro | 19657 | http://ftp.mozilla.org/pub/mozilla.org/${MOZ_SUITE}/releases/${PVER}/linux-i686/xpi/${SRCFILE} |
34 | niro | 2 | mirror://${PNAME/-${MOZ_LANG}/}/${PVER}/${SRCFILE} |
35 | ) | ||
36 | |||
37 | niro | 19662 | mozilla_i18n_src_prepare() |
38 | { | ||
39 | install -d ${SRCDIR} || die | ||
40 | cd ${SRCDIR} | ||
41 | niro | 19669 | cp ${SOURCEDIR}/$(mpname)/${SRCFILE} ${SRCDIR}/ || die |
42 | niro | 19662 | } |
43 | |||
44 | niro | 2 | mozilla_i18n_src_install() |
45 | { | ||
46 | niro | 11031 | # get install id for the extension |
47 | niro | 19656 | local id="langpack-${MOZ_LANG}@firefox.mozilla.org" |
48 | niro | 11031 | |
49 | niro | 2 | # needed directories |
50 | niro | 20075 | minstalldir ${MOZ_APP_DIR}/extensions || die |
51 | minstallfile ${SRCDIR}/${SRCFILE} ${MOZ_APP_DIR}/extensions/${id}.xpi || die | ||
52 | niro | 2 | } |
53 | |||
54 | niro | 19662 | export_inherits mozilla_i18n src_prepare src_install |