1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Maintainer: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
4 _gemname=network_interface
5 pkgname=ruby-${_gemname}
8 pkgdesc='Library to get network interface information'
9 url='https://github.com/rapid7/network_interface'
13 makedepends=('ruby-rdoc')
14 options=('!emptydirs')
15 source=(${pkgname}-${pkgver}.tar.gz::https://github.com/rapid7/network_interface/archive/v${pkgver}.tar.gz)
16 sha512sums=('38174c4a1985ae82dc2459c21a7483a3cdbf6a0380814dc0b799a2bc250a3263fc8830d4127301041e7fc637dd6de45cd62214dd1a4d390b3acdb71cbae96d02')
19 cd ${_gemname}-${pkgver}
20 sed 's|git ls-files|find|' -i ${_gemname}.gemspec
24 cd ${_gemname}-${pkgver}
25 gem build ${_gemname}.gemspec
29 cd ${_gemname}-${pkgver}
30 local _gemdir="$(gem env gemdir)"
31 gem install --ignore-dependencies --no-user-install -i "${pkgdir}/${_gemdir}" -n "${pkgdir}/usr/bin" ${_gemname}-${pkgver}.gem
32 install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
33 install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
34 find "${pkgdir}" \( -name gem_make.out -o -name mkmf.log \) -delete
35 rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem" \
36 "${pkgdir}/${_gemdir}/gems/${_gemname}-${pkgver}/ext/network_interface_ext/Makefile"
37 rm -rf "${pkgdir}/${_gemdir}/doc/${_gemname}-${pkgver}/ri/ext/"