aboutsummaryrefslogtreecommitdiffstats
path: root/community/ruby-multi_json/APKBUILD
blob: 073a960daf4ec4ef318d74b57c4b01a6e244e195 (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.13.1
pkgrel=0
pkgdesc="A gem to provide easy switching between different JSON backends"
url="https://rubygems.org/gems/multi_json"
arch="noarch"
license="MIT"
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 -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="7c98392bd1c909fcc05249a02a010b561bf6c2d812ae42413d6e8dafa62926d8cb76226ded4c61558a00e5fa531ba33b6f4ef562648c52ba9b552ff7b7e27682  ruby-multi_json-1.13.1.tar.gz"