Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 1st, 2010  |  syntax: Bash  |  size: 2.36 KB  |  views: 128  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: Schnouki <thomas.jost@gmail.com>
  2. # Contributor: Hinrich Harms <arch@hinrich.de>
  3.  
  4. pkgname=enigmail
  5. pkgver=1.1
  6. pkgrel=1
  7. _tb_ver=3.1rc1
  8. _tb_libdir=thunderbird-3.1 # Adjust this to your thunderbird directory in /usr/lib
  9. _comm_dir=comm-1.9.2
  10. pkgdesc="OpenPGP security extension for Mozilla Thunderbird 3"
  11. arch=('i686' 'x86_64')
  12. url="http://enigmail.mozdev.org"
  13. license=('MPL' 'GPL')
  14. depends=('gnupg' 'thunderbird')
  15. makedepends=('zip')
  16. options=('!ccache' '!distcc')
  17. source=("http://www.mozilla-enigmail.org/download/source/${pkgname}-${pkgver}.tar.gz"
  18.         "http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/${_tb_ver}/source/thunderbird-${_tb_ver}.source.tar.bz2"
  19.         "mozconfig")
  20. md5sums=('6304088073928e22f08ab756894329f4'
  21.          'b47a9a014f10a383741bf2806990a796'
  22.          'ec786d343c0f951dfd71df0438c1f0ce')
  23. sha1sums=('4d0d13913092dfd3f2600040d53d4d13edf4e555'
  24.           '0febfacf411e3428d94013910ed9fb77329e0a78'
  25.           'b2b9dcace7e54d6cbcaf34373a89bb80c131f241')
  26.  
  27. build() {
  28.   # The build guide is available online:
  29.   # http://enigmail.mozdev.org/download/source.php
  30.  
  31.   # Compile needed parts of Thunderbird
  32.   cd $srcdir/$_comm_dir
  33.   export MOZCONFIG="$startdir/mozconfig"
  34.   make -f client.mk export || return 1
  35.   cd mozilla/modules/libreg
  36.   make || return 1
  37.   cd ../../xpcom/string
  38.   make || return 1
  39.   cd ..
  40.   make || return 1
  41.   cd obsolete
  42.   make || return 1
  43.  
  44.   # Now Enigmail
  45.   mv $srcdir/enigmail $srcdir/$_comm_dir/mailnews/extensions/enigmail
  46.   cd $srcdir/$_comm_dir/mailnews/extensions/enigmail
  47.   ./makemake -r || return 1
  48.   make || return 1
  49.  
  50.   # Create XPI archive
  51.   make xpi || return 1
  52.  
  53.   # Install to the Thunderbird lib directory
  54.   # If someone knows a better way to extract the em:id, please let me know :)
  55.   _emid=`grep em:id package/install.rdf | head -n1 | sed 's/.*>\(.*\)<.*/\1/'`
  56.   mkdir -p $pkgdir/usr/lib/$_tb_libdir/extensions/$_emid
  57.   cd $pkgdir/usr/lib/$_tb_libdir/extensions/$_emid
  58.   # Look for the current (highest) version number of the XPI
  59.   _xpidir=$srcdir/$_comm_dir/mozilla/dist/bin
  60.   _xpifullpath=`ls $_xpidir/enigmail-*-linux-$CARCH.xpi | sort | sed -n '$p'`
  61.   bsdtar -x -f $_xpifullpath || return 1
  62.  
  63.   # Fix permissions
  64.   find -type d -exec chmod 0755 \{\} \+ || return 1
  65.   find -type f -exec chmod 0644 \{\} \+ || return 1
  66.   find -name '*.so' -exec chmod 0755 \{\} \+
  67. }