summaryrefslogtreecommitdiffstats
path: root/rubygem-typhoeus.spec
blob: a8ad7b615d37ff4955e1a6d9e0150572e6b4b424 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
%global gem_name typhoeus

%global rubyabi 1.9.1

Summary: A library for interacting with web services at blinding speed
Name: rubygem-%{gem_name}
Version: 0.3.3
Release: 3%{?dist}
Group: Development/Languages
License: MIT
URL: http://github.com/pauldix/typhoeus
Source0: http://gems.rubyforge.org/gems/%{gem_name}-%{version}.gem
Requires: ruby(rubygems)
Requires: ruby(abi) = %{rubyabi}
Requires: rubygem(mime-types)
BuildRequires: ruby(abi) = %{rubyabi} 
BuildRequires: rubygems-devel
# Use rspec-core until rspec are not migrated to RSpec 2.x
BuildRequires: rubygem(rspec-core)
BuildRequires: rubygem(json)
BuildRequires: rubygem(mime-types)
BuildRequires: rubygem(sinatra)
BuildRequires: ruby-devel
BuildRequires: libcurl-devel
Provides: rubygem(%{gem_name}) = %{version}

%description
Like a modern code version of the mythical beast with 100 serpent heads,
Typhoeus runs HTTP requests in parallel while cleanly encapsulating handling
logic.

%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires:%{name} = %{version}-%{release}

%description doc
Documentation for %{name}

%prep
%setup -q -c -T 
mkdir -p ./%{gem_dir}
export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
gem install \
	--local \
	--install-dir ./%{gem_dir} \
	-V --force --rdoc \
	%{SOURCE0}

%build

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{gem_dir}
cp -a ./%{gem_dir}/* %{buildroot}%{gem_dir}

mkdir -p %{buildroot}%{ruby_vendorarchdir}/%{gem_name}
mv -f %{buildroot}%{gem_libdir}/%{gem_name}/*.so %{buildroot}%{ruby_vendorarchdir}/%{gem_name}

# remove all shebang, set permission to 0644 (mtasaka)
for f in $(find %{buildroot}%{gem_instdir} -name \*.rb)
do
	sed -i -e '/^#!/d' $f
	chmod 0644 $f
done

%check
pushd .%{gem_instdir}
rspec spec
popd

%files
%dir %{gem_instdir}
%dir %{ruby_vendorarchdir}/%{gem_name}
%exclude %{gem_instdir}/ext
%{gem_libdir}
%exclude %{gem_libdir}/typhoeus/.gitignore
%{ruby_vendorarchdir}/%{gem_name}/*.so
%doc %{gem_instdir}/LICENSE
%exclude %{gem_cache}
%{gem_spec}

%files doc
%doc %{gem_instdir}/CHANGELOG.markdown
%{gem_instdir}/Rakefile
%{gem_instdir}/Gemfile
%{gem_instdir}/Gemfile.lock
%{gem_instdir}/spec
%{gem_instdir}/%{gem_name}.gemspec
%doc %{gem_docdir}

%changelog
* Wed Feb 01 2012 Vít Ondruch <vondruch@redhat.com> - 0.3.3-3
- Rebuilt for Ruby 1.9.3.

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Mon Nov 28 2011 Vít Ondruch <vondruch@redhat.com> - 0.3.3-1
- Updated to typhoeus 0.3.3.

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Mon Jan 10 2011 Michal Fojtik <mfojtik@redhat.com> - 0.2.0-1
- Version bump

* Thu Oct 14 2010 Michal Fojtik <mfojtik@redhat.com> - 0.1.31-3
- Preserved failing test files (thx. to mtasaka)
- Fixed macros usage
- Replaced path with macro
- Removed libcurl from requires

* Wed Oct 13 2010 Michal Fojtik <mfojtik@redhat.com> - 0.1.31-2
- Fixed License to MIT
- Fixed libcurl BuildRequire
- Gem now recompiles with correct GCC flags
- Directory issues should be fixed
- Removed -devel subpackage
- Added tests


* Wed Oct 06 2010 Michal Fojtik <mfojtik@redhat.com> - 0.1.31-1
- Initial package