# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=ruby-rdiscount _gemname=rdiscount pkgver=2.2.7.1 pkgrel=0 pkgdesc="Fast Implementation of Gruber's Markdown in C" url="https://dafoster.net/projects/rdiscount/" arch="all" license="BSD-3-Clause" checkdepends="perl ruby-test-unit tidyhtml" makedepends="ruby-dev ruby-rake" subpackages="$pkgname-doc" source="$pkgname-$pkgver.tar.gz::https://github.com/davidfstr/$_gemname/archive/$pkgver.tar.gz" builddir="$srcdir/$_gemname-$pkgver" build() { gem build $_gemname.gemspec gem install --local \ --install-dir dist \ --ignore-dependencies \ --no-document \ --verbose \ $_gemname } check() { rake test } package() { local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')" cd "$builddir"/dist mkdir -p "$gemdir" cp -r extensions gems specifications "$gemdir"/ install -D -m 755 bin/$_gemname "$pkgdir"/usr/bin/$_gemname # Remove unnecessary files and rubbish... find "$gemdir"/extensions/ -name mkmf.log -delete cd "$gemdir"/gems/$_gemname-$pkgver install -D -m644 man/$_gemname.1 -t "$pkgdir"/usr/share/man/man1/ install -D -m644 COPYING -t "$pkgdir"/usr/share/licenses/$pkgname/ # Remove unnecessary files and rubbish... rm -r ext/ lib/*.so man/ test/ COPYING Rakefile BUILDING README* || true } sha512sums=" 476992b438ec364590ac9b8d680a1d52c56a9a49cc2a400637f3ba35aa44653cc3c5cc882631afe3eaa394c07dfb785416257321486e2a0589459c63886623d3 ruby-rdiscount-2.2.7.1.tar.gz "