[arch-commits] Commit in ruby-msgpack/trunk (PKGBUILD)

Thore Bödecker foxxx0 at archlinux.org
Tue Mar 12 13:10:58 UTC 2019


    Date: Tuesday, March 12, 2019 @ 13:10:57
  Author: foxxx0
Revision: 440627

upgpkg: ruby-msgpack 1.2.8-1

update to 1.2.8
rework PKGBUILD to build cleanly from github source

Modified:
  ruby-msgpack/trunk/PKGBUILD

----------+
 PKGBUILD |   45 ++++++++++++++++++++++++++++++++++-----------
 1 file changed, 34 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-03-12 13:03:29 UTC (rev 440626)
+++ PKGBUILD	2019-03-12 13:10:57 UTC (rev 440627)
@@ -2,7 +2,7 @@
 
 _gemname=msgpack
 pkgname="ruby-${_gemname}"
-pkgver=1.2.7
+pkgver=1.2.8
 pkgrel=1
 pkgdesc='MessagePack implementation for Ruby'
 url='https://github.com/msgpack/msgpack-ruby'
@@ -9,23 +9,46 @@
 arch=('x86_64')
 license=('Apache')
 depends=('ruby')
-makedepends=('ruby-rdoc')
+makedepends=('ruby-rdoc' 'ruby-rake' 'ruby-rake-compiler' 'ruby-yard' 'ruby-rspec' 'ruby-bundler')
 options=('!emptydirs')
-source=("https://rubygems.org/downloads/${_gemname}-${pkgver}.gem")
-noextract=("${_gemname}-${pkgver}.gem")
-sha512sums=('086594a5f7202ae58f7681d7f58cea02560d68e4a3666e3bcead71dee0a8d0f7c56ac8a42e9ac2f7eea44f0d41207ae02ecc20e7bc0fea24af8a7965fdaceceb')
+source=("https://github.com/msgpack/msgpack-ruby/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.gz")
+sha256sums=('c6edadb33b82b7b2e396e39b750e256ef5cdffe41a28607923fc20f651a70786')
+sha512sums=('d02df5604dd1e703eea18d0fee344da6f2b0515223d56c38960f9e21dcdfcdfc077c69ea2ebd0411f0b82a80a6da0357275edd7ee20005c7e850aa608faf1cf0')
 
+prepare() {
+  cd "${_gemname}-ruby-${pkgver}"
+  sed 's|git ls-files|find|' -i "${_gemname}.gemspec"
+  sed 's|~>|>=|g' -i Gemfile
+}
+
+build() {
+  cd "${_gemname}-ruby-${pkgver}"
+  rake compile
+  rake build
+  rake clean
+}
+
+check() {
+  cd "${_gemname}-ruby-${pkgver}"
+  rake spec
+}
+
 package() {
-  local _gemdir="$(ruby -e'puts Gem.default_dir')"
-
+  cd "${_gemname}-ruby-${pkgver}"
+  local _gemdir="$(gem env gemdir)"
   gem install \
     --ignore-dependencies \
     --no-user-install \
-    -i "${pkgdir}${_gemdir}" \
-    -n "${pkgdir}/usr/bin" \
-    "${_gemname}-${pkgver}.gem"
+    -i "${pkgdir}/${_gemdir}" \
+    -n "${pkgdir}/usr/bin"  \
+    "pkg/${_gemname}-${pkgver}.gem"
 
-  rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem"
+  install -Dm 644 README.rdoc -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+
+  cd "${pkgdir}/${_gemdir}"
+  rm -r cache gems/"${_gemname}-${pkgver}"/{ext,tmp,lib/*/*.so} \
+    extensions/*/*/"${_gemname}-${pkgver}"/{mkmf.log,gem_make.out}
 }
 
 # vim: ts=2 sw=2 et:


More information about the arch-commits mailing list