updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / jgit-git / PKGBUILD
blob087e282b4740c0bc3c2e75a07cae3e3e8fdb3a50
1 # Contributor: xduugu
2 pkgname=jgit-git
3 pkgver=20090822
4 pkgrel=1
5 pkgdesc="A 100% pure java implementation of git"
6 arch=('i686' 'x86_64')
7 url="http://www.jgit.org/"
8 license=('BSD')
9 depends=('java-runtime')
10 makedepends=('git' 'java-environment')
11 conflicts=('jgit')
13 _gitroot="git://repo.or.cz/jgit.git"
14 _gitname="jgit"
16 build() {
17         msg "Connecting to GIT server...."
19         if [ -d "$_gitname" ] ; then
20                 (cd "$_gitname" && git pull origin)
21                 msg "The local files are updated."
22         else
23                 git clone "$_gitroot" "$_gitname"
24         fi
26         msg "GIT checkout done or server timeout"
27         msg "Starting make..."
29         rm -rf "$srcdir/$_gitname-build"
30         git clone "$_gitname" "$_gitname-build" || return 1
31         cd "$srcdir/$_gitname-build"
33         # build jgit
34         sh make_jgit.sh || return 1
36         # include some files which are needed by eclipse
37         sed -i "s/^\(Bundle-Version:.*\)qualifier$/\1$(date +%Y%m%d%H%M)/" \
38                         org.spearce.jgit/META-INF/MANIFEST.MF &&
39         jar ufm jgit.jar org.spearce.jgit/META-INF/MANIFEST.MF \
40                         -C org.spearce.jgit plugin.properties || return 1
42         # update provides array
43         [ 1 ] && provides=('jgit='$(grep Bundle-Version \
44                                                         org.spearce.jgit/META-INF/MANIFEST.MF | cut -f2 -d' '))
46         # install files
47         install -D -m755 jgit "$pkgdir/usr/bin/jgit" &&
48         install -D -m644 jgit.jar \
49                 "$pkgdir/usr/share/java/${pkgname%-*}/org.spearce.jgit.jar" || return 1
52 # vim:set ts=2 sw=2 noet: