aboutsummaryrefslogtreecommitdiffstats
path: root/community/ruby-multi_json/APKBUILD
blob: 72d27231b6be41c858b8e823da2abba82a469430 (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
40
41
42
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ruby-multi_json
_gemname=${pkgname#ruby-}
pkgver=1.12.2
pkgrel=0
pkgdesc="A gem to provide easy switching between different JSON backends"
url="https://rubygems.org/gems/multi_json"
arch="noarch"
license="custom"
depends="ruby"
source="$pkgname-$pkgver.tar.gz::https://github.com/intridea/$_gemname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_gemname-$pkgver"

prepare() {
	default_prepare

	cd "$builddir"
	sed -i '/spec.signing_key/d' $_gemname.gemspec
}

build() {
	cd "$builddir"
	gem build $_gemname.gemspec
}

package() {
	local gemdir="$pkgdir/$(ruby -rubygems -e 'puts Gem.default_dir')"
	local geminstdir="$gemdir/gems/$_gemname-$pkgver"

	cd "$builddir"

	gem install --local \
		--install-dir "$gemdir" \
		--ignore-dependencies \
		--no-document \
		--verbose \
		$_gemname

	rm "$geminstdir"/*.md
}

sha512sums="bbbdd05a6dd12052aa3e09389f47212f15799310d5c265057f7ca801622d32295d1f0844b37e51f8f1fd2d48e4430234f99bc6de4b9ed149e81d9a33a831e6d9  ruby-multi_json-1.12.2.tar.gz"