archrelease: copy trunk to community-any
[ArchLinux/community.git] / ruby-mercenary / repos / community-any / PKGBUILD
blobe0fd2e51734d3654eb9edece29f7cf55d8cab8c2
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
3 _gemname=mercenary
4 pkgname=ruby-mercenary
5 pkgver=0.4.0
6 pkgrel=2
7 pkgdesc='Easier way to build your command-line scripts'
8 url='https://github.com/jekyll/mercenary'
9 arch=('any')
10 license=('MIT')
11 depends=('ruby')
12 makedepends=('ruby-rdoc')
13 options=('!emptydirs')
14 source=(${pkgname}-${pkgver}.tar.gz::https://github.com/jekyll/mercenary/archive/v${pkgver}.tar.gz)
15 sha256sums=('f13f405287a0690b6cbfba900493c3b00e680e7a5c2d45e0ed869520c04b9d81')
16 sha512sums=('8399887c3a24daa9329a69dc99804934a30f5b91b6742698a048db7810448b12479a0761a7dc12f63db813da81251482394d1d30a2535710f96285b96dc5a4ac')
18 prepare() {
19   cd ${_gemname}-${pkgver}
20   sed -r 's|~>|>=|g' -i ${_gemname}.gemspec # don't give a fuck about rubys bla bla
21   sed 's|git ls-files|find|' -i ${_gemname}.gemspec
24 build() {
25   cd ${_gemname}-${pkgver}
26   gem build ${_gemname}.gemspec
29 package() {
30   cd ${_gemname}-${pkgver}
31   local _gemdir="$(gem env gemdir)"
32   gem install --ignore-dependencies --no-user-install -i "${pkgdir}${_gemdir}" -n "${pkgdir}/usr/bin" ${_gemname}-${pkgver}.gem
33   install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
34   install -Dm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
35   install -Dm 644 examples/* -t "${pkgdir}/usr/share/doc/${pkgname}/example"
36   rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem"
39 # vim: ts=2 sw=2 et: