summaryrefslogtreecommitdiff
path: root/skip/ruby-kramdown/ruby-kramdown.xibuild
blob: 10885f93866068f75cdf3e40d9f12c6fa716d9d0 (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
47
#!/bin/sh

NAME="ruby-kramdown"
_gemname=kramdown
DESC="A fast, pure Ruby Markdown superset converter"

MAKEDEPS="ruby-rake"

PKG_VER=2.3.2
ver=REL_$(echo $PKG_VER | sed 's/\./_/g')
SOURCE="https://github.com/gettalong/kramdown/archive/$ver/ruby-kramdown-$PKG_VER.tar.gz"

ADDITIONAL="
gemspec.patch
"

prepare() {
	apply_patches &&
	rm test/testcases/block/04_header/with_auto_ids.*
}

build() {
	rake gemspec &&
	gem build $_gemname.gemspec
}

check() {
	rake test
}

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

	gem install \
		--local \
		--install-dir "$gemdir" \
		--bindir "$PKG_DEST/usr/bin" \
		--ignore-dependencies \
		--no-document \
		--verbose \
		$_gemname

	# Remove unnecessary files and rubbish...
	cd "$gemdir"
	rm -r cache build_info doc extensions
}