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