summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO15
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD57
3 files changed, 54 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 679b51e5e83a..a540939b7d72 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,18 @@
pkgbase = ruby-tty-which
- pkgdesc = Cross-platform implementation of Unix which command
- pkgver = 0.4.2
+ pkgdesc = Cross-platform implementation of Unix 'which' command
+ pkgver = 0.5.0
pkgrel = 1
url = https://github.com/piotrmurach/tty-which
arch = any
license = MIT
+ checkdepends = ruby-bundler
+ checkdepends = ruby-rake
+ checkdepends = ruby-rspec
makedepends = rubygems
+ makedepends = ruby-rdoc
depends = ruby
- noextract = tty-which-0.4.2.gem
- source = https://rubygems.org/downloads/tty-which-0.4.2.gem
- md5sums = 2418a6f6dbe3eda6d1af13c11b3e4f3e
+ options = !emptydirs
+ source = https://github.com/piotrmurach/tty-which/archive/v0.5.0.tar.gz
+ sha256sums = e7116a505846f42ee25b8f755260b227f4e8b09a628c3ca8e5cabb05459adf14
pkgname = ruby-tty-which
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..f71c635dafda
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*
+!.gitignore
+!PKGBUILD
+!.SRCINFO
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: