1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-12 18:59:50 +03:00

testing/ruby-path_expander: new aport

This commit is contained in:
Will Sinatra 2024-10-24 21:53:25 -04:00 committed by achill (fossdd)
parent 0089a0d412
commit 5a2691a069
2 changed files with 81 additions and 0 deletions

View file

@ -0,0 +1,59 @@
# Contributor: Will Sinatra <wpsinatra@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
maintainer="Will Sinatra <wpsinatra@gmail.com>"
pkgname=ruby-path_expander
_gemname=${pkgname#ruby-}
pkgver=1.1.3
pkgrel=0
pkgdesc="pre-process cli arguments by expanding directories into constituent files"
url="https://rubygems.org/gems/path_expander"
arch="noarch"
license="MIT"
depends="ruby"
checkdepends="ruby-rake ruby-bundler ruby-minitest ruby-hoe ruby-rdoc"
source="$pkgname-$pkgver.tar.gz::https://github.com/seattlerb/path_expander/archive/refs/tags/v$pkgver.tar.gz
https://rubygems.org/downloads/$_gemname-$pkgver.gem
LICENSE"
builddir="$srcdir/$_gemname-$pkgver"
prepare() {
default_prepare
# Generate gemspec (there's no gemspec in the source).
gem specification -l --ruby "$srcdir"/$_gemname-$pkgver.gem \
> "$builddir"/$_gemname.gemspec
}
build() {
gem build $_gemname.gemspec
}
check() {
rake test
}
package() {
local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')"
gem install --local \
--install-dir "$gemdir" \
--ignore-dependencies \
--no-document \
--verbose \
$_gemname
rm -r "$gemdir"/cache \
"$gemdir"/build_info \
"$gemdir"/doc
cd "$gemdir/gems/$_gemname-$pkgver"
rm -r ./*.rdoc ./*.txt Rakefile .autotest test
install -Dm644 "$srcdir"/LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
}
sha512sums="
70d45086ff33b4493272661e8e41692be284f0ee7174743031fce7cf62d059cd4c0045a334c71b24a56a77e21965645133134b8437f230be8041ae76220e4103 ruby-path_expander-1.1.3.tar.gz
b522a7b43b72e33dd3d176067cbb53417620f13ee0c270993edcd3c9bc7ab0f36ecaa8feca0bca258c416ecf37855e1eb1ca2abbafccbbd08ed7a19a3556a035 path_expander-1.1.3.gem
ecc55c268e6b239014a971b80e57149b0c9aeac0de81883f9d6a92641f3223d069bdb56462bc5ca5813f1cb34ba58ab8c38435ef1bcaa6d040eaa0834f750189 LICENSE
"

View file

@ -0,0 +1,22 @@
(The MIT License)
Copyright (c) Ryan Davis, seattle.rb
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.