]> git.pld-linux.org Git - SPECS.git/blob - ruby-chunky_png.spec
SPECS updated Sun 1 Aug 20:13:02 CEST 2021
[SPECS.git] / ruby-chunky_png.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4 %bcond_without  doc                     # don't build ri/rdoc
5
6 %define pkgname chunky_png
7 Summary:        Pure ruby library for read/write, chunk-level access to PNG files
8 Name:           ruby-%{pkgname}
9 Version:        1.2.7
10 Release:        2
11 License:        MIT
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
20 %if %{with tests}
21 BuildRequires:  ruby-rspec
22 %endif
23 BuildArch:      noarch
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
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.
30
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
39 interoperability.
40
41 %prep
42 %setup -q -n %{pkgname}-%{version}
43 %patch0 -p1
44
45 %build
46 # write .gemspec
47 %__gem_helper spec
48
49 %if %{with tests}
50 # Don't use Bundler.
51 sed -i "/require 'bundler\/setup'/ s/^/#/" spec/spec_helper.rb
52
53 rspec spec
54 %endif
55
56 %install
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}
61
62 %clean
63 rm -rf $RPM_BUILD_ROOT
64
65 %files
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
This page took 0.030639 seconds and 3 git commands to generate.