updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / thunderbird-awn-notif / PKGBUILD
blob0644c7a27b78cfd7c33aea164d2a38eb4091aa9a
1 # Maintainer: Kozec <kozec at kozec dot com>
3 pkgname=thunderbird-awn-notif
4 pkgver=0.4
5 pkgrel=4
6 pkgdesc="Notify Avant Window Navigator when new mails arrive in Thunderbird."
7 arch=('i686' 'x86_64')
8 url="https://addons.mozilla.org/en-US/thunderbird/addon/awn-notif/"
9 license=('MPL' 'GPL' 'LGPL')
10 _tbver=5.0
11 depends=("thunderbird>=$_tbver" 'avant-window-navigator' 'python2' 'dbus-python')
13 source=("python2-and-systemwide-install.patch"
14                 "fake-support-for-version-5.0.patch"
15                 "https://addons.mozilla.org/thunderbird/downloads/file/95598/awn-notif-${pkgver}-tb-linux.xpi"
16                 )
18 md5sums=('bb3b47a6718349a50faa2e15eba982ed'
19          '2996bc98cdf8b005c0297b1292527816'
20          '011cb39d44f506a9a4dd49045114b9ff')
22 noextract=(awn-notif-${pkgver}-tb-linux.xpi)
24 build() {
25         cd "$srcdir"
26         [ -e target ] && rm -R target
27         mkdir target
28         cd target
29         msg "Extracting xpi..."
30         bsdtar -xf ../awn-notif-${pkgver}-tb-linux.xpi
31         msg "Patching..."
32         patch -Np0 -i "$srcdir/python2-and-systemwide-install.patch" || return 1
33         patch -Np0 -i "$srcdir/fake-support-for-version-5.0.patch" || return 1
36 package() {
37         EMID=$(grep 'em:id' "$srcdir/target/install.rdf" |head -1|cut -d ">" -f 2|cut -d "<" -f 1)
38         mkdir -p "$pkgdir/usr/lib/thunderbird-$_tbver/extensions/$EMID"
39         cp -R "$srcdir/target/"* "$pkgdir/usr/lib/thunderbird-$_tbver/extensions/$EMID"
40         chmod -R ogu-x+X "$pkgdir/usr/lib/thunderbird-$_tbver/extensions/$EMID"
41         }