updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / ruby1.8 / PKGBUILD
blobc28cdbb7e59e6434c6bcaee82c36ba55ea8e8d0d
1 # Maintainer: Kaiting Chen <kaitocracy@gmail.com>
2 # Contributor: v01d
3 # Contributor: cs96and
5 pkgname=ruby1.8
6 _pkgname='ruby'
7 pkgver=1.8.7_p357
8 _pkgver="${pkgver/_/-}"
9 pkgrel=1
10 pkgdesc='An object-oriented language for quick and easy programming'
11 arch=('any')
12 license=('custom')
13 url='http://www.ruby-lang.org/en/'
14 provides=('ruby=1.8.7')
15 options=('!emptydirs')
16 makedepends=('tk')
17 depends=('gdbm' 'db' 'openssl' 'zlib' 'readline')
18 optdepends=('tk: for Ruby/TK')
20 source=(ftp://ftp.ruby-lang.org/pub/ruby/1.8/$_pkgname-$_pkgver.tar.bz2 fix.patch)
21 md5sums=('3abd9e2a29f756a0d30c7bfca578cdeb' 'f560402603b3dca36d4a6abfcb180cb9')
23 build() {
24   cd "${srcdir}/${_pkgname}-${_pkgver}"
25   ./configure \
26     --prefix=/opt/ruby1.8 \
27     --disable-rpath \
28     --enable-shared \
29     --enable-pthread
30   patch -Np1 < ${srcdir}/fix.patch
31   make
34 package() {
35   cd "${srcdir}/${_pkgname}-${_pkgver}"
37   make DESTDIR="$pkgdir" install
39   install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
41   install -dm755 $pkgdir/usr/bin
42   install -dm755 $pkgdir/usr/lib
43   for i in erb irb rdoc ri ruby testrb; do
44     ln -s /opt/ruby1.8/bin/$i $pkgdir/usr/bin/$i-1.8
45   done
46   ln -s /opt/ruby1.8/lib/libruby.so.1.8 $pkgdir/usr/lib/libruby.so.1.8