Date: Saturday, January 25, 2014 @ 19:28:47
  Author: alucryd
Revision: 104752

FS#38631: ruby-polyglot 0.3.3-4

Modified:
  ruby-polyglot/trunk/PKGBUILD

----------+
 PKGBUILD |   21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2014-01-25 18:25:37 UTC (rev 104751)
+++ PKGBUILD    2014-01-25 18:28:47 UTC (rev 104752)
@@ -4,34 +4,25 @@
 
 pkgname=ruby-polyglot
 pkgver=0.3.3
-pkgrel=3
+pkgrel=4
 pkgdesc='Allows custom language loaders to be hooked into require'
 arch=('any')
 url='http://polyglot.rubyforge.org/'
 license=('MIT')
 depends=('ruby')
+options=('!emptydirs')
 source=("http://rubygems.org/downloads/${pkgname#*-}-${pkgver}.gem";)
 noextract=("${pkgname#*-}-${pkgver}.gem")
 sha256sums=('1b0026fa0ce5aef4a65199ff3f5c589a4865265cd1f2f053eb6c4041a3aa5f20')
 
-prepare() {
-  gem install --no-{document,user-install} --ignore-dependencies -i . 
${pkgname#*-}-${pkgver}.gem
-}
-
 package() {
-  cd gems/${pkgname#*-}-${pkgver}
+  local _gemdir="$(ruby -e'puts Gem.default_dir')"
 
-  local _rubyver="$(ruby --version | sed 's/.* \(.*\..*\..*\)p.*/\1/')"
+  gem install --ignore-dependencies --no-user-install -N -i 
"${pkgdir}"/${_gemdir} ${pkgname#*-}-${pkgver}.gem
+  find "${pkgdir}" -type f -name *.gem -delete
 
-  install -dm 755 "${pkgdir}"/usr/lib/ruby/{gems/${_rubyver},vendor_ruby}
-  mv lib "${pkgdir}"/usr/lib/ruby/vendor_ruby/${_rubyver}
-
-# Gem compatibility
-  mv ../../specifications "${pkgdir}"/usr/lib/ruby/gems/${_rubyver}/
-
-# License
   install -dm 755 "${pkgdir}"/usr/share/licenses/${pkgname}
-  install -m 644 {,"${pkgdir}"/usr/share/licenses/${pkgname}/}License.txt
+  ln -s "${pkgdir}"/${_gemdir}/gems/${pkgname#*-}-${pkgver}/COPYING 
"${pkgdir}"/usr/share/licenses/${pkgname}/
 }
 
 # vim: ts=2 sw=2 et:

Reply via email to