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, 26 insertions, 10 deletions
diff --git a/community/ruby-iconv/PKGBUILD b/community/ruby-iconv/PKGBUILD
index a1a2f6071..0f43dd6ab 100755
--- a/community/ruby-iconv/PKGBUILD
+++ b/community/ruby-iconv/PKGBUILD
@@ -1,24 +1,40 @@
-# $Id: PKGBUILD 89242 2013-04-28 10:01:07Z alucryd $
-# Maintainer: Alucryd <alucryd at gmail dot com>
+# $Id: PKGBUILD 97686 2013-09-27 08:51:25Z alucryd $
+# Maintainer: Maxime Gauduin <alucryd@gmail.com>
pkgname=ruby-iconv
pkgver=1.0.3
-pkgrel=2
+pkgrel=4
pkgdesc="Wrapper library for iconv"
arch=('i686' 'x86_64' 'mips64el')
url="https://github.com/nurse/iconv"
-license=('GPL3')
+license=('BSD')
depends=('ruby')
-makedepends=('rubygems')
-options=('!emptydirs')
-source=("https://rubygems.org/downloads/${pkgname#*-}-${pkgver}.gem")
+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
+}
+
package() {
- cd "${srcdir}"
+ 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
+
+# Gem compatibility
+ mv ../../specifications "${pkgdir}"/usr/lib/ruby/gems/${_rubyver}/
- local _gemdir="$(ruby -rubygems -e 'puts Gem.default_dir')"
- gem install --no-user-install --ignore-dependencies -i "${pkgdir}"${_gemdir} ${pkgname#*-}-${pkgver}.gem
+# License
+ install -dm 755 "${pkgdir}"/usr/share/licenses/${pkgname}
+ install -m 644 {,"${pkgdir}"/usr/share/licenses/${pkgname}/}BSDL
}
# vim: ts=2 sw=2 et: