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

Maxime Gauduin alucryd at nymeria.archlinux.org
Sat Jan 25 18:44:02 UTC 2014


    Date: Saturday, January 25, 2014 @ 19:44:02
  Author: alucryd
Revision: 104764

FS#38631: ruby-term-ansicolor 1.2.2-5

Modified:
  ruby-term-ansicolor/trunk/PKGBUILD

----------+
 PKGBUILD |   20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-01-25 18:41:58 UTC (rev 104763)
+++ PKGBUILD	2014-01-25 18:44:02 UTC (rev 104764)
@@ -5,32 +5,26 @@
 
 pkgname=ruby-term-ansicolor
 pkgver=1.2.2
-pkgrel=4
+pkgrel=5
 pkgdesc='A ruby library that colors strings using ANSI escape sequences'
 arch=('any')
 url='https://rubygems.org/gems/term-ansicolor'
 license=('GPL2')
 depends=('ruby-tins')
+options=('!emptydirs')
 source=("https://rubygems.org/downloads/${pkgname#*-}-${pkgver}.gem")
 noextract=("${pkgname#*-}-${pkgver}.gem")
 sha256sums=('b9534713ba4c2a48f2291fadf9ce2edae9f2dc96157ee812fe8fe16a70c081ac')
 
-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} -n "${pkgdir}"/usr/bin ${pkgname#*-}-${pkgver}.gem
+  find "${pkgdir}" -type f -name *.gem -delete
 
-  install -dm 755 "${pkgdir}"/usr/lib/ruby/{gems/${_rubyver},vendor_ruby}
-  mv bin "${pkgdir}"/usr/
-  mv lib "${pkgdir}"/usr/lib/ruby/vendor_ruby/${_rubyver}
+  install -dm 755 "${pkgdir}"/usr/share/licenses/${pkgname}
+  ln -s "${pkgdir}"/${_gemdir}/gems/${pkgname#*-}-${pkgver}/COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/
 
-# Gem compatibility
-  mv ../../specifications "${pkgdir}"/usr/lib/ruby/gems/${_rubyver}/
-
 # Prevent conflict with colordiff
   rm "${pkgdir}"/usr/bin/cdiff
 }




More information about the arch-commits mailing list