summaryrefslogtreecommitdiff
path: root/extra/ruby/PKGBUILD
blob: 760386762c13520fd112f7e7768a6445b793f65e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# $Id: PKGBUILD 143822 2011-11-29 13:33:50Z stephane $
# Maintainer:
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: John Proctor <jproctor@prium.net>
# Contributor: Jeramy Rutley <jrutley@gmail.com>

pkgbase=ruby
pkgname=('ruby' 'ruby-docs')
pkgver=1.9.3_p0
pkgrel=2
pkgdesc="An object-oriented language for quick and easy programming"
arch=('i686' 'x86_64')
url="http://www.ruby-lang.org/en/"
license=('BSD' 'custom')
makedepends=('openssl' 'tk' 'libffi' 'doxygen' 'graphviz' 'libyaml')
options=('!emptydirs' '!makeflags')
source=(ftp://ftp.ruby-lang.org/pub/${pkgbase}/${pkgver%.*}/${pkgbase}-${pkgver//_/-}.tar.bz2)
sha1sums=('f63c116411b981ef54c2caeefb9ccc4d71a5d2cf')

build() {
  cd "${srcdir}/${pkgbase}-${pkgver//_/-}"
  DOXYGEN=/usr/bin/doxygen PKG_CONFIG=/usr/bin/pkg-config ./configure --prefix=/usr --sysconfdir=/etc \
      --enable-shared --enable-pthread --disable-rpath
  make
}

package_ruby() {
  depends=('openssl' 'libffi' 'libyaml')
  provides=('rubygems' 'rake')
  conflicts=('rake')
  optdepends=('tk: for Ruby/TK')

  cd "${srcdir}/${pkgbase}-${pkgver//_/-}"
  make DESTDIR="${pkgdir}" install-nodoc
  install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  install -D -m644 BSDL "${pkgdir}/usr/share/licenses/${pkgname}/BSDL"
}

package_ruby-docs() {
  pkgdesc="Documentation files for ruby"

  cd "${srcdir}/${pkgbase}-${pkgver//_/-}"
  make DESTDIR="${pkgdir}" install-doc install-capi
  install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  install -D -m644 BSDL "${pkgdir}/usr/share/licenses/${pkgname}/BSDL"
}