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

PKGBUILD

By: a guest on Mar 2nd, 2011  |  syntax: Bash  |  size: 2.40 KB  |  views: 164  |  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: Egor Vakhromtsev <e.vakhromtsev gmail.com>
  2. # Maintainer: Andrea Fagiani <andfagiani_at_gmail_dot_com>
  3.  
  4. pkgname=gmate-git
  5. pkgver=20110303
  6. pkgrel=2
  7. pkgdesc="Set of plugins for Gedit including improvements for gtksourceview2 language files."
  8. arch=(any)
  9. url="http://github.com/gmate/gmate"
  10. license=('GPL3')
  11. #INFO: py gconf dependency
  12. depends=('gedit' 'pywebkitgtk' 'pyinotify' 'shared-mime-info' 'python2-gconf')
  13. makedepends=('git')
  14. install=$pkgname.install
  15. source=(gmate-activate)
  16. md5sums=('a3f48a1750dc5cfaef8fc5c0f57cc075')
  17.  
  18. _gitroot=http://github.com/gmate/gmate.git
  19. _gitname=gmate
  20.  
  21. build() {
  22.   cd $srcdir
  23.   msg "Connecting to GIT server...."
  24.  
  25.   if [ -d $_gitname ] ; then
  26.     cd $_gitname && git pull origin
  27.     msg "The local files are updated."
  28.   else
  29.     git clone $_gitroot
  30.   fi
  31.  
  32.   msg "GIT checkout done or server timeout"
  33.   msg "Starting make..."
  34.  
  35.   rm -rf $srcdir/$_gitname-build
  36.   git clone $srcdir/$_gitname $srcdir/$_gitname-build
  37.  
  38. #INFO: this is python2 stuff!
  39.   cd $srcdir/$_gitname-build
  40.   for file in $(find . -name '*.py' -print); do
  41.       sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' $file
  42.       sed -i 's_#!/usr/bin/python_#!/usr/bin/python2_' $file
  43.   done
  44.  
  45. }
  46.  
  47. package() {
  48.   cd $srcdir/$_gitname-build
  49.  
  50. # Copy Gmate executable
  51.   install -Dm755 gmate.py $pkgdir/usr/lib/gedit-2/gmate/gmate.py
  52. #INFO: make symlink here instead of post_install!
  53.   mkdir -p $pkgdir/usr/bin
  54.   ln -s /usr/lib/gedit-2/gmate/gmate.py $pkgdir/usr/bin/gmate
  55.  
  56. # Register rails-related mime types
  57.   install -Dm644 mime/rails.xml $pkgdir/usr/share/mime/packages/rails.xml
  58.  
  59. # Copy language definitions
  60.   mkdir -p $pkgdir/usr/share/gtksourceview-2.0/language-specs/
  61.   install -m644 lang-specs/*.lang -t $pkgdir/usr/share/gtksourceview-2.0/language-specs/
  62.  
  63. # Copy Tags
  64.   mkdir -p $pkgdir/usr/share/gedit-2/plugins/taglist/
  65.   install -m644 tags/*.tags.gz -t $pkgdir/usr/share/gedit-2/plugins/taglist/
  66.  
  67. # Copy Snippets
  68.   mkdir -p $pkgdir/usr/share/gedit-2/plugins/snippets/
  69.   install -m644 snippets/* -t $pkgdir/usr/share/gedit-2/plugins/snippets/
  70.  
  71. # Copy Plugins
  72.   mkdir -p $pkgdir/usr/lib/gedit-2/plugins/
  73.   cp -R plugins/* $pkgdir/usr/lib/gedit-2/plugins/
  74.  
  75. # Copy Styles
  76.   mkdir -p $pkgdir/usr/share/gtksourceview-2.0/styles
  77.   install -m644 styles/* -t $pkgdir/usr/share/gtksourceview-2.0/styles/
  78.  
  79.   install -Dm755 $srcdir/gmate-activate $pkgdir/usr/bin/gmate-activate
  80. }
clone this paste RAW Paste Data