summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMario Finelli2023-04-12 16:55:59 +0200
committerMario Finelli2023-04-12 16:55:59 +0200
commit7570b71aac1a404694b383ffe04720ce27d02e6f (patch)
tree06d9a5829e94d6c820ff5c62ef42d8d989c6efcf /PKGBUILD
parent78718bf5cc000bcb4baacaec92f4a65cb227d291 (diff)
downloadaur-ruby-tty-which.tar.gz
upgpkg: ruby-tty-which 0.5.0-1
upstream release
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD57
1 files changed, 41 insertions, 16 deletions
diff --git a/PKGBUILD b/PKGBUILD
index cf4a54d00c61..d93acae9180d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,21 +1,46 @@
-# Maintainer: Tom Vincent <aur@tlvince.com>
-pkgname=ruby-tty-which
+# Maintainer: Mario Finelli <mario at finel dot li>
+# Contributor: Tom Vincent <aur@tlvince.com>
+
_gemname=tty-which
-pkgver=0.4.2
+pkgname=ruby-$_gemname
+pkgver=0.5.0
pkgrel=1
-pkgdesc="Cross-platform implementation of Unix which command"
-arch=('any')
-url="https://github.com/piotrmurach/tty-which"
-license=('MIT')
-depends=('ruby')
-makedepends=('rubygems')
-source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
-noextract=("${_gemname}-${pkgver}.gem")
-md5sums=('2418a6f6dbe3eda6d1af13c11b3e4f3e')
+pkgdesc="Cross-platform implementation of Unix 'which' command"
+arch=(any)
+url=https://github.com/piotrmurach/tty-which
+license=(MIT)
+options=(!emptydirs)
+depends=(ruby)
+checkdepends=(ruby-bundler ruby-rake ruby-rspec)
+makedepends=(rubygems ruby-rdoc)
+source=(${url}/archive/v${pkgver}.tar.gz)
+sha256sums=('e7116a505846f42ee25b8f755260b227f4e8b09a628c3ca8e5cabb05459adf14')
+
+build() {
+ cd $_gemname-$pkgver
+ gem build ${_gemname}.gemspec
+}
+
+check() {
+ cd $_gemname-$pkgver
+ rake
+}
package() {
- local _gemdir="$(ruby -e'puts Gem.default_dir')"
- gem install --ignore-dependencies --no-user-install -i "$pkgdir/$_gemdir" \
- -n "$pkgdir/usr/bin" $_gemname-$pkgver.gem
- rm "$pkgdir/$_gemdir/cache/$_gemname-$pkgver.gem"
+ cd $_gemname-$pkgver
+ local _gemdir="$(gem env gemdir)"
+
+ gem install \
+ --ignore-dependencies \
+ --no-user-install \
+ -i "$pkgdir/$_gemdir" \
+ -n "$pkgdir/usr/bin" \
+ $_gemname-$pkgver.gem
+
+ rm -rf "$pkgdir/$_gemdir/cache"
+
+ install -Dm0644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm0644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}
+
+# vim: set ts=2 sw=2 et: