summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c7c494a3d5c9b0f26490a9d399bb1b3f351970b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Maintainer: Whyme Lyu <callme5long@gmail.com>

pkgname=izwu
_gemname=$pkgname
pkgver=0.1.1
pkgrel=1
pkgdesc='Automating "Is it worth upgrading my OS?"'
url=https://github.com/5long/izwu
arch=(any)
license=(MIT)
depends=(
  expac
  ruby
)
checkdepends=(
  ruby-rake
  ruby-minitest
)
source=("${url}/archive/refs/tags/v${pkgver}.tar.gz")

build() {
  cd "${_gemname}-${pkgver}"

  gem build "${_gemname}.gemspec"
}

check() {
  cd "${_gemname}-${pkgver}"

  rake test
}

package() {
  cd "${_gemname}-${pkgver}"

  local _gemdir="$(gem env gemdir)"

  gem install --ignore-dependencies --no-user-install --install-dir "${pkgdir}${_gemdir}" --bindir "${pkgdir}/usr/bin" ${_gemname}-${pkgver}.gem

  install -D --mode=644 *.md --target-directory "${pkgdir}/usr/share/doc/${pkgname}"
  install -D --mode=644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

  rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem"
}
sha256sums=('d30d89c20ff763a56025d22309d03c0f9f39ff05945570850496760884000e08')