diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-09-19 15:10:54 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-09-19 15:12:30 +0000 |
commit | 99d3f7603f599d9301c3c4e182e210a4ecb89fa4 (patch) | |
tree | 4ec779dd03510062949ca0d0ea16ba8f9492f3e0 /main/ruby-rmagick | |
parent | c062da781d413868316199a79ebe3b352e41abe0 (diff) | |
download | aports-99d3f7603f599d9301c3c4e182e210a4ecb89fa4.tar.bz2 aports-99d3f7603f599d9301c3c4e182e210a4ecb89fa4.tar.xz |
main/ruby-rmagick: rebuild and cleanup
Use wget to fetch the sources so the downloaded .gem getch cached
Use archdir for archspecific binary files
Diffstat (limited to 'main/ruby-rmagick')
-rw-r--r-- | main/ruby-rmagick/APKBUILD | 28 |
1 files 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 <clandmeter@alpinelinux.org> # 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" |