Created
August 10, 2018 12:29
-
-
Save progandy/ce857358c4f3b8eb09887a085e4bea30 to your computer and use it in GitHub Desktop.
Language Pack for Thunderbird Lightning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"languages": { | |
"LANG": { | |
"chrome_resources": { | |
"calendar": "chrome/LANG/locale/LANG/calendar/", | |
"lightning": "chrome/LANG/locale/LANG/lightning/", | |
"gdata-provider": "chrome/LANG/locale/LANG/gdata/" | |
}, | |
"version": "VERSION" | |
} | |
}, | |
"applications": { | |
"gecko": { | |
"strict_min_version": "MINVER", | |
"id": "[email protected]", | |
"strict_max_version": "MAXVER" | |
} | |
}, | |
"langpack_id": "cal-LANG", | |
"version": "VERSION", | |
"name": "LANGUAGE (LANG) Language Pack for Lightning", | |
"manifest_version": 2, | |
"sources": { | |
"browser": { | |
"base_path": "browser/" | |
} | |
}, | |
"author": "PACKAGER", | |
"description": "Language pack for Thunderbird Lightning for LANG" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# modify for your language as available at https://hg.mozilla.org/l10n-central/ | |
_lang=de | |
_langname=German | |
_tbmin=60.0 | |
_tbmax=70.0 | |
pkgname="thunderbird-cal-i18n-$_lang" | |
pkgdesc="$_langname language files for Thunderbird Calendar" | |
pkgver=20180805092655+60.0+70.0 | |
pkgrel=1 | |
source=("manifest.json" "thunderbird-cal-$_lang::hg+https://hg.mozilla.org/l10n-central/$_lang") | |
sha256sums=('SKIP' | |
'SKIP') | |
arch=(x86_64) | |
pkgver() { | |
cd "thunderbird-cal-$_lang" | |
printf "%s+%s+%s" $(date -u -d "$(hg log -l1 -T "{date|isodatesec}")" +"%Y%m%d%H%M%S") $_tbmin $_tbmax | |
} | |
build() { | |
_src="thunderbird-cal-$_lang" | |
langpath="chrome/$_lang/locale/$_lang" | |
rm -r build | |
mkdir -p build/"$langpath" | |
sed -e "s/VERSION/${pkgver}/g" \ | |
-e "s/MINVER/$_tbmin/g" \ | |
-e "s/MAXVER/$_tbmax/g" \ | |
-e "s/LANGUAGE/$_langname/g" \ | |
-e "s/LANG/$_lang/g" \ | |
-e "s\$PACKAGER\$$PACKAGER\$g" \ | |
manifest.json > build/manifest.json | |
mkdir -p build/defaults/preferences | |
sed -n "/@AB_CD@/d;/^pref/p" $_src/calendar/lightning-l10n.js >build/defaults/preferences/lightning-l10n.js | |
cp -a $_src/calendar/chrome/* build/"$langpath" | |
cd build | |
mv "$langpath"/calendar/providers/gdata "$langpath"/gdata | |
mv "$langpath"/calendar/providers/wcap/* "$langpath"/calendar/ | |
rm -r "$langpath"/calendar/providers | |
bsdtar --format zip -c -f ../langpack-cal-$_lang\@archlinux.org.community.xpi.xpi * | |
} | |
package() { | |
install -Dm644 -t $pkgdir/usr/lib/thunderbird/extensions/ langpack-cal-$_lang\@archlinux.org.community.xpi.xpi | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to make a package or extension from it? I copied both files to a folder and run makepkg but got an error in build and since this should be .xpi file it should be done differently. How?