1 # Maintainer: Tim Meusel <tim@bastelfreak.de>
3 _gemname='multipart-parser'
4 pkgname="ruby-${_gemname}"
7 pkgdesc='A simple parser for multipart MIME messages, written in Ruby'
9 url='https://github.com/danabr/multipart-parser'
12 makedepends=('ruby-rdoc' 'git')
13 checkdepends=('ruby-test-unit' 'ruby-bundler' 'ruby-rake')
14 options=('!emptydirs')
15 source=("git+${url}#commit=9b9c4acb7c441d20a2c5a596ec4aecdecf6ebfe9" 'fix-broken-tests.patch')
17 'b955ab17fa167411a18ca950ee29a0db37e00ebd70e492a149a44f1937cc3eefcaf22201fa7d8c4464fcffc96b65829ef3741501bb32022ccbb770eb057a428d')
20 cd "${srcdir}/${_gemname}"
21 # cherry-picked the bugfix from https://github.com/danabr/multipart-parser/pull/5/files
22 patch -p1 -N -i "${srcdir}/fix-broken-tests.patch"
26 cd "${srcdir}/${_gemname}"
27 gem build "${_gemname}.gemspec"
31 cd "${srcdir}/${_gemname}"
36 cd "${srcdir}/${_gemname}"
37 local _gemdir="$(gem env gemdir)"
38 gem install --verbose --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "${_gemname}-${pkgver}.gem"
40 install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
42 install -Dm 644 README -t "${pkgdir}/usr/share/doc/${pkgname}"
44 rm -rf "${pkgdir}/${_gemdir}/cache"