upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / ruby-sawyer / trunk / PKGBUILD
blob947abe0b7bc9aece9bef496352b62d739e84aefc
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=ruby-sawyer
4 pkgver=0.9.2
5 pkgrel=1
6 pkgdesc='Secret User Agent of HTTP'
7 arch=(any)
8 url='https://github.com/lostisland/sawyer'
9 license=(MIT)
10 depends=(ruby-faraday ruby-addressable)
11 checkdepends=(ruby-minitest ruby-rake)
12 options=(!emptydirs)
13 source=(https://github.com/lostisland/sawyer/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
14 sha256sums=('678923b7de572da916a445d5ee422d6270c5a6a7d913b2a7274c697b569384ab')
16 build() {
17   local _gemdir="$(gem env gemdir)"
18   cd sawyer-$pkgver
19   gem build sawyer.gemspec
20   gem install \
21     --local \
22     --verbose \
23     --ignore-dependencies \
24     --no-user-install \
25     --install-dir "tmp_install/$_gemdir" \
26     --bindir "tmp_install/usr/bin" \
27     sawyer-$pkgver.gem
28   find "tmp_install/$_gemdir/gems/" \
29     -type f \
30     \( \
31         -iname "*.o" -o \
32         -iname "*.c" -o \
33         -iname "*.so" -o \
34         -iname "*.time" -o \
35         -iname "gem.build_complete" -o \
36         -iname "Makefile" \
37     \) \
38     -delete
39   rm -r tmp_install/$_gemdir/cache
42 check() {
43   local _gemdir="$(gem env gemdir)"
44   cd sawyer-$pkgver
45   GEM_HOME="tmp_install/$_gemdir" rake
48 package() {
49   cd sawyer-$pkgver
50   cp -a tmp_install/* "$pkgdir"/
51   install -Dm644 LICENSE.md -t "$pkgdir"/usr/share/licenses/$pkgname/