summaryrefslogtreecommitdiff
path: root/community/ruby-iconv/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/ruby-iconv/PKGBUILD')
-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 8a6e207f9..87d751791 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' 'mips64el')
-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: