blob: 8a6e207f94207abd77a1395f9815e435a1ac396a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# $Id: PKGBUILD 100391 2013-11-03 11:24:29Z alucryd $
# Maintainer: Maxime Gauduin <alucryd@gmail.com>
pkgname=ruby-iconv
pkgver=1.0.3
pkgrel=6
pkgdesc="Wrapper library for iconv"
arch=('i686' 'x86_64' 'mips64el')
url="https://github.com/nurse/iconv"
license=('BSD')
depends=('ruby')
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
}
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
# 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
}
# vim: ts=2 sw=2 et:
|