diff options
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 53a4c61c2a..976b03233d 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" |