1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 19:25:25 +03:00
aports/testing/ruby-addressable/APKBUILD
Jakub Jirutka 6378e7f67a testing/ruby-addressable: new aport
Required for jekyll.
2021-07-01 13:38:53 +02:00

54 lines
1.3 KiB
Text

# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ruby-addressable
_gemname=addressable
pkgver=2.7.0
pkgrel=0
pkgdesc="An alternative implementation to the URI implementation"
url="https://github.com/sporkmonger/addressable"
arch="noarch"
license="Apache-2.0"
depends="ruby ruby-public_suffix"
checkdepends="ruby-rspec"
source="https://github.com/sporkmonger/addressable/archive/$_gemname-$pkgver.tar.gz"
builddir="$srcdir/$_gemname-$_gemname-$pkgver"
options="!check" # FIXME: tests require gem rspec-its which we don't have yet
prepare() {
default_prepare
# Bundler is not necessary.
sed -i '/require .bundler\/setup/d' spec/spec_helper.rb
}
build() {
gem build $_gemname.gemspec
}
check() {
rspec .
}
package() {
local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')"
local geminstdir="$gemdir/gems/$_gemname-$pkgver"
gem install \
--local \
--install-dir "$gemdir" \
--ignore-dependencies \
--no-document \
--verbose \
$_gemname
# Remove unnecessary files and rubbish...
cd "$gemdir"
rm -r cache build_info doc extensions
cd "$geminstdir"
rm -rf spec tasks test LICENSE* Gemfile Rakefile *.md
}
sha512sums="
507a9757a93b6cc7047a6d8226221242509a8895fce961d7b7e86c62c864eb646584cc1e3b8f6634a8578bc06a098403404bbee9b94f1c53d59503ca7408781f addressable-2.7.0.tar.gz
"