archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / ruby-daemons / trunk / PKGBUILD
blob0f84f421cfe12b083893b5290d26f02b2f5cb323
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
3 _gemname=daemons
4 pkgname=ruby-${_gemname}
5 pkgver=1.4.1
6 pkgrel=1
7 pkgdesc='Easy way to wrap existing ruby scripts to be run as a daemon'
8 url='https://github.com/thuehlinger/daemons'
9 arch=('any')
10 license=('MIT')
11 depends=('ruby')
12 makedepends=('ruby-rdoc')
13 options=('!emptydirs')
14 source=(https://github.com/thuehlinger/daemons/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
15 sha512sums=('5b55f644a53efe93a6bb80ca534207c7a847a7c21df127d17ba6f09e2c2d8c665d87e6355382d2d51c3c9f50741fa9a31f5bfd228d9bb45ba8d5d099b7b5d026')
16 b2sums=('4f376f0a1a9322d95b32b74862beae93ae5d8636c0d321b059c335053760077b6ba78780cc4c22d5e98fbb95e2dffb85fd5ccfb1dc5152653698c29a0ac86577')
18 prepare() {
19   cd ${_gemname}-${pkgver}
20   sed -r 's|~>|>=|g' -i ${_gemname}.gemspec
21   sed 's|README.md LICENSE Releases ||' -i ${_gemname}.gemspec
22   sed -r 's|`git ls-files (.+)`|`find \1 -type f`|' -i ${_gemname}.gemspec
25 build() {
26   cd ${_gemname}-${pkgver}
27   gem build ${_gemname}.gemspec
30 package() {
31   cd ${_gemname}-${pkgver}
32   local _gemdir="$(gem env gemdir)"
33   gem install --ignore-dependencies --no-user-install -i "${pkgdir}${_gemdir}" \
34     -n "${pkgdir}/usr/bin" ${_gemname}-${pkgver}.gem -- --use-system-libraries
35   install -Dm 644 README.md Releases -t "${pkgdir}/usr/share/doc/${pkgname}"
36   cp -a examples "${pkgdir}/usr/share/doc/${pkgname}"
37   install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
39   cd "${pkgdir}/${_gemdir}"
40   rm -rf cache gems/${_gemname}-${pkgver}/{ext,lib/*/*.so} \
41     extensions/*/*/${_gemname}-${pkgver}/{mkmf.log,gem_make.out}
44 # vim: ts=2 sw=2 et: