upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / ruby-bake-modernize / trunk / PKGBUILD
blob881d4859a439b61844df5f0b2c83553ef2869664
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=ruby-bake-modernize
4 pkgver=0.15.1
5 _commit=3b5f52f85ba3786d5e7d15dbb08446e503eabf52
6 pkgrel=1
7 pkgdesc='Automatically modernize parts of your project/gem'
8 arch=(any)
9 url='https://github.com/ioquatix/bake-modernize'
10 license=(MIT)
11 depends=(ruby-async-http ruby-bake ruby-build-files ruby-markly ruby-rugged)
12 makedepends=(git)
13 checkdepends=(ruby-sus ruby-bake-test git)
14 options=(!emptydirs)
15 source=(git+https://github.com/ioquatix/bake-modernize.git#commit=$_commit)
16 sha256sums=('SKIP')
18 prepare() {
19   cd bake-modernize
20   sed -i -e '/signing_key/d' -e 's/~>/>=/' bake-modernize.gemspec
21   echo -e 'gemspec\ngem "bake-test"' > gems.rb
24 build() {
25   local _gemdir="$(gem env gemdir)"
26   cd bake-modernize
27   gem build bake-modernize.gemspec
28   gem install \
29     --local \
30     --verbose \
31     --ignore-dependencies \
32     --no-user-install \
33     --install-dir "tmp_install/$_gemdir" \
34     --bindir "tmp_install/usr/bin" \
35     bake-modernize-$pkgver.gem
36   find "tmp_install/$_gemdir/gems/" \
37     -type f \
38     \( \
39         -iname "*.o" -o \
40         -iname "*.c" -o \
41         -iname "*.so" -o \
42         -iname "*.time" -o \
43         -iname "gem.build_complete" -o \
44         -iname "Makefile" \
45     \) \
46     -delete
47   rm -r tmp_install/$_gemdir/cache
50 check() {
51   local _gemdir="$(gem env gemdir)"
52   cd bake-modernize
53   GEM_HOME="tmp_install/$_gemdir" bake test
56 package() {
57   cd bake-modernize
58   cp -a tmp_install/* "$pkgdir"/
59   install -Dm644 license.md -t "$pkgdir"/usr/share/licenses/$pkgname/