blob: f3f7d70c5f399a04d7777452b20a5f8806f450c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#!/bin/bash
SCRIPT_PATH=$(dirname "$0")
sed -i '/Package: waterfox-g-i18n-/Q' $SCRIPT_PATH/control
mapfile -t _languages < <(cat $SCRIPT_PATH/locales.shipped)
for _lang in "${_languages[@]}"; do
_locale_file=$(echo $_lang | awk -F: '{print $1}')
_locale_pkg=$(echo $_lang | awk -F: '{print tolower($1)}')
_locale_desc=$(echo $_lang | awk -F: '{print $2}')
_pkgname=waterfox-i18n-$_locale_pkg
_pkgname_trans3=waterfox-g3-i18n-$_locale_pkg
_pkgname_trans4=waterfox-g4-i18n-$_locale_pkg
_pkgname_trans5=waterfox-g-i18n-$_locale_pkg
cat <<EOT >> $SCRIPT_PATH/control
Package: $_pkgname
Architecture: all
Depends: \${misc:Depends}, waterfox-kde (>= \${source:Version})
Replaces: $_pkgname_trans4 (<< \${source:Version}), $_pkgname_trans3 (<< \${source:Version}), $_pkgname_trans5 (<< \${source:Version})
Breaks: $_pkgname_trans4 (<< \${source:Version}), $_pkgname_trans3 (<< \${source:Version}), $_pkgname_trans5 (<< \${source:Version})
Description: $_locale_desc language pack for Waterfox G
This package contains $_locale_desc translations for Waterfox G
Package: $_pkgname_trans5
Architecture: all
Section: oldlibs
Depends: \${misc:Depends}, $_pkgname
Description: Transitional package
This is a transitional package. It can safely be removed.
EOT
# stackrpms,2
sed -i -r -e '/^Depends:/s/waterfox-g-kpe/waterfox-g/g;' $SCRIPT_PATH/control
touch $SCRIPT_PATH/${_pkgname}.install
cat <<EOT > $SCRIPT_PATH/${_pkgname}.install
extensions/langpack-${_locale_file}@l10n.waterfox.net.xpi /usr/lib/waterfox-g/browser/extensions
EOT
done
sed -i '$ d' $SCRIPT_PATH/control
|