From 6ccaeaa06c23bf987c9d3368f7162fc23de8707c Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sat, 25 Nov 2017 21:30:10 +0100 Subject: community/ruby-hpricot: move from testing --- community/ruby-hpricot/APKBUILD | 52 +++++++++++++++++++++++++++++++++++ community/ruby-hpricot/rakefile.patch | 9 ++++++ 2 files changed, 61 insertions(+) create mode 100644 community/ruby-hpricot/APKBUILD create mode 100644 community/ruby-hpricot/rakefile.patch (limited to 'community/ruby-hpricot') diff --git a/community/ruby-hpricot/APKBUILD b/community/ruby-hpricot/APKBUILD new file mode 100644 index 0000000000..e176d91577 --- /dev/null +++ b/community/ruby-hpricot/APKBUILD @@ -0,0 +1,52 @@ +# Contributor: Jakub Jirutka +# Maintainer: Jakub Jirutka +# Note: This project is dead, but it's needed for some packages. +pkgname=ruby-hpricot +_gemname=hpricot +pkgver=0.8.6 +pkgrel=0 +pkgdesc="A swift, liberal HTML parser with a fantastic library (legacy)" +url="https://github.com/hpricot/hpricot" +arch="all" +license="MIT" +checkdepends="ruby-test-unit" +makedepends="ruby-dev" +source="$pkgname-$pkgver.tar.gz::https://github.com/hpricot/$_gemname/archive/$pkgver.tar.gz + rakefile.patch" +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" + + local file; for file in test/test_*.rb; do + ruby -I dist/gems/$_gemname-$pkgver/lib -I test $file + done +} + +package() { + local gemdir="$pkgdir/$(ruby -rubygems -e 'puts Gem.default_dir')" + cd "$builddir"/dist + + mkdir -p "$gemdir" + cp -r extensions gems specifications "$gemdir"/ + + # Remove unnecessary files and rubbish... + find "$gemdir"/extensions/ -name mkmf.log -delete + cd "$gemdir"/gems/$_gemname-$pkgver + rm -r ext/ lib/*.so test/ CHANGELOG* COPYING README* Rakefile +} + +sha512sums="0b35295745d36483fbd0c0ea7751c9e9672efdc3738145991a4799e3e2f75ec05cc833b28eacb45631a805b760b6f83a179bbbd830a3b30ea25749d243f527d7 ruby-hpricot-0.8.6.tar.gz +3e6c479302af5964a036ca2c9a9616f3e65f5c0dc60aaf11d3ea5eae2016babd0fd88dfbc6c914a56fd85a2641f6d9ec1b75099bebe0599da530f35e81f26df0 rakefile.patch" diff --git a/community/ruby-hpricot/rakefile.patch b/community/ruby-hpricot/rakefile.patch new file mode 100644 index 0000000000..3ccf91873d --- /dev/null +++ b/community/ruby-hpricot/rakefile.patch @@ -0,0 +1,9 @@ +Don't load bundler. + +--- a/Rakefile ++++ b/Rakefile +@@ -1,4 +1,3 @@ +-require 'bundler/setup' + ENV.delete('RUBYOPT') # Don't propagate RUBYOPT/Bundler to subprocesses + require 'rake/clean' + require 'rubygems/package_task' -- cgit v1.2.3