Skip to content

Instantly share code, notes, and snippets.

@basus
Created February 19, 2011 04:05
Show Gist options
  • Save basus/834809 to your computer and use it in GitHub Desktop.
Save basus/834809 to your computer and use it in GitHub Desktop.
PKGBUILD file for building JRuby from Git on Arch Linux
# $Id$
# Maintainer: Shrutarshi Basu <[email protected]>
# Contributor: Shrutarshi Basu <[email protected]>
pkgname=jruby-git
pkgver=20110218
pkgrel=1
pkgdesc="JRuby is an 100% pure-Java implementation of the Ruby programming language."
url="http://jruby.org/"
license=('CPL' 'GPL' 'LGPL')
arch=('x86_64' 'i686')
depends=(jdk)
provides=(jruby)
conflicts=(jruby)
makedepends=(git apache-ant)
replaces=(jruby-svn)
options=(!strip)
_gitroot="git://github.com/jruby/jruby.git"
_gitname="jruby"
build() {
cd "$srcdir"
msg "Connecting to GIT server...."
if [ -d $_gitname ] ; then
cd $_gitname && git pull origin
msg "The local files are updated."
else
git clone $_gitroot $_gitname
fi
msg "GIT checkout done or server timeout"
msg "Starting make..."
rm -rf "$srcdir/$_gitname-build"
git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
cd "$srcdir/$_gitname-build"
ant clean
ant
}
package() {
mkdir -p "$pkgdir/opt/jruby/"
cd "$srcdir/$_gitname-build"
cp -r bin/ "$pkgdir/opt/jruby/"
cp -r docs/ "$pkgdir/opt/jruby/"
cp -r lib/ "$pkgdir/opt/jruby/"
cp -r samples/ "$pkgdir/opt/jruby/"
cp -r share/ "$pkgdir/opt/jruby/"
cp -r tool/ "$pkgdir/opt/jruby/"
cp -r COPYING "$pkgdir/opt/jruby/"
cp -r LICENSE.RUBY "$pkgdir/opt/jruby/"
cp -r README "$pkgdir/opt/jruby/"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment