summaryrefslogtreecommitdiffstats
path: root/abs/extra/ruby
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-08-07 20:47:36 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-08-07 20:47:36 (GMT)
commit332aa4a482d846911cc534ff552478f884a23ece (patch)
tree5cbe37d302f7bd46e60cb8ef3100d34d8f3a566d /abs/extra/ruby
parent21d789843e7ba00e7378abf55964b5865695999c (diff)
downloadlinhes_pkgbuild-332aa4a482d846911cc534ff552478f884a23ece.zip
linhes_pkgbuild-332aa4a482d846911cc534ff552478f884a23ece.tar.gz
linhes_pkgbuild-332aa4a482d846911cc534ff552478f884a23ece.tar.bz2
ruby 1.9.3
Diffstat (limited to 'abs/extra/ruby')
-rw-r--r--abs/extra/ruby/PKGBUILD79
-rw-r--r--abs/extra/ruby/gemrc5
-rw-r--r--abs/extra/ruby/ruby.install22
3 files changed, 69 insertions, 37 deletions
diff --git a/abs/extra/ruby/PKGBUILD b/abs/extra/ruby/PKGBUILD
index e990221..0845452 100644
--- a/abs/extra/ruby/PKGBUILD
+++ b/abs/extra/ruby/PKGBUILD
@@ -1,51 +1,56 @@
-# $Id: PKGBUILD 96253 2010-10-19 15:06:00Z stephane $
-# Maintainer: Allan McRae <allan@archlinux.org>
+# Maintainer: Thomas Dziedzic <gostrc@gmail.com>
+# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: John Proctor <jproctor@prium.net>
# Contributor: Jeramy Rutley <jrutley@gmail.com>
-pkgname=('ruby' 'ruby-docs')
-pkgver=1.9.2_p0
-_pkgver=1.9.2-p0
-pkgrel=4
-pkgdesc="An object-oriented language for quick and easy programming"
+pkgname=ruby
+pkgver=1.9.3_p194
+pkgrel=2
+pkgdesc='An object-oriented language for quick and easy programming'
arch=('i686' 'x86_64')
-url="http://www.ruby-lang.org/en/"
-license=('custom')
-makedepends=('gdbm' 'db' 'openssl' 'zlib' 'readline' 'tk' 'libffi'
- 'doxygen' 'graphviz')
-options=('!emptydirs')
-source=("ftp://ftp.ruby-lang.org/pub/ruby/1.9/${pkgname}-${_pkgver}.tar.bz2")
-md5sums=('d8a02cadf57d2571cd4250e248ea7e4b')
-sha256sums=('e9710990ed8c2e794123aba509010471915fb13c27dae0118831d2001a9c8d3b')
+url='http://www.ruby-lang.org/en/'
+license=('BSD' 'custom')
+backup=('etc/gemrc')
+provides=('rubygems' 'rake')
+conflicts=('rake')
+depends=('openssl' 'libffi' 'libyaml')
+makedepends=('tk')
+optdepends=('tk: for Ruby/TK'
+ 'ruby-docs: Ruby documentation')
+options=('!emptydirs' '!makeflags')
+install='ruby.install'
+source=("ftp://ftp.ruby-lang.org/pub/ruby/${pkgver%.*}/ruby-${pkgver//_/-}.tar.bz2"
+ 'gemrc')
+md5sums=('2278eff4cfed3cbc0653bc73085caa34'
+ '6fb8e7a09955e0f64be3158fb4a27e7a')
build() {
- cd "${srcdir}/${pkgname}-${_pkgver}"
- ./configure --prefix=/usr \
- --enable-shared \
- --enable-pthread \
- --disable-rpath
+ cd ruby-${pkgver//_/-}
+
+ PKG_CONFIG=/usr/bin/pkg-config ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --enable-shared \
+ --enable-pthread \
+ --disable-rpath \
+ --disable-install-doc
+
make
}
-package_ruby()
-{
- depends=('gdbm' 'db' 'openssl' 'zlib' 'readline' 'libffi')
- provides=('rubygems' 'rake')
- conflicts=('rubygems' 'rake')
- optdepends=('tk: for Ruby/TK')
+check() {
+ cd ruby-${pkgver//_/-}
- cd "${srcdir}/${pkgname}-${_pkgver}"
- make DESTDIR="${pkgdir}" install-nodoc
- install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+ make test
}
-package_ruby-docs()
-{
- pkgdesc="Documentation files for ruby"
- #arch=('any')
- depends=('ruby')
+package() {
+ cd ruby-${pkgver//_/-}
+
+ make DESTDIR="${pkgdir}" install-nodoc
+
+ install -D -m644 ${srcdir}/gemrc "${pkgdir}/etc/gemrc"
- cd "${srcdir}/${pkgname}-${_pkgver}"
- make -j1 DESTDIR="${pkgdir}" install-doc install-capi
- install -Dm644 COPYING "${pkgdir}/usr/share/licenses/ruby-docs/COPYING"
+ install -D -m644 COPYING "${pkgdir}/usr/share/licenses/ruby/LICENSE"
+ install -D -m644 BSDL "${pkgdir}/usr/share/licenses/ruby/BSDL"
}
diff --git a/abs/extra/ruby/gemrc b/abs/extra/ruby/gemrc
new file mode 100644
index 0000000..3d11de1
--- /dev/null
+++ b/abs/extra/ruby/gemrc
@@ -0,0 +1,5 @@
+# Read about the gemrc format at http://docs.rubygems.org/read/chapter/11
+
+# --user-install is used to install to $HOME/.gem/ by default since we want to separate
+# pacman installed gems and gem installed gems
+gem: --user-install
diff --git a/abs/extra/ruby/ruby.install b/abs/extra/ruby/ruby.install
new file mode 100644
index 0000000..ce78e96
--- /dev/null
+++ b/abs/extra/ruby/ruby.install
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+print_gem_default_target() {
+ echo 'The default location of gem installs is $HOME/.gem/ruby'
+ echo 'Add the following line to your PATH if you plan to install using gem'
+ echo '$(ruby -rubygems -e "puts Gem.user_dir")/bin'
+ echo 'If you want to install to the system wide location, you must either:'
+ echo 'edit /etc/gemrc or run gem with the --no-user-install flag.'
+}
+
+# arg 1: the new package version
+post_install() {
+ print_gem_default_target
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ if [ "$(vercmp $2 1.9.3_p125-4)" -lt 0 ]; then
+ print_gem_default_target
+ fi
+}