]> git.pld-linux.org Git - packages/ruby-nio4r.git/blame - ruby-nio4r.spec
rebuild with gemspec deps
[packages/ruby-nio4r.git] / ruby-nio4r.spec
CommitLineData
cc645d48
ER
1# TODO
2# - use system libev (0.5.0 bundles libev 4.15)
a6c86165
ER
3#
4# Conditional build:
5%bcond_with tests # build without tests
6
7%define pkgname nio4r
8Summary: NIO provides a high performance selector API for monitoring IO objects
9Name: ruby-%{pkgname}
10Version: 0.5.0
8ce7b71a 11Release: 3
a6c86165
ER
12License: MIT
13Group: Development/Languages
14Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem
15# Source0-md5: c00295b39521d713d0eddb0925f4147d
16URL: https://github.com/celluloid/nio4r
17BuildRequires: rpm-rubyprov
18BuildRequires: rpmbuild(macros) >= 1.665
19BuildRequires: ruby-devel
20%if %{with tests}
21BuildRequires: ruby-rake
22BuildRequires: ruby-rake-compiler
23BuildRequires: ruby-rspec
24%endif
25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27%description
28When it comes to managing many IO objects on Ruby, there aren't a
29whole lot of options. The most powerful API Ruby itself gives you is
30Kernel.select, and select is hurting when it comes to performance and
31in terms of having a nice API.
32
33Once upon a time Java was a similar mess. They got out of it by adding
34the Java NIO API. Java NIO provides a high performance selector API
35for monitoring large numbers of file descriptors.
36
37This library aims to incorporate the ideas of Java NIO in Ruby. These
38are:
39- Expose high level interfaces for doing high performance IO, but keep
40 the codebase small to encourage multiple implementations on different
41 platforms
42- Be as portable as possible, in this case across several Ruby VMs
43- Provide inherently thread-safe facilities for working with IO
44 objects
45
46%prep
47%setup -q -n %{pkgname}-%{version}
48
49%build
50# write .gemspec
51%__gem_helper spec
52cd ext/%{pkgname}
53%{__ruby} extconf.rb
54%{__make} \
55 CC="%{__cc}" \
56 LDFLAGS="%{rpmldflags}" \
57 CFLAGS="%{rpmcflags} -fPIC"
58
59%install
60rm -rf $RPM_BUILD_ROOT
61install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_vendorarchdir},%{ruby_specdir}}
62cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
63install -p ext/%{pkgname}/nio4r_ext.so $RPM_BUILD_ROOT%{ruby_vendorarchdir}
64cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
65
66%clean
67rm -rf $RPM_BUILD_ROOT
68
69%files
70%defattr(644,root,root,755)
71%doc README.md CHANGES.md LICENSE.txt
72%{ruby_vendorlibdir}/nio.rb
73%{ruby_vendorlibdir}/nio
74%attr(755,root,root) %{ruby_vendorarchdir}/nio4r_ext.so
75%{ruby_specdir}/%{pkgname}-%{version}.gemspec
This page took 0.091967 seconds and 4 git commands to generate.