Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/build-support/ruby-activesupport-bootstrap/PKGBUILD
blob: 3460a89ca0b66e12bf6bd09bd2e6bb0aebddc7c2 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Maintainer: David Runge <dvzrv@archlinux.org>

_name=activesupport
pkgname=ruby-activesupport-bootstrap
_pkgname=ruby-activesupport
pkgver='6.0.3.4'
pkgrel='1'
pkgdesc='A collection of utility classes and standard library extensions'
arch=('any')
url="https://github.com/rails/rails/tree/master/activesupport"
license=('MIT')
# bootstrap activesupport without i18n (circular dependency)
depends=('ruby' 'ruby-concurrent' 'ruby-tzinfo' 'ruby-zeitwerk')
makedepends=('git' 'ruby-rake')
# TODO: package ruby-dalli
checkdepends=('ruby-minitest')
options=(!emptydirs)
source=("${_pkgname}-${pkgver}::git+https://github.com/rails/rails#tag=v${pkgver}?signed")
sha512sums=('SKIP')
validpgpkeys=(
  '54FE550EA35E26D7C75362C1FC23B6D0F1EEE948'  # Rafael Mendonça França <rafael.ufs@gmail.com>
  '4CE91B75A79828E86B1AA8BB953170BCB4FFAFC6'  # Aaron Patterson <tenderlove@ruby-lang.org>
)
provides=("${_pkgname}=${pkgver}")

prepare() {
  cd "${_pkgname}-${pkgver}/activesupport"
  # we don't do version pinning
  sed -r 's|~>|>=|g' -i "${_name}.gemspec"
  # bootstrap activesupport (circular dependency on i18n)
  sed -r '/i18n/d' -i "${_name}.gemspec"
}

build() {
  cd "$_pkgname-$pkgver/activesupport"
  gem build "${_name}.gemspec"
}

# bootstrap activesupport without tests (circular dependency on i18n)
# unspecified dependency on ruby-dalli: https://github.com/rails/rails/issues/38134
# check() {
#   cd "$_pkgname-$pkgver/activesupport"
#   rake test
# }

package() {
  cd "$_pkgname-$pkgver/activesupport"
  local _gemdir="$(gem env gemdir)"
  gem install --ignore-dependencies \
              --no-user-install \
              -i "${pkgdir}/${_gemdir}" \
              -n "${pkgdir}/usr/bin" \
              ${_name}-${pkgver}.gem
  install -vDm 644 MIT-LICENSE \
    "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
  cd "${pkgdir}/${_gemdir}"
  rm -rvf cache gems/${_name}-${pkgver}/{ext,lib/*/*.so} \
    extensions/*/*/${_name}-${pkgver}/{mkmf.log,gem_make.out} \
    build_info extensions
}