summaryrefslogtreecommitdiffstats
path: root/rubygem-typhoeus.spec
blob: bd6549b5263045f1404997791dbec46fc39e9d4f (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
%global gemname typhoeus

%global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"] ')
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
%global rubyabi 1.8 

Summary: A library for interacting with web services at blinding speed
Name: rubygem-%{gemname}
Version: 0.3.3
Release: 1%{?dist}
Group: Development/Languages
License: MIT
URL: http://github.com/pauldix/typhoeus
Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem
Requires: ruby(rubygems)
Requires: ruby(abi) = %{rubyabi}
Requires: rubygem(mime-types)
BuildRequires: ruby(abi) = %{rubyabi} 
BuildRequires: ruby(rubygems)
# 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(%{gemname}) = %{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 ./%{gemdir}
export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
gem install \
	--local \
	--install-dir ./%{gemdir} \
	-V --force --rdoc \
	%{SOURCE0}

%build

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

mkdir -p %{buildroot}%{ruby_sitearch}/%{gemname}
mv -f %{buildroot}%{geminstdir}/lib/%{gemname}/*.so %{buildroot}%{ruby_sitearch}/%{gemname}

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

%check
pushd .%{geminstdir}
rspec spec
popd

%files
%dir %{geminstdir}
%dir %{ruby_sitearch}/%{gemname}
%exclude %{geminstdir}/ext
%{geminstdir}/lib
%exclude %{geminstdir}/lib/typhoeus/.gitignore
%{ruby_sitearch}/%{gemname}/*.so
%doc %{geminstdir}/LICENSE
%exclude %{gemdir}/cache/%{gemname}-%{version}.gem
%{gemdir}/specifications/%{gemname}-%{version}.gemspec

%files doc
%doc %{geminstdir}/CHANGELOG.markdown
%{geminstdir}/Rakefile
%{geminstdir}/Gemfile
%{geminstdir}/Gemfile.lock
%{geminstdir}/spec
%{geminstdir}/%{gemname}.gemspec
%doc %{gemdir}/doc/%{gemname}-%{version}

%changelog
* 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