git » ruby-diff-lcs.git » main » tree

[main] / PKGBUILD

# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Sirat18 <aur@sirat18.de>
# Contributor: Anatol Pomozov <anatol.pomozov@gmail.com>
# Contributor: Alfredo Palhares <masterkorp@masterkorp.net>
# Contributor: mtorromeo

_gemname=diff-lcs
pkgname=ruby-${_gemname}
pkgver=1.5.0
pkgrel=1
pkgdesc='Diff::LCS computes the difference between two Enumerable sequences using the McIlroy-Hunt longest common subsequence (LCS) algorithm'
url='https://github.com/halostatue/diff-lcs'
arch=('any')
license=('MIT' 'PerlArtistic' 'GPL2')
depends=('ruby')
makedepends=('ruby-rdoc')
options=('!emptydirs')
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/halostatue/diff-lcs/archive/v${pkgver}.tar.gz)
sha512sums=('56605522c137aa8ea505d659782ddd57d50ca8dae27d52dece5420f5b007521a15a884d81116813214f98871e5e271554f68feb8494ba261d78e59f7e25f42ea')

build() {
  cd ${_gemname}-${pkgver}
  gem build ${_gemname}.gemspec
}

package() {
  cd ${_gemname}-${pkgver}
  local _gemdir="$(gem env gemdir)"
  gem install --ignore-dependencies --no-user-install -i "${pkgdir}/${_gemdir}" -n "${pkgdir}/usr/bin" ${_gemname}-${pkgver}.gem
  install -Dm 644 README.rdoc -t "${pkgdir}/usr/share/doc/${pkgname}"
  install -Dm 644 License.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
  rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem"
}

# vim: ts=2 sw=2 et: