[arch-commits] Commit in ruby-iconv/trunk (PKGBUILD)
Maxime Gauduin
alucryd at nymeria.archlinux.org
Sat Jan 25 18:55:29 UTC 2014
Date: Saturday, January 25, 2014 @ 19:55:29
Author: alucryd
Revision: 104766
FS#38631: ruby-iconv 1.0.4-1
Modified:
ruby-iconv/trunk/PKGBUILD
----------+
PKGBUILD | 24 +++++-------------------
1 file changed, 5 insertions(+), 19 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-01-25 18:44:13 UTC (rev 104765)
+++ PKGBUILD 2014-01-25 18:55:29 UTC (rev 104766)
@@ -9,33 +9,19 @@
url='https://github.com/nurse/iconv'
license=('BSD')
depends=('ruby')
+options=('!emptydirs')
source=("http://rubygems.org/downloads/${pkgname#*-}-${pkgver}.gem")
noextract=("${pkgname#*-}-${pkgver}.gem")
sha256sums=('5bd4e387a2e8070baf3ebf8d91f545200db25c08686f82cde66f118d9f914f9b')
-prepare() {
- gem install --no-{document,user-install} --ignore-dependencies -i . ${pkgname#*-}-${pkgver}.gem
- sed "s|iconv/iconv.so|$CARCH-linux/iconv.so|" -i gems/${pkgname#*-}-${pkgver}/lib/iconv.rb
-}
-
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}
-
-# Native extension
- install -dm 755 "${pkgdir}"/usr/lib/ruby/vendor_ruby/${_rubyver}/$CARCH-linux
- mv "${pkgdir}"/usr/lib/ruby/vendor_ruby/${_rubyver}/{iconv,$CARCH-linux}/iconv.so
-
-# 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}/}BSDL
+ ln -s ${_gemdir}/gems/${pkgname#*-}-${pkgver}/BSDL "${pkgdir}"/usr/share/licenses/${pkgname}/
}
# vim: ts=2 sw=2 et:
More information about the arch-commits
mailing list