aboutsummaryrefslogtreecommitdiffstats
path: root/main/ruby-redcarpet/APKBUILD
blob: 0fa3cdefab37ab76e2eaba3afc8a86f46a444f50 (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
# Contributor: Markus M. May <triplem@javafreedom.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_gemname=redcarpet
pkgname=ruby-$_gemname
# redmine 3.0.5 needs ~> 3.3.2
pkgver=3.3.2
pkgrel=0
pkgdesc="A fast, safe and extensible Markdown to (X)HTML parser"
url="http://github.com/vmg/redcarpet"
arch="all"
license="MIT"
depends="ruby"
depends_dev=
makedepends="$depends_dev ruby-dev"
install=""
subpackages=""
source="http://gems.rubyforge.org/gems/$_gemname-$pkgver.gem"

_builddir="$srcdir"/$_realname-$pkgver
build() {
	return 0
}

package() {
	local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')"
	local _geminstdir=$_gemdir/gems/$_gemname-$pkgver
	mkdir -p "$pkgdir" || return 1

	gem install --local --install-dir "$pkgdir"/$_gemdir \
		--ignore-dependencies --verbose --no-rdoc --no-ri \
		"$srcdir"/$_gemname-$pkgver.gem || return 1
	rm -rf "$pkgdir"/$_gemdir/cache \
		"$pkgdir"/$_geminstdir/ext \
		"$pkgdir"/$_geminstdir/.require_paths
	
	cd "$pkgdir"
	for i in usr/lib/ruby/gems/*/bin/*; do
		if [ -e "$i" ]; then
			mkdir -p "$pkgdir"/usr/bin
			ln -s /$i "$pkgdir"/usr/bin/
		fi
	done
}

md5sums="048b42d499b37c6dd02f2e438758f9b0  redcarpet-3.3.2.gem"
sha256sums="d5e66126a19f09f5334bd257d53ace49dcca251d6e59f9254cfb49c4b22dc9f5  redcarpet-3.3.2.gem"
sha512sums="625855e7d0cf92096afd013e9c4f2fac308d4885c31a5c54450a88a88ec4a887b7dfc23f24a090ee4e3b94482173fcd2d98e5046216d367b6f36a126064add90  redcarpet-3.3.2.gem"