1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
5 _cmark_gfm_commit=766f161ef6d61019acf3a69f5099489e7d14cd49
7 pkgdesc='CommonMark parser and renderer. Written in C, wrapped in Ruby.'
9 url='https://github.com/ioquatix/markly'
12 checkdepends=(ruby-rspec ruby-rake-compiler)
14 source=(https://github.com/ioquatix/markly/archive/v$pkgver/$pkgname-$pkgver.tar.gz
15 https://github.com/github/cmark-gfm/archive/$_cmark_gfm_commit/cmark-gfm-$_cmark_gfm_commit.tar.gz)
16 sha256sums=('95171c4bbdd621c01e133c5c813343a38d818fef0204651fbe097b9867d288c4'
17 'e95a1300cfe4c5b5ad68af6a77855df823b5d813334910a41991af0f70575d66')
22 ln -s ../cmark-gfm-$_cmark_gfm_commit cmark-gfm
23 sed 's/~>/>=/' -i markly.gemspec
24 sed -i "/task 'test:unit' => :compile/d" Rakefile
28 local _gemdir="$(gem env gemdir)"
30 gem build markly.gemspec
34 --ignore-dependencies \
36 --install-dir "tmp_install/$_gemdir" \
37 --bindir "tmp_install/usr/bin" \
39 find "tmp_install/$_gemdir/gems/" \
46 -iname "gem.build_complete" -o \
50 rm -r tmp_install/$_gemdir/cache
54 local _gemdir="$(gem env gemdir)"
56 GEM_HOME="tmp_install/$_gemdir" rake test
61 cp -a tmp_install/* "$pkgdir"/