updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / emacs-malabar-mode-git / PKGBUILD
blob2d23cf2a16f5d788997485525f8f916603c73ce3
1 # -*- mode: sh; -*-
2 # Contributor: stuck_pxl <flam44@gmail.com>
5 # You can change settings.xml file to set a approporiate proxy.
8 pkgname=emacs-malabar-mode-git
9 pkgver=20110216
10 pkgrel=1 
11 pkgdesc="A better Java mode for Emacs"
12 url="https://github.com/espenhw/malabar-mode"
13 arch=('any')
14 license=('GPL2')
15 depends=('emacs>=23.2')
16 makedepends=('git' 'maven')
18 source=('settings.xml')
19 install=$pkgname.install
21 _gitroot="http://github.com/espenhw/malabar-mode.git"
22 _gitname="malabar-mode"
24 _target="malabar-1.4.0"
26 bug_fix_1() {
27     #
28     # Bug:
29     # 
30     # This test failed. I didn't ask about this problem the
31     # author. Maybe a someone could explain a more gentle bugfix
32     # method.
33     # 
35     if [ -e ./src/test/groovy/org/grumblesmurf/malabar/ProjectsTest.groovy ]; then
36         rm ./src/test/groovy/org/grumblesmurf/malabar/ProjectsTest.groovy
37     fi
40 bug_fix_2() {
41     #
42     # Bug:
43     #
44     # There is new error: "mvn: command not found". This code should
45     # fix the bug.
46     #
48     if [ -e /etc/profile.d/maven.sh ]; then
49         source /etc/profile.d/maven.sh
50     fi
53 build() {
54     if [ -d ${srcdir}/$_gitname ] ; then
55         cd $_gitname # && git pull $_target # I'm don't really get into the git and don't really know which parameter to pass to the "git pull" command.
56     else
57         git clone $_gitroot $_gitname
58         cd $_gitname
59         git checkout $_target
60     fi
62     bug_fix_1
63     bug_fix_2
64     
65     mvn package --settings ${srcdir}/settings.xml  || return 1
67     mkdir -p $pkgdir/usr/share/emacs/site-lisp
69     unzip target/${_target}-dist.zip -d $pkgdir/usr/share/emacs/site-lisp/ || return 1
72 md5sums=('358cf38e2f86034c8e9b141948a98b0b')