summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rawlinson2021-07-28 02:03:23 +0000
committerGeorge Rawlinson2021-07-28 02:03:23 +0000
commit63ae835088a995e208daf8c19433275f2bc4fa66 (patch)
tree17237c971228edb2830a206f20395fe9ad7d7a00
parent7de666a2d6305f186d75574fe9d616e209f0383b (diff)
downloadaur-63ae835088a995e208daf8c19433275f2bc4fa66.tar.gz
upgpkg: ruby-ddmemoize 1.0.0-2
* Delete unnecessary files & folders * Move documentation to /usr/share/doc
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD55
2 files changed, 42 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 788ba9b3e19..5b0207e5b46 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,16 @@
pkgbase = ruby-ddmemoize
pkgdesc = Adds support for memoizing functions
pkgver = 1.0.0
- pkgrel = 1
- url = https://rubygems.org/gems/ddmemoize
+ pkgrel = 2
+ url = https://github.com/ddfreyne/ddmemoize
arch = any
license = MIT
- makedepends = rubygems
depends = ruby
depends = ruby-ddmetrics
depends = ruby-ref
noextract = ddmemoize-1.0.0.gem
+ options = !emptydirs
source = https://rubygems.org/downloads/ddmemoize-1.0.0.gem
- sha256sums = d42cc6aa4800c6e3282918d423accb50470d603280b1cf41a6bf8c061d84d497
+ b2sums = 3acf18cc70aed6c35ee98f42e6004ae13c623299abb0e8a3c0dbe7e7908775b9b6e2f81cc2977e4ca04ad584e7b5c43219979187448e3c87e6abc2d78a1c8f15
pkgname = ruby-ddmemoize
-
diff --git a/PKGBUILD b/PKGBUILD
index d0f330f2bd8..9d4ef97e083 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,46 @@
-# Maintainer: Hyacinthe Cartiaux <hyacinthe.cartiaux (a) free.fr>
-pkgname=ruby-ddmemoize
+# Maintainer: George Rawlinson <grawlinson@archlinux.org>
+# Contributor: Hyacinthe Cartiaux <hyacinthe.cartiaux (a) free.fr>
+
+_gemname=ddmemoize
+pkgname=ruby-$_gemname
pkgver=1.0.0
-_gemname=${pkgname#ruby-}
-pkgrel=1
+pkgrel=2
pkgdesc="Adds support for memoizing functions"
-arch=(any)
-url="https://rubygems.org/gems/${_gemname}"
-license=("MIT")
+arch=('any')
+url="https://github.com/ddfreyne/ddmemoize"
+license=('MIT')
depends=('ruby' 'ruby-ddmetrics' 'ruby-ref')
-makedepends=(rubygems)
-source=(https://rubygems.org/downloads/$_gemname-$pkgver.gem)
-sha256sums=('d42cc6aa4800c6e3282918d423accb50470d603280b1cf41a6bf8c061d84d497')
-noextract=($_gemname-$pkgver.gem)
+options=('!emptydirs')
+source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
+noextract=("$_gemname-$pkgver.gem")
+b2sums=('3acf18cc70aed6c35ee98f42e6004ae13c623299abb0e8a3c0dbe7e7908775b9b6e2f81cc2977e4ca04ad584e7b5c43219979187448e3c87e6abc2d78a1c8f15')
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"
+ find . -type f -name ".*" -delete
+ rm -vrf spec scripts Gemfile Rakefile "$_gemname.gemspec"
+
+ # move documentation
+ install -vd "$pkgdir/usr/share/doc/$pkgname"
+ mv -vt "$pkgdir/usr/share/doc/$pkgname" \
+ *.md samples
+
+ # move license
+ install -vd "$pkgdir/usr/share/licenses/$pkgname"
+ mv -vt "$pkgdir/usr/share/licenses/$pkgname" LICENSE.txt
}