Annotation of /branches/R11-stable/include/mozilla_i18n.sminc
Parent Directory | Revision Log
Revision 9863 -
(hide annotations)
(download)
Fri Jan 13 19:22:05 2012 UTC (12 years, 8 months ago) by niro
Original Path: branches/magellan-next/include/mozilla_i18n.sminc
File size: 1278 byte(s)
Fri Jan 13 19:22:05 2012 UTC (12 years, 8 months ago) by niro
Original Path: branches/magellan-next/include/mozilla_i18n.sminc
File size: 1278 byte(s)
- PCATEGORIE -> PCAT transition
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 | MOZ_HOME="/usr/$(mlibdir)/mozilla-firefox" | ||
8 | PNAME="mozilla-${MOZ_SUITE}-i18n-${MOZ_LANG}" | ||
9 | |||
10 | case ${MOZ_SUITE} in | ||
11 | niro | 9863 | firefox) PCAT="net-www" ;; |
12 | thunderbird) PCAT="net-mail" ;; | ||
13 | niro | 2 | esac |
14 | |||
15 | DESCRIPTION="Mozilla ${MOZ_SUITE} ${PVER} - ${MOZ_LANG} language files." | ||
16 | HOMEPAGE="http://www.mozilla.org/products/${MOZ_SUITE}/" | ||
17 | |||
18 | niro | 9863 | DEPEND="== ${PCAT}/mozilla-${MOZ_SUITE}-${PVER}" |
19 | niro | 2 | |
20 | SDEPEND=">= app-arch/unzip-5 | ||
21 | >= sys-apps/sed-4" | ||
22 | |||
23 | SRCFILE="${MOZ_LANG}.xpi" | ||
24 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
25 | |||
26 | sminclude mtools | ||
27 | |||
28 | SRC_URI=( | ||
29 | ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_SUITE}/releases/${PVER}/linux-i686/xpi/${SRCFILE} | ||
30 | mirror://${PNAME/-${MOZ_LANG}/}/${PVER}/${SRCFILE} | ||
31 | ) | ||
32 | |||
33 | mozilla_i18n_src_prepare() | ||
34 | { | ||
35 | install -d ${SRCDIR} | ||
36 | munpack ${SRCFILE} ${SRCDIR} || die | ||
37 | cd ${SRCDIR} | ||
38 | |||
39 | # fix location in manifest file | ||
40 | sed -i "s|jar:chrome/${MOZ_LANG}.jar|jar:${MOZ_LANG}.jar|" chrome.manifest || die | ||
41 | } | ||
42 | |||
43 | mozilla_i18n_src_install() | ||
44 | { | ||
45 | cd ${SRCDIR} | ||
46 | |||
47 | # needed directories | ||
48 | minstalldir ${MOZ_HOME}/chrome || die | ||
49 | |||
50 | minstallfile chrome/${MOZ_LANG}.jar ${MOZ_HOME}/chrome/ || die | ||
51 | minstallfile chrome.manifest ${MOZ_HOME}/chrome/${MOZ_LANG}.manifest || die | ||
52 | } | ||
53 | |||
54 | export_inherits mozilla_i18n src_prepare src_install |