updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / gedit-source-code-browser-git / PKGBUILD
blobfd92231af18846579f799e056dc80c1fd095e348
1 # Maintainer: Simon Sapin <simon dot sapin at exyr dot org>
2 pkgname=gedit-source-code-browser-git
3 pkgver=20110704
4 pkgrel=1
5 pkgdesc="A source code class and function browser plugin for Gedit 3."
6 arch=('any')
7 url="https://github.com/Quixotix/gedit-source-code-browser"
8 license=('custom')
9 depends=('gedit>=3' 'ctags')
10 install=gedit-source-code-browser.install
11 makedepends=('git')
14 _gitroot="https://github.com/Quixotix/gedit-source-code-browser.git"
15 _gitname="gedit-source-code-browser"
17 build() {
18   cd "$srcdir"
19   msg "Connecting to GIT server...."
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     cd $_gitname
27   fi
29   msg "GIT checkout done or server timeout"
31   install -d $pkgdir/usr/lib/gedit/plugins
32   install -m644 sourcecodebrowser.plugin $pkgdir/usr/lib/gedit/plugins
34   # Is there a better way to do this?
35   for dir in $(find sourcecodebrowser -type d)
36   do
37     install -d $pkgdir/usr/lib/gedit/plugins/$dir
38   done
40   for file in $(find sourcecodebrowser -type f)
41   do
42     install -m644 $file $pkgdir/usr/lib/gedit/plugins/$(dirname $file)
43   done
45   install -d $pkgdir/usr/share/glib-2.0/schemas/
46   install -m644  sourcecodebrowser/data/org.gnome.gedit.plugins.sourcecodebrowser.gschema.xml $pkgdir/usr/share/glib-2.0/schemas/
48   # Ugly hack to get the license out of the README file.
49   grep -A 999999 License README.markdown > LICENSE
51   install -d $pkgdir/usr/share/licenses/$pkgname
52   install -m644 LICENSE $pkgdir/usr/share/licenses/$pkgname