# Contributor: Seung Soo Mun <hamletmun@gmail.com>
# Maintainer:
_gemname=sanitize
pkgname=ruby-$_gemname
pkgver=2.1.0
pkgrel=0
pkgdesc="Whitelist-based HTML sanitizer"
url="http://rubygems.org/gems/$_gemname"
arch="noarch"
license="MIT"
depends="ruby ruby-nokogiri"
depends_dev=""
makedepends="$depends_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
}

md5sums="de4969351643836ca2a48d010167ba03  sanitize-2.1.0.gem"
sha256sums="c3be075f5b38a1b02404be5778b181e50fba9ab253bac851cb217d9a71375b77  sanitize-2.1.0.gem"
sha512sums="29a26e37342a75af2bc7795578edf2c5064263c58d38dfc36e18f1e111271616c026f7d808a05d63185c12f0e52384db84d62bdb796bf1b21d7e902ef0c1d096  sanitize-2.1.0.gem"