Contents of /smage/trunk/deprecated/firefox-esr-lang/firefox-esr-lang-24.6.0-r1.smage2
Parent Directory | Revision Log
Revision 11126 -
(show annotations)
(download)
Fri Sep 8 12:07:56 2017 UTC (7 years ago) by niro
File size: 2495 byte(s)
Fri Sep 8 12:07:56 2017 UTC (7 years ago) by niro
File size: 2495 byte(s)
-moved to 'deprecated'
1 | # $Id$ |
2 | |
3 | MOZ_SUITE="firefox" |
4 | |
5 | PVER="24.6.0" |
6 | PBUILD="r1" |
7 | |
8 | # fix split_package_base |
9 | PNAME="${MOZ_SUITE}-esr-lang" |
10 | |
11 | # fix mozilla home |
12 | MOZ_HOME="/usr/$(mlibdir)/${MOZ_SUITE}-esr" |
13 | |
14 | sminclude mozilla_i18n |
15 | |
16 | # get upstream languages via: |
17 | get_upstream_lang() |
18 | { |
19 | local UPSTREAM_LANG="$(lynx -dump -listonly ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_SUITE}/releases/${PVER}esr/linux-i686/xpi | grep .xpi | sed 's:.*/xpi/\(.*\).xpi:\1:')" |
20 | local MISSING |
21 | local DEPRECATED |
22 | local found |
23 | local i |
24 | local x |
25 | |
26 | for i in ${UPSTREAM_LANG} |
27 | do |
28 | found=0 |
29 | for x in ${MOZ_LANG_ALL} |
30 | do |
31 | if [[ ${i} = ${x} ]] |
32 | then |
33 | found=1 |
34 | # and break here, no need to search all others |
35 | break |
36 | fi |
37 | done |
38 | # if still found=0 here, lang was not found |
39 | [[ ${found} = 0 ]] && MISSING+=" ${i}" |
40 | done |
41 | echo "missing: ${MISSING}" |
42 | |
43 | # deprecated languages |
44 | for i in ${MOZ_LANG_ALL} |
45 | do |
46 | found=0 |
47 | for x in ${UPSTREAM_LANG} |
48 | do |
49 | if [[ ${i} = ${x} ]] |
50 | then |
51 | found=1 |
52 | # and break here, no need to search all others |
53 | break |
54 | fi |
55 | done |
56 | # check missing too |
57 | for x in ${MISSING} |
58 | do |
59 | if [[ ${i} = ${x} ]] |
60 | then |
61 | found=1 |
62 | # and break here, no need to search all others |
63 | break |
64 | fi |
65 | done |
66 | # if still found=0 here, lang was not found |
67 | [[ ${found} = 0 ]] && DEPRECATED+=" ${i}" |
68 | done |
69 | echo "deprecated: ${DEPRECATED}" |
70 | } |
71 | |
72 | MOZ_LANG_ALL="de" |
73 | |
74 | # being a little hackish here: |
75 | for lang in ${MOZ_LANG_ALL} |
76 | do |
77 | SPLIT_PACKAGES+=" ${MOZ_SUITE}-esr-lang-${lang}" |
78 | done |
79 | |
80 | # unset SRC_URI from mozilla_i18n include here |
81 | unset SRC_URI |
82 | for lang in ${MOZ_LANG_ALL} |
83 | do |
84 | SRC_URI+=( ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_SUITE}/releases/${PVER}esr/linux-i686/xpi/${lang}.xpi |
85 | mirror://${PNAME/-${MOZ_LANG}/}/${PVER}/${lang}.xpi ) |
86 | done |
87 | |
88 | for subpackage in ${SPLIT_PACKAGES} |
89 | do |
90 | eval "split_info_${subpackage}() { |
91 | DESCRIPTION=\"Mozilla ${MOZ_SUITE} ESR ${PVER} - '${subpackage/${MOZ_SUITE}-esr-lang-/}' language files.\"; |
92 | DEPEND=\"${DEPEND}\"; }" |
93 | done |
94 | |
95 | src_prepare() |
96 | { |
97 | local lang |
98 | for lang in ${MOZ_LANG_ALL} |
99 | do |
100 | export MOZ_LANG="${lang}" |
101 | export SRCFILE="${MOZ_LANG}.xpi" |
102 | export SRCDIR="${BUILDDIR}/${MOZ_SUITE}-${PVER}/${lang}" |
103 | mozilla_i18n_src_prepare || die "src_prepare '${lang}'" |
104 | done |
105 | } |
106 | |
107 | for subpackage in ${SPLIT_PACKAGES} |
108 | do |
109 | eval "src_install_${subpackage}(){ |
110 | local lang=\"\${subpackage/${MOZ_SUITE}-esr-lang-/}\" |
111 | export SRCFILE=\"\${lang}.xpi\"; |
112 | export SRCDIR=\"${BUILDDIR}/${MOZ_SUITE}-${PVER}/\${lang}\"; |
113 | export MOZ_LANG=\"\${lang}\"; |
114 | mozilla_i18n_src_install || die; }" |
115 | done |