1 # Contributor: Vasily Ryabov
2 # Maintainer: Sebastien Duthil <duthils@free.fr>
4 pkgname=thunderbird-firetray
7 pkgdesc="A system tray extension for linux. Installs globally for all users. Useful as package when home mounted with noexec, because extension requires execute permission."
9 url="http://code.google.com/p/firetray/"
11 depends=('thunderbird')
12 source=(http://firetray.googlecode.com/files/firetray-$pkgver.xpi)
13 md5sums=('51ec64ac01cec4ca0435b25c4b25d8ab')
15 install="$pkgname.install"
19 # Looking for thhe install path
20 TB_DIRS="$(ls /usr/lib | grep thunderbird)"
22 for TB_DIR in $TB_DIRS ; do
23 if [ -d "/usr/lib/$TB_DIR/extensions" ] ; then
24 # Checking if there are multiple possible paths
25 if [ -z "$TB_FINAL_DIR" ] ; then
26 TB_FINAL_DIR="$TB_DIR"
28 error "There are multiple thunderbird folders in /usr/lib."
29 msg "Please specify the Thunderbird folder containing the extensions directory in the _tb_firetray_install variable."
35 if [ -z "$TB_FINAL_DIR" ] ; then
37 if [ -z "$_tb_firetray_install" ] ; then
38 error "No thunderbird path found."
39 msg "Please specify the Thunderbird folder containing the extensions directory in the _tb_firetray_install variable."
42 TB_FINAL_DIR="$_tb_firetray_install"
46 EXT_ID=$(sed -n '/.*<em:id>\(.*\)<\/em:id>.*/{s//\1/p;q}' install.rdf) || return 1
47 DEST_DIR="$pkgdir/usr/lib/$TB_FINAL_DIR/extensions/$EXT_ID/"
49 cp -a "$srcdir/"* "$DEST_DIR"