Annotation of /trunk/include/mozilla_i18n.sminc
Parent Directory | Revision Log
Revision 15834 -
(hide annotations)
(download)
Fri Jan 11 08:02:45 2013 UTC (11 years, 8 months ago) by niro
File size: 1211 byte(s)
Fri Jan 11 08:02:45 2013 UTC (11 years, 8 months ago) by niro
File size: 1211 byte(s)
-several fixes for new pkg name and use 'app-lang' PCAT
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 | case ${MOZ_SUITE} in | ||
11 | niro | 15834 | firefox) PCAT="app-lang" ;; |
12 | thunderbird) PCAT="app-lang" ;; | ||
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 | 15834 | DEPEND="== ${PCAT}/${MOZ_SUITE}-${PVER}" |
19 | niro | 2 | |
20 | SDEPEND=">= app-arch/unzip-5 | ||
21 | niro | 15834 | >= virtual/sed" |
22 | niro | 2 | |
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 | } | ||
38 | |||
39 | mozilla_i18n_src_install() | ||
40 | { | ||
41 | cd ${SRCDIR} | ||
42 | |||
43 | niro | 11031 | # get install id for the extension |
44 | local id="$(sed -n -e '/install-manifest/,$ { /em:id/!d; s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' install.rdf)" | ||
45 | |||
46 | niro | 2 | # needed directories |
47 | niro | 11031 | minstalldir ${MOZ_HOME}/extensions/${id} || die |
48 | cp -Rv ${SRCDIR}/* ${BINDIR}/${MOZ_HOME}/extensions/${id} || die | ||
49 | niro | 2 | } |
50 | |||
51 | export_inherits mozilla_i18n src_prepare src_install |