Want more features on Pastebin? Sign Up, it's FREE!
Guest

offlineimap-git PKGBUILD

By: a guest on Mar 31st, 2011  |  syntax: Bash  |  size: 1.34 KB  |  views: 99  |  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. # Contributor: Ethan Schoonover, es@ethanschoonover.com
  2.  
  3. pkgname=offlineimap-git
  4. pkgver=20110401
  5. pkgrel=1
  6. pkgdesc="A powerful IMAP/Maildir synchronization tool"
  7. url="http://wiki.github.com/nicolas33/offlineimap/"
  8. arch=('any')
  9. license=('GPL2')
  10. depends=('python2')
  11. makedepends=('git' 'python2-setupdocs')
  12. conflicts=('offlineimap')
  13. provides=('offlineimap')
  14.  
  15. _gitroot="git://github.com/nicolas33/offlineimap.git"
  16. _gitname="offlineimap"
  17.  
  18. build() {
  19.   msg 'Connecting to GIT server...'
  20.  
  21.   if [[ -d $_gitname ]]; then
  22.     ( cd $_gitname; git pull origin )
  23.     msg 'The local files are updated.'
  24.   else
  25.     git clone $_gitroot $_gitname
  26.   fi
  27.  
  28.   msg "GIT checkout done or server timeout"
  29.   msg "Starting make..."
  30.  
  31.   rm -rf $_gitname-build
  32.   git clone $_gitname{,-build}
  33.   cd $_gitname-build
  34.  
  35.   sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
  36.              -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
  37.              $(find ./ -name '*.py')
  38.  
  39.   make man
  40.  
  41. }
  42.  
  43. package() {
  44.  
  45.   cd $_gitname-build
  46.   python2 setup.py install --prefix=${pkgdir}/usr
  47.  
  48.   install -D -m644 offlineimap.conf.minimal ${pkgdir}/usr/share/offlineimap/offlineimap.conf.minimal
  49.   install -D -m644 offlineimap.conf ${pkgdir}/usr/share/offlineimap/offlineimap.conf
  50.   install -D -m644 offlineimap.1 ${pkgdir}/usr/share/man/man1/offlineimap.1
  51.  
  52. }
clone this paste RAW Paste Data