summaryrefslogtreecommitdiff
path: root/repo/ruby-mustache/ruby-mustache.xibuild
blob: 8074a81c0f09d99076f60319883b944635a62830 (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
43
44
45
46
#!/bin/sh

NAME="ruby-mustache"
_gemname=mustache
DESC="Logic-less Ruby templates"

MAKEDEPS=""

PKG_VER=1.1.1
SOURCE="ruby-mustache-$PKG_VER.tar.gz::https://github.com/mustache/mustache/archive/v$PKG_VER.tar.gz"

ADDITIONAL="
fix-test-race-condition.patch
skip-simplecov.patch
"

prepare () {
    apply_patches
}

build() {
	gem build $_gemname.gemspec
}

check() {
	rake test
}

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

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

	# Remove unnecessary files and rubbish...
	cd "$gemdir"
	rm -r cache build_info doc
	cd "$geminstdir"
	rm -r test man Rakefile *.md
}