3 %bcond_without tests # build without tests
4 %bcond_without doc # don't build ri/rdoc
6 %define pkgname chunky_png
7 Summary: Pure ruby library for read/write, chunk-level access to PNG files
12 Group: Development/Languages
13 Source0: http://rubygems.org/gems/%{pkgname}-%{version}.gem
14 # Source0-md5: 3b872b1054bd3f586413d9169237432f
15 Patch0: ruby-2.0.0.patch
16 URL: http://wiki.github.com/wvanbergen/chunky_png
17 BuildRequires: rpm-rubyprov
18 BuildRequires: rpmbuild(macros) >= 1.665
19 BuildRequires: sed >= 4.0
21 BuildRequires: ruby-rspec
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 This pure Ruby library can read and write PNG images without depending
28 on an external image library, like RMagick. It tries to be memory
29 efficient and reasonably fast.
31 It supports reading and writing all PNG variants that are defined in
32 the specification, with one limitation: only 8-bit color depth is
33 supported. It supports all transparency, interlacing and filtering
34 options the PNG specifications allows. It can also read and write
35 textual metadata from PNG files. Low-level read/write access to PNG
36 chunks is also possible. This library supports simple drawing on the
37 image canvas and simple operations like alpha composition and
38 cropping. Finally, it can import from and export to RMagick for
42 %setup -q -n %{pkgname}-%{version}
51 sed -i "/require 'bundler\/setup'/ s/^/#/" spec/spec_helper.rb
57 rm -rf $RPM_BUILD_ROOT
58 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir}}
59 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
60 cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
63 rm -rf $RPM_BUILD_ROOT
66 %defattr(644,root,root,755)
67 %doc README.rdoc LICENSE BENCHMARKS.rdoc benchmarks
68 %{ruby_vendorlibdir}/chunky_png.rb
69 %{ruby_vendorlibdir}/chunky_png
70 %{ruby_specdir}/%{pkgname}-%{version}.gemspec