# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=ruby-rmagick _gemname=rmagick pkgver=5.3.0 _pkgver=${pkgver//./-} pkgrel=0 pkgdesc="Ruby bindings for ImageMagick" url="https://github.com/rmagick/rmagick" arch="all" license="MIT" depends="ghostscript-fonts" makedepends=" imagemagick-dev ruby ruby-dev ruby-pkg-config " checkdepends=" imagemagick imagemagick-pdf ruby-rake ruby-rspec " source="https://github.com/rmagick/rmagick/archive/RMagick_$_pkgver.tar.gz gemspec.patch spec-drop-pry.patch dont-test-webp.patch skip-broken-test.patch fix-tempfile.patch " builddir="$srcdir/rmagick-RMagick_$_pkgver" build() { gem build $_gemname.gemspec gem install --local \ --install-dir dist \ --ignore-dependencies \ --no-document \ --verbose \ $_gemname } check() { GEM_PATH='dist:.gem' rspec } package() { local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')" cd "$builddir"/dist mkdir -p "$gemdir" cp -r extensions gems specifications "$gemdir"/ # Remove unnecessary files and rubbish... find "$gemdir"/extensions/ -name mkmf.log -delete cd "$gemdir"/gems/$_gemname-$pkgver rm -r ext/ lib/*.so } sha512sums=" dcc9e0d7cd77ebd3859871f26449c37839f9102e7aa4f0746698cbd6fe93579c3adbe6cfefeba6cdcb53e573f5113b872d03fcd568bb80edda5c8ca9c1ab1665 RMagick_5-3-0.tar.gz f653a3588cc529b0f98bc951f18c67f4e013ffacdb2a8ad9f5495e484d083bf1a37b246ae1b2eea570aa3916d9607844f128a4d3dfbbd49ad390e8222f63b6e4 gemspec.patch 6550535ebaf3924b9f707da395eeaec630e5db50e1964ab9f84d2f941d97c7c49eb7dff05439efa355abb97e72556385b26b8af1d86e05b7c12fd8f2f781834a spec-drop-pry.patch 5eeea508d44f2c9679fe4fe3d5b9a51470f8022537f5822f85c95dbd4d78149c2cada763f0bdf3e86523770b0b758117a6d216b240c92f54253905c19d38d064 dont-test-webp.patch a6a342343d5d99f466da6084fc9b3b6043b1316361a3581592a343b7ee78dec4657b1cb00748ca33aa84c9926b33b2aa1249936e85bc4b868e937c0d746a4171 skip-broken-test.patch c661ca0c22d93795e5c2c89bbac7cb577b4bc32ec2cb4906cb49a6fa2d109a429d963fea7089d04c4750531f2c0c5a77eee1998db0741520dc81f0c5cfb04d8b fix-tempfile.patch "