Page Menu
Home
Solus
Search
Configure Global Search
Log In
Files
F10760094
D4794.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
8 KB
Referenced Files
None
Subscribers
None
D4794.id.diff
View Options
diff --git a/langpacks.sh b/langpacks.sh
--- a/langpacks.sh
+++ b/langpacks.sh
@@ -1,33 +1,123 @@
#!/bin/bash
-
-VERSION="60.4.0"
+# Insired largely by Fedora
+set -e
+VER=$1
+RELURL="https://ftp.mozilla.org/pub/thunderbird/releases"
ARCH="x86_64"
-URL="https://ftp.mozilla.org/pub/thunderbird/releases/${VERSION}/linux-${ARCH}/xpi/"
-# Ensure we don't have a previous run living here
-if [[ -e lang_pack ]]; then
- rm -rvf lang_pack
+if [[ ! $VER =~ ^[0-9]+(\.[0-9]+)*$ ]];
+then
+ echo "Usage: $0 <version number>"
+ echo ""
+ echo "Error: missing or invalid Thunderbird version number"
+ exit 1
fi
-mkdir lang_pack
+WHITE='\033[1;33m'
+NC='\033[0m' # No Color
+
+echo -e "${WHITE}Processing Thunderbird langpacks${NC}"
-pushd lang_pack
+# Ensure we don't have a previous run living here
+rm -rf thunderbird_langpacks
+mkdir thunderbird_langpacks
+cd thunderbird_langpacks
-echo "mirror ." | lftp "${URL}"
+ wget --quiet -r -np -l1 -nd -A xpi $RELURL/$VER/linux-$ARCH/xpi/
-# Insired largely by Fedora
-for i in *.xpi ; do
+ for i in *.xpi ; do
ln="$(basename ${i} .xpi)"
eid="langpack-${ln}@thunderbird.mozilla.org"
- unzip $i -d "${eid}"
- find "${eid}" -type f | xargs chmod 644
- pushd "${eid}"
- zip -qq -r9mX "../${eid}.xpi" *
- rm ../$i
- popd
+ echo "Processing thunderbird locale: ${ln}"
+ unzip -qq $i -d "${eid}"
+ find "${eid}" -type f | xargs chmod 00644
+ cd "${eid}"
+ zip -qq -r9mX "../${eid}.xpi" *
+ rm ../$i
+ cd ..
rm -rf "${eid}"
-done
+ done
+
+
+ echo -e "${WHITE}Processing Lightning langpacks${NC}"
+
+ LOCALES=`curl -f $RELURL/$VER/linux-$ARCH/ | grep "a href"|sed -e "s|.*/\([^/]*\)/\".*|\1|"|tail -n+2 |grep -v xpi`
+ #echo $LOCALES
+ LOCALE_COUNT=`echo $LOCALES| tr ' ' '\n' | wc -l`
+ LOCALE_NUM=0
+ for lang in $LOCALES; do
+ LOCALE_NUM=$((LOCALE_NUM+1))
+ echo -e "${WHITE}Processing calendar locale: $lang ($LOCALE_NUM/$LOCALE_COUNT)${NC}"
+ mkdir -p extracted_lightning
+ mkdir -p calendar-locales
+ #echo Downloading TB binary for locale: $lang
+ wget --quiet $RELURL/$VER/linux-$ARCH/$lang/thunderbird-$VER.tar.bz2
+
+ cd extracted_lightning
+ tar -xf ../thunderbird-$VER.tar.bz2 thunderbird/distribution/extensions/\{e2fda1a4-762b-4020-b5ad-a41df1933103\}.xpi
+ set +e
+ unzip -qq thunderbird/distribution/extensions/\{e2fda1a4-762b-4020-b5ad-a41df1933103\}.xpi
+ set -e
+ LIGHTNING_VERSION=`cat app.ini |grep "^Version="|sed -e 's/Version=//'`
+ BUILD_ID=`cat app.ini |grep "^BuildID="|sed -e 's/BuildID=//'`
+ MAX_VERSION=`cat app.ini |grep MaxVersion|sed -e s/MaxVersion=//`
+ MIN_VERSION=`cat app.ini |grep MinVersion|sed -e s/MinVersion=//`
+ rm -rf thunderbird
+ mkdir -p ../calendar-locales/chrome
+ cp -r chrome/calendar-$lang ../calendar-locales/chrome
+ cp -r chrome/lightning-$lang ../calendar-locales/chrome
+ cd -
+
+ cd calendar-locales
+ # create manifest
+ cat > manifest.json <<EOL
+{
+ "languages": {
+ "$lang": {
+ "chrome_resources": {
+ "calendar": "chrome/calendar-$lang/locale/$lang/calendar/",
+ "lightning": "chrome/lightning-$lang/locale/$lang/lightning/"
+ },
+ "version": "$LIGHTNING_VERSION"
+ }
+ },
+ "applications": {
+ "gecko": {
+ "strict_min_version": "$MIN_VERSION",
+ "id": "langpack-cal-$lang@lightning.mozilla.org",
+ "strict_max_version": "$MAX_VERSION"
+ }
+ },
+ "langpack_id": "$lang",
+ "version": "$LIGHTNING_VERSION$BUILD_ID",
+ "name": "$lang Language Pack Calendar",
+ "manifest_version": 2,
+ "sources": {
+ "browser": {
+ "base_path": "browser/"
+ }
+ },
+ "author": "Mozilla.cz (contributors: Pavel Cvrček, Pavel Franc, Michal Stanke, Michal Vašíček)",
+ "description": "Language pack for Thunderbird for $lang, this was repacked by Solus package maintainer from original binaries."
+}
+
+EOL
+ zip --quiet -r ../langpack-cal-$lang@lightning.mozilla.org.xpi *
+ cd -
+ rm -rf calendar-locales
+ rm -rf extracted_lightning
+
+ rm -f thunderbird-$VER.tar.bz2
+ done
+
+ echo "Creating thunderbird-$VER-lightning-langpacks.tar.xz..."
+ tar cJf ../thunderbird-$VER-langpacks.tar.xz *.xpi
+
+cd ..
+
+rm -rf thunderbird_langpacks
-popd
+SHASUM=$(sha256sum thunderbird-$VER-langpacks.tar.xz)
+echo ""
+echo "thunderbird-$VER-langpacks.tar.xz : ${SHASUM%% *}"
-tar cvfJ thunderbird-${VERSION}-langpacks.tar.xz lang_pack
diff --git a/lightning-langpacks.sh b/lightning-langpacks.sh
deleted file mode 100755
--- a/lightning-langpacks.sh
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/bin/bash
-# Original script by Jan Horak for Fedora
-set -e
-
-VER="60.4.0"
-ARCH="x86_64"
-
-WHITE='\033[1;33m'
-NC='\033[0m' # No Color
-
-LOCALES=`curl -f https://ftp.mozilla.org/pub/thunderbird/releases/$VER/linux-$ARCH/ | grep "a href"|sed -e "s|.*/\([^/]*\)/\".*|\1|"|tail -n+2 |grep -v xpi`
-#echo $LOCALES
-rm -rf lightning-langpacks
-mkdir -p lightning-langpacks
-cd lightning-langpacks
-LOCALE_COUNT=`echo $LOCALES| tr ' ' '\n' | wc -l`
-LOCALE_NUM=0
-for lang in $LOCALES; do
- LOCALE_NUM=$((LOCALE_NUM+1))
- echo -e "${WHITE}Processing calendar locale: $lang ($LOCALE_NUM/$LOCALE_COUNT)${NC}"
- mkdir -p extracted_lightning
- mkdir -p calendar-locales
- #echo Downloading TB binary for locale: $lang
- wget --quiet https://ftp.mozilla.org/pub/thunderbird/releases/$VER/linux-$ARCH/$lang/thunderbird-$VER.tar.bz2
-
- cd extracted_lightning
- tar -xf ../thunderbird-$VER.tar.bz2 thunderbird/distribution/extensions/\{e2fda1a4-762b-4020-b5ad-a41df1933103\}.xpi
- set +e
- unzip -qq thunderbird/distribution/extensions/\{e2fda1a4-762b-4020-b5ad-a41df1933103\}.xpi
- set -e
- LIGHTNING_VERSION=`cat app.ini |grep "^Version="|sed -e 's/Version=//'`
- BUILD_ID=`cat app.ini |grep "^BuildID="|sed -e 's/BuildID=//'`
- MAX_VERSION=`cat app.ini |grep MaxVersion|sed -e s/MaxVersion=//`
- MIN_VERSION=`cat app.ini |grep MinVersion|sed -e s/MinVersion=//`
- rm -rf thunderbird
- mkdir -p ../calendar-locales/chrome
- cp -r chrome/calendar-$lang ../calendar-locales/chrome
- cp -r chrome/lightning-$lang ../calendar-locales/chrome
- cd -
-
- cd calendar-locales
- # create manifest
- cat > manifest.json <<EOL
-{
- "languages": {
- "$lang": {
- "chrome_resources": {
- "calendar": "chrome/calendar-$lang/locale/$lang/calendar/",
- "lightning": "chrome/lightning-$lang/locale/$lang/lightning/"
- },
- "version": "$LIGHTNING_VERSION"
- }
- },
- "applications": {
- "gecko": {
- "strict_min_version": "$MIN_VERSION",
- "id": "langpack-cal-$lang@lightning.mozilla.org",
- "strict_max_version": "$MAX_VERSION"
- }
- },
- "langpack_id": "$lang",
- "version": "$LIGHTNING_VERSION$BUILD_ID",
- "name": "$lang Language Pack Calendar",
- "manifest_version": 2,
- "sources": {
- "browser": {
- "base_path": "browser/"
- }
- },
- "author": "Mozilla.cz (contributors: Pavel Cvrček, Pavel Franc, Michal Stanke, Michal Vašíček)",
- "description": "Language pack for Thunderbird for $lang, this was repacked by Solus package maintainer from original binaries."
-}
-
-EOL
- zip --quiet -r ../langpack-cal-$lang@lightning.mozilla.org.xpi *
- cd -
- rm -rf calendar-locales
- rm -rf extracted_lightning
-
- rm -f thunderbird-$VER.tar.bz2
-done
-
-echo "Creating thunderbird-$VER-lightning-langpacks.tar.xz..."
-tar cJf ../thunderbird-$VER-lightning-langpacks.tar.xz *.xpi
-cd ..
-rm -rf lightning-langpacks
diff --git a/package.yml b/package.yml
--- a/package.yml
+++ b/package.yml
@@ -4,7 +4,6 @@
source :
- https://ftp.mozilla.org/pub/thunderbird/releases/60.4.0/source/thunderbird-60.4.0.source.tar.xz : 27a6cdd9cfdd7ce70b1d193c64739db6be6b39eec308f0122d8472a6cd243e75
- https://getsol.us/sources/mozilla/thunderbird-60.4.0-langpacks.tar.xz : fd89d7b56a4c877fc57583538a79175d6cc9c02fcf6db229a4c1eb7b4f79e9f9
- - https://getsol.us/sources/mozilla/thunderbird-60.4.0-lightning-langpacks.tar.xz : 55f287c40be989b80b79a9ac18086cb0e04b9b234b38bf5d9eb40d2c971dee10
license :
- GPL-2.0-or-later
- LGPL-2.1-or-later
@@ -55,13 +54,14 @@
langpackdir="$installdir/%libdir%/thunderbird/extensions"
install -dm00755 "${langpackdir}"
+ mkdir lang_pack && pushd lang_pack
tar xf "${sources}/thunderbird-${version}-langpacks.tar.xz"
- tar xf "${sources}/thunderbird-${version}-lightning-langpacks.tar.xz" -C lang_pack
- for i in lang_pack/*.xpi; do
+ for i in *.xpi; do
lname="$(basename ${i})"
- install -m00644 "lang_pack/${lname}" "${langpackdir}/${lname}"
+ install -m00644 "${lname}" "${langpackdir}/${lname}"
done
+ popd
DESTDIR=$installdir ./mach install
File Metadata
Details
Attached
Mime Type
text/plain
Expires
May 18 2023, 11:52 PM (12 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5810256
Default Alt Text
D4794.id.diff (8 KB)
Attached To
Mode
D4794: [WIP] Merge thunderbird & lightning langpacks
Attached
Detach File
Event Timeline
Log In to Comment