From 99d3f7603f599d9301c3c4e182e210a4ecb89fa4 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 19 Sep 2011 15:10:54 +0000 Subject: main/ruby-rmagick: rebuild and cleanup Use wget to fetch the sources so the downloaded .gem getch cached Use archdir for archspecific binary files --- main/ruby-rmagick/APKBUILD | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/main/ruby-rmagick/APKBUILD b/main/ruby-rmagick/APKBUILD index 53a4c61c2..976b03233 100644 --- a/main/ruby-rmagick/APKBUILD +++ b/main/ruby-rmagick/APKBUILD @@ -1,9 +1,9 @@ # Contributor: Carlo Landmeter # Maintainer: pkgname=ruby-rmagick -_realname=rmagick +_gemname=rmagick pkgver=2.13.1 -pkgrel=0 +pkgrel=1 pkgdesc="Ruby ImageMagick interface" url="http://rmagick.rubyforge.org" arch="all" @@ -13,19 +13,27 @@ depends_dev="ruby-dev imagemagick-dev freetype-dev jpeg-dev zlib-dev" makedepends="$depends_dev ruby rubygems" install="" subpackages="" -source="" +source="http://gems.rubyforge.org/gems/$_gemname-$pkgver.gem" _builddir="$srcdir"/$_realname-$pkgver build() { - mkdir -p "$_builddir" || return 1 - local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')" - gem install $_realname -v $pkgver -i "$_builddir"$_gemdir \ - --ignore-dependencies --verbose \ - --no-rdoc --no-ri || return 1 - rm -rf "$_builddir"$_gemdir/cache/ + return 0 } package() { + local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')" + local _geminstdir=$_gemdir/gems/$_gemname-$pkgver + local _ruby_archdir=$(ruby -rrbconfig -e "puts Config::CONFIG['archdir']") mkdir -p "$pkgdir" || return 1 - cp -ra "$_builddir"/* "$pkgdir"/ || return 1 + mkdir -p "$pkgdir"/$_ruby_archdir || return 1 + + gem install --local --install-dir "$pkgdir"/$_gemdir \ + --ignore-dependencies --verbose --no-rdoc --no-ri \ + "$srcdir"/$_gemname-$pkgver.gem || return 1 + mv "$pkgdir"/$_geminstdir/lib/*.so "$pkgdir"/$_ruby_archdir/ + rm -rf "$pkgdir"/$_gemdir/cache \ + "$pkgdir"/$_geminstdir/ext \ + "$pkgdir"/$_geminstdir/.require_paths } + +md5sums="f528a83789c5abbe540b6227c08b2f5a rmagick-2.13.1.gem" -- cgit v1.2.3