updated on Tue Jan 10 08:08:34 UTC 2012
[aur-mirror.git] / craftbukkit-git / PKGBUILD
blob7b54394d21206d2e215360a27f69b22899b4c969
1 # Maintainer: Chris Hodapp <clhodapp1@gmail.com>
2 pkgname=craftbukkit-git
3 pkgver=20110920
4 pkgrel=1
5 pkgdesc="Implementation of Bukkit Minecraft Server Mod API (git)"
6 arch=(any)
7 url="http://bukkit.org"
8 license=('LGPL')
9 depends=('tmux' 'java-runtime')
10 makedepends=('git' 'maven')
11 provides=('craftbukkit')
12 conflicts=('craftbukkit')
13 install=craftbukkit-git.install
14 source=('craftbukkit.sh' 'craftbukkit.rc' 'cbconsole.sh')
15 md5sums=('e92ee0d9faee447d747854460b3c82ac'
16          'aaa4b5beecdfa785c749a6d1691e3e87'
17          'afd4c600d9f0b6c165e3002df08c4a85')
19 _gitroot=https://github.com/Bukkit/CraftBukkit.git
20 _gitname=craftbukkit
22 build() {
23         cd "$srcdir"
24         msg "Connecting to GIT server...."
26         if [[ -d "$_gitname" ]]
27         then
28                 cd "$_gitname" && git pull origin
29                 msg "The local files are updated."
30         else
31                 git clone "$_gitroot" "$_gitname"
32         fi
34         msg "GIT checkout done or server timeout"
35         msg "Starting build..."
36         cd "$srcdir/$_gitname"
37         /opt/maven/bin/mvn dependency:purge-local-repository
38         /opt/maven/bin/mvn package
41 package() {
42         cd "$srcdir/$_gitname"
43         mkdir -p "$pkgdir/opt/craftbukkit/plugins"
44         mkdir -p "$pkgdir/etc/rc.d"
45         mkdir -p "$pkgdir/usr/bin"
46         install -m 644 "$srcdir/craftbukkit/target/craftbukkit-0.0.1-SNAPSHOT.jar" "$pkgdir/opt/craftbukkit"
47         install -m 755 "$srcdir/craftbukkit.sh" "$pkgdir/opt/craftbukkit/craftbukkit"
48         install -m 755 "$srcdir/craftbukkit.rc" "$pkgdir/etc/rc.d/craftbukkit"
49         install -m 755 "$srcdir/cbconsole.sh" "$pkgdir/usr/bin/cbconsole"