summaryrefslogtreecommitdiffstats
path: root/rubygem-paperclip.spec
blob: 8949c9ffe6d528d9122a5f64983b68f591467386 (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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# Generated from paperclip-3.1.4.gem by gem2rpm -*- rpm-spec -*-
%global gem_name paperclip
%if 0%{?el6}
%global rubyabi 1.8
%else
%global rubyabi 1.9.1
%endif

Summary: File attachments as attributes for ActiveRecord
Name: rubygem-%{gem_name}
Version: 2.7.4
Release: 1%{?dist}
Group: Development/Languages
License: MIT
URL: https://github.com/thoughtbot/paperclip
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
Requires: ruby(abi) = %{rubyabi}
Requires: ruby(rubygems) 
Requires: rubygem(activerecord) >= 2.3.0
Requires: rubygem(activesupport) >= 2.3.0
Requires: rubygem(cocaine) >= 0.3.0
Requires: rubygem(mime-types)
Requires: ImageMagick
BuildRequires: ruby(abi) = %{rubyabi}
%if 0%{?fedora}
BuildRequires: rubygems-devel
%else
BuildRequires: ruby(rubygems)
%endif
BuildRequires: ImageMagick
# Minitest and deps
BuildRequires: rubygem(minitest)
BuildRequires: rubygem(mocha)
BuildRequires: rubygem(mime-types)
BuildRequires: rubygem(cocaine) >= 0.3.0
BuildRequires: rubygem(shoulda)
%if 0%{?el6}
BuildRequires: rubygem(activerecord) >= 2.3.0
# Not sure if this will work, or if we need to patch more.
BuildRequires: rubygem(sqlite3-ruby)
%else
BuildRequires: rubygem(sqlite3)
# These are not available on EL6:
BuildRequires: rubygem(fog)
BuildRequires: rubygem(aws-sdk)
%endif
# Cucumber and deps
%if 0%{?fedora}
BuildRequires: rubygem(cucumber)
BuildRequires: rubygem(cucumber-rails)
BuildRequires: rubygem(aruba)
BuildRequires: rubygem(capybara)
BuildRequires: rubygem(fakeweb)
%endif
BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version}

# macros for RHEL6 compatibility:
%{!?gem_dir: %global gem_dir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)}
%{!?gem_instdir: %global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}}
%{!?gem_libdir: %global gem_libdir %{gem_instdir}/lib}
%{!?gem_cache: %global gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem}
%{!?gem_spec: %global gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec}
%{!?gem_docdir: %global gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}}
%{!?gem_extdir: %global gem_extdir %{_libdir}/gems/exts/%{gem_name}-%{version}}

%description
Easy upload management for ActiveRecord


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

%description doc
Documentation for %{name}

%prep
%setup -q -c -T
mkdir -p .%{gem_dir}
gem install --local --install-dir .%{gem_dir} \
            --force %{SOURCE0}

%if 0%{?el6}
pushd .%{gem_instdir}/
  # We don't have gems to support these tests.
  rm test/storage/fog_test.rb
  rm test/storage/s3_live_test.rb test/storage/s3_test.rb
popd
%endif

# Remove developer files
rm -rf .%{gem_instdir}/.gitignore
rm -rf .%{gem_instdir}/.travis.yml
# Remove extra gemspec file
rm -rf .%{gem_instdir}/%{gem_name}.gemspec

%build

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

%check
pushd .%{gem_instdir}
  testrb -Ilib test/*/*_test.rb
  # The cucumber tests fail because we're not using bundler
  # TODO: fix the tests to run without bundler
  #cucumber features/*.feature
popd


%files
%dir %{gem_instdir}
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
%{gem_instdir}/generators
%{gem_instdir}/init.rb
%{gem_instdir}/rails

%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/Appraisals
%doc %{gem_instdir}/CONTRIBUTING.md
%doc %{gem_instdir}/LICENSE
%doc %{gem_instdir}/NEWS
%doc %{gem_instdir}/README.md
%{gem_instdir}/Gemfile
%{gem_instdir}/Gemfile.lock
%{gem_instdir}/Rakefile
%{gem_instdir}/cucumber
%{gem_instdir}/gemfiles
%{gem_instdir}/features
%{gem_instdir}/shoulda_macros
%{gem_instdir}/test


%changelog
* Wed Feb 13 2013 Ken Dreyer <ktdreyer@ktdreyer.com> - 2.7.4-1
- Downgrade to paperclip 2.7.4
- RHEL 6 compatibility

* Fri Aug 03 2012 Ken Dreyer <ktdreyer@ktdreyer.com> - 3.1.4-1
- Initial package, created by gem2rpm 0.8.1