aboutsummaryrefslogtreecommitdiffstats
path: root/community/ruby-rdiscount
diff options
context:
space:
mode:
Diffstat (limited to 'community/ruby-rdiscount')
-rw-r--r--community/ruby-rdiscount/APKBUILD61
1 files changed, 61 insertions, 0 deletions
diff --git a/community/ruby-rdiscount/APKBUILD b/community/ruby-rdiscount/APKBUILD
new file mode 100644
index 0000000000..2bc652f113
--- /dev/null
+++ b/community/ruby-rdiscount/APKBUILD
@@ -0,0 +1,61 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=ruby-rdiscount
+_gemname=rdiscount
+pkgver=2.2.0.1
+pkgrel=1
+pkgdesc="Fast Implementation of Gruber's Markdown in C"
+url="http://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() {
+ cd "$builddir"
+
+ gem build $_gemname.gemspec
+ gem install --local \
+ --install-dir dist \
+ --ignore-dependencies \
+ --no-document \
+ --verbose \
+ $_gemname
+}
+
+check() {
+ cd "$builddir"
+ rake test
+}
+
+package() {
+ local gemdir="$pkgdir/$(ruby -rubygems -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
+
+ _mv man/$_gemname.1 "$pkgdir"/usr/share/man/man1/
+ _mv COPYING "$pkgdir"/usr/share/licenses/$pkgname/
+
+ # Remove unnecessary files and rubbish...
+ rm -r ext/ lib/*.so man/ test/ Rakefile BUILDING README* || true
+}
+
+_mv() {
+ local dest; for dest; do true; done # get last argument
+ mkdir -p "$dest"
+ mv $@
+}
+
+sha512sums="9ed19ce988a6253a15a883047fcf83def23f29efb301507e16ea0402ceded6e67eb13620643063bbae733ad6f98100b79a5a02aefe0a4d5d03969816014e1617 ruby-rdiscount-2.2.0.1.tar.gz"