summaryrefslogtreecommitdiff
path: root/community/ruby-iconv
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-01-29 03:30:04 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-01-29 03:30:04 +0000
commit0a521de4508e14363c59922ab2744ab699e30288 (patch)
tree22a9004955fd3ec5f7aa81f799bd9eabed325d15 /community/ruby-iconv
parent462391357aa5e749dc9908c15f3baa0b4416f3d8 (diff)
Wed Jan 29 03:27:46 UTC 2014
Diffstat (limited to 'community/ruby-iconv')
-rwxr-xr-xcommunity/ruby-iconv/PKGBUILD36
1 files changed, 11 insertions, 25 deletions
diff --git a/community/ruby-iconv/PKGBUILD b/community/ruby-iconv/PKGBUILD
index 528fa5c14..6d5b0c9b8 100755
--- a/community/ruby-iconv/PKGBUILD
+++ b/community/ruby-iconv/PKGBUILD
@@ -1,41 +1,27 @@
-# $Id: PKGBUILD 100391 2013-11-03 11:24:29Z alucryd $
+# $Id: PKGBUILD 104890 2014-01-28 03:34:20Z td123 $
# Maintainer: Maxime Gauduin <alucryd@gmail.com>
pkgname=ruby-iconv
-pkgver=1.0.3
-pkgrel=6
-pkgdesc="Wrapper library for iconv"
+pkgver=1.0.4
+pkgrel=2
+pkgdesc='Wrapper library for iconv'
arch=('i686' 'x86_64')
-url="https://github.com/nurse/iconv"
+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=('94a9b62a56c96226b62b787cd45fdc48c03f4517f1e36e64db113b010fb012da')
-
-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
-}
+sha256sums=('5bd4e387a2e8070baf3ebf8d91f545200db25c08686f82cde66f118d9f914f9b')
package() {
- cd gems/${pkgname#*-}-${pkgver}
-
- local _rubyver="$(ruby --version | sed 's/.* \(.*\..*\..*\)p.*/\1/')"
-
- 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
+ local _gemdir="$(ruby -e'puts Gem.default_dir')"
-# Gem compatibility
- mv ../../specifications "${pkgdir}"/usr/lib/ruby/gems/${_rubyver}/
+ gem install --ignore-dependencies --no-user-install -N -i "${pkgdir}"/${_gemdir} ${pkgname#*-}-${pkgver}.gem
+ find "${pkgdir}" -type f -name *.gem -delete
-# 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: