46 lines
1.3 KiB
Bash
46 lines
1.3 KiB
Bash
# Maintainer: Mario Finelli <mario at finel dot li>
|
|
|
|
_gemname=formatador
|
|
pkgname=ruby-$_gemname
|
|
pkgver=1.0.0
|
|
pkgrel=1
|
|
pkgdesc="STDOUT text formatting"
|
|
arch=('any')
|
|
url="https://github.com/geemus/formatador"
|
|
license=('MIT')
|
|
depends=('ruby')
|
|
makedepends=('ruby-rdoc')
|
|
options=('!emptydirs')
|
|
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
|
|
noextract=("$_gemname-$pkgver.gem")
|
|
sha512sums=('8e81fc78b0e7e9a5b57f8e845477f725d7de3843f78f3e83ea63ac8eac5a8abfddc01ed6874ff560f26d2f6a953b5489e933bbb921e5bd577facbf1fa120459a')
|
|
b2sums=('bf1f9f32a6fa984ab06c4015f9f93957a7afe8ec1b1156e5b293d0f93cb1475d1f4633705efc9ff96af7170aa36daba230281e9a5bf0787e97d9439ae0263422')
|
|
|
|
package() {
|
|
local _gemdir="$(ruby -e'puts Gem.default_dir')"
|
|
|
|
gem install \
|
|
--verbose \
|
|
--ignore-dependencies \
|
|
--no-user-install \
|
|
--install-dir "$pkgdir/$_gemdir" \
|
|
--bindir "$pkgdir/usr/bin" \
|
|
"$_gemname-$pkgver.gem"
|
|
|
|
# delete cache
|
|
cd "$pkgdir/$_gemdir"
|
|
rm -vrf cache
|
|
|
|
# delete unnecessary files & folders
|
|
cd "gems/$_gemname-$pkgver"
|
|
rm -vrf "$_gemname.gemspec" tests Rakefile Gemfile
|
|
|
|
# move license
|
|
install -vd "$pkgdir/usr/share/licenses/$pkgname"
|
|
mv -vt "$pkgdir/usr/share/licenses/$pkgname" LICENSE.md
|
|
|
|
# move documentation
|
|
install -vd "$pkgdir/usr/share/doc/$pkgname"
|
|
mv -vt "$pkgdir/usr/share/doc/$pkgname" *.md changelog.txt
|
|
|
|
}
|