updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / gmate-git / PKGBUILD
blobf2792d6795d03339b123b215faec4dec5cea2024
1 # Contributor: Egor Vakhromtsev <e.vakhromtsev gmail.com>
2 # Maintainer: Andrea Fagiani <andfagiani_at_gmail_dot_com>
4 pkgname=gmate-git
5 pkgver=20120119
6 pkgrel=2
7 pkgdesc="Set of plugins for Gedit including improvements for gtksourceview3 language files."
8 arch=(any)
9 url="http://github.com/gmate/gmate"
10 license=('GPL3')
11 depends=('gedit' 'pywebkitgtk' 'python2-pyinotify' 'shared-mime-info' 'python2-gconf')
12 makedepends=('git')
13 install=$pkgname.install
14 source=(gmate-activate)
15 md5sums=('61144cb0a538b579d63fc8daf9955efd')
17 _gitroot=http://github.com/gmate/gmate.git
18 _gitname=gmate
20 build() {
21   cd $srcdir
22   msg "Connecting to GIT server...."
24   if [ -d $_gitname ] ; then
25     cd $_gitname && git pull origin
26     msg "The local files are updated."
27   else
28     git clone $_gitroot
29   fi
31   msg "GIT checkout done or server timeout"
32   msg "Starting make..."
34   rm -rf $srcdir/$_gitname-build
35   git clone $srcdir/$_gitname $srcdir/$_gitname-build
37 #INFO: this is python2 stuff!
38   cd $srcdir/$_gitname-build
39   for file in $(find . -name '*.py' -print); do
40       sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' $file
41       sed -i 's_#!/usr/bin/python_#!/usr/bin/python2_' $file
42   done
46 package() {
47   cd $srcdir/$_gitname-build
49 # Copy language definitions
50   mkdir -p $pkgdir/usr/share/gtksourceview-3.0/language-specs/
51   install -m644 lang-specs/*.lang -t $pkgdir/usr/share/gtksourceview-3.0/language-specs/
53 # Copy Styles
54   mkdir -p $pkgdir/usr/share/gtksourceview-3.0/styles
55   install -m644 styles/* -t $pkgdir/usr/share/gtksourceview-3.0/styles/
57 # Register mime types
58   mkdir -p $pkgdir/usr/share/mime/packages/
59   install -Dm644 mime/*.xml -t $pkgdir/usr/share/mime/packages/
61 # Copy Gmate executable
62   install -Dm755 gmate.py $pkgdir/usr/share/gedit/gmate/gmate.py
63 #INFO: make symlink here instead of post_install!
64   mkdir -p $pkgdir/usr/bin
65   ln -s /usr/share/gedit/gmate/gmate.py $pkgdir/usr/bin/gmate
67 # Copy Tags
68   mkdir -p $pkgdir/usr/share/gedit/plugins/taglist/
69   install -m644 tags/*.tags.gz -t $pkgdir/usr/share/gedit/plugins/taglist/
71 # Copy Snippets
72   mkdir -p $pkgdir/usr/share/gedit/plugins/snippets/
73   install -m644 snippets/* -t $pkgdir/usr/share/gedit/plugins/snippets/
75 # Copy Plugins
76   mkdir -p $pkgdir/usr/lib/gedit/plugins/
77   cp -R plugins/gedit3/* $pkgdir/usr/lib/gedit/plugins/
79   install -Dm755 $srcdir/gmate-activate $pkgdir/usr/bin/gmate-activate