summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rawlinson2021-07-28 07:17:51 +0000
committerGeorge Rawlinson2021-07-28 07:17:51 +0000
commit126c70caadb5b262ed3b1ab24c2daf36b7f9155e (patch)
tree4500c5d5216c63fb9c826958b5d70ef7306a9ec6
parent97054b7f2155827490ad66b790092d60ac751c57 (diff)
downloadaur-ruby-ddplugin.tar.gz
upgpkg: ruby-ddplugin 1.0.3-1
* New upstream release * Delete unnecessary files & folders * Add documentation & license
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD53
2 files changed, 42 insertions, 24 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9c3798b898d..8c27ef0b4c5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,14 @@
pkgbase = ruby-ddplugin
pkgdesc = Provides plugin management for Ruby projects
- pkgver = 1.0.2
+ pkgver = 1.0.3
pkgrel = 1
- url = https://rubygems.org/gems/ddplugin
+ url = https://github.com/ddfreyne/ddplugin
arch = any
license = MIT
- makedepends = rubygems
depends = ruby
- noextract = ddplugin-1.0.2.gem
- source = https://rubygems.org/downloads/ddplugin-1.0.2.gem
- sha256sums = c11d7dcc5ecd4c3f4a42e689a2630f766dc8aacf37a9258dc39e715285ce7a1f
+ noextract = ddplugin-1.0.3.gem
+ options = !emptydirs
+ source = https://rubygems.org/downloads/ddplugin-1.0.3.gem
+ b2sums = 8d287a558fe2716c394f96f92824c8b843fbdcb77b5052b8bb4699013222ef0e57c273348007dc61cde4281978570b115551ce51a71077b53f0cc8d7ebda5ea9
pkgname = ruby-ddplugin
-
diff --git a/PKGBUILD b/PKGBUILD
index 646536ce5bb..19dd9ab9e03 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,44 @@
-# Maintainer: Hyacinthe Cartiaux <hyacinthe.cartiaux (a) free.fr>
-pkgname=ruby-ddplugin
-pkgver=1.0.2
-_gemname=${pkgname#ruby-}
+# Maintainer: George Rawlinson <grawlinson@archlinux.org>
+# Contributor: Hyacinthe Cartiaux <hyacinthe.cartiaux (a) free.fr>
+
+_gemname=ddplugin
+pkgname=ruby-$_gemname
+pkgver=1.0.3
pkgrel=1
pkgdesc="Provides plugin management for Ruby projects"
-arch=(any)
-url="https://rubygems.org/gems/${_gemname}"
-license=("MIT")
+arch=('any')
+url="https://github.com/ddfreyne/ddplugin"
+license=('MIT')
depends=('ruby')
-makedepends=(rubygems)
-source=(https://rubygems.org/downloads/$_gemname-$pkgver.gem)
-sha256sums=('c11d7dcc5ecd4c3f4a42e689a2630f766dc8aacf37a9258dc39e715285ce7a1f')
-noextract=($_gemname-$pkgver.gem)
+options=('!emptydirs')
+source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
+noextract=("$_gemname-$pkgver.gem")
+b2sums=('8d287a558fe2716c394f96f92824c8b843fbdcb77b5052b8bb4699013222ef0e57c273348007dc61cde4281978570b115551ce51a71077b53f0cc8d7ebda5ea9')
package() {
- cd "$srcdir"
-
local _gemdir="$(ruby -e'puts Gem.default_dir')"
- HOME="/tmp" GEM_HOME="$_gemdir" GEM_PATH="$_gemdir" gem install \
- --no-user-install --ignore-dependencies --no-ri \
- -i "$pkgdir/$_gemdir" -n "$pkgdir/usr/bin" "$_gemname-$pkgver.gem"
- rm "$pkgdir/$_gemdir/cache/$_gemname-$pkgver.gem"
+ gem install \
+ --ignore-dependencies \
+ --no-user-install \
+ --no-document \
+ --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 test Gemfile* Rakefile "$_gemname.gemspec"
+
+ # move documentation
+ install -vd "$pkgdir/usr/share/doc/$pkgname"
+ mv -vt "$pkgdir/usr/share/doc/$pkgname" *.md
+
+ # move license
+ install -vd "$pkgdir/usr/share/licenses/$pkgname"
+ mv -vt "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}