45 lines
1.2 KiB
Bash
45 lines
1.2 KiB
Bash
# Maintainer: Mario Finelli <mario at finel dot li>
|
|
|
|
_gemname=formatador
|
|
pkgname=ruby-$_gemname
|
|
pkgver=0.3.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")
|
|
b2sums=('228773d700810c5fa0b40b589bf0180346baf9b46cd2c87394def5a69e29a062db3de8c95b03351a87dadcd33d2d91a2fe2f6aa0bc76e5e5ef4ce05cdf495e1c')
|
|
|
|
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
|
|
|
|
}
|