summaryrefslogtreecommitdiffstats
path: root/main/ruby-rmagick/APKBUILD
blob: 6091c3b7c97c83cfae84da2580b2d06a1d29c2af (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
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer:
pkgname=ruby-rmagick
_gemname=rmagick
pkgver=2.13.1
pkgrel=2
pkgdesc="Ruby ImageMagick interface"
url="http://rmagick.rubyforge.org"
arch="all"
license="custom"
depends="ruby ghostscript-fonts"
depends_dev="ruby-dev imagemagick-dev freetype-dev jpeg-dev zlib-dev"
makedepends="$depends_dev ruby rubygems"
install=""
subpackages=""
source="http://gems.rubyforge.org/gems/$_gemname-$pkgver.gem"

_builddir="$srcdir"/$_realname-$pkgver
build() {
	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
	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"