forked from Katello/katello
-
Notifications
You must be signed in to change notification settings - Fork 1
/
rubygem-katello.spec
309 lines (272 loc) · 10.6 KB
/
rubygem-katello.spec
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
%{?scl:%scl_package rubygem-%{gem_name}}
%{!?scl:%global pkg_name %{name}}
%global gem_name katello
%global foreman_dir /usr/share/foreman
%global foreman_bundlerd_dir %{foreman_dir}/bundler.d
%if !("%{?scl}" == "ruby193" || 0%{?rhel} > 6 || 0%{?fedora} > 16)
%global gem_dir /usr/lib/ruby/gems/1.8
%global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}
%global gem_libdir %{gem_instdir}/lib
%global gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem
%global gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec
%global gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}
%endif
%if "%{?scl}" == "ruby193"
%global scl_ruby /usr/bin/ruby193-ruby
%global scl_rake /usr/bin/ruby193-rake
### TODO temp disabled for SCL
%global nodoc 1
%else
%global scl_ruby /usr/bin/ruby
%global scl_rake /usr/bin/rake
%endif
Summary: Katello
Name: %{?scl_prefix}rubygem-%{gem_name}
Version: 1.5.0
Release: 10%{dist}
Group: Development/Ruby
License: Distributable
URL: http://www.katello.org
Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem
%if "%{?scl}" == "ruby193"
Requires: %{?scl_prefix}ruby-wrapper
BuildRequires: %{?scl_prefix}ruby-wrapper
%endif
%if "%{?scl}" == "ruby193" || 0%{?rhel} > 6 || 0%{?fedora} > 16
BuildRequires: %{?scl_prefix}rubygems-devel
%endif
%if 0%{?fedora} > 19
Requires: %{?scl_prefix}ruby(release) = 2.0.0
BuildRequires: %{?scl_prefix}ruby(release) = 2.0.0
%else
%if "%{?scl}" == "ruby193" || 0%{?rhel} > 6 || 0%{?fedora} > 16
Requires: %{?scl_prefix}ruby(abi) = 1.9.1
BuildRequires: %{?scl_prefix}ruby(abi) = 1.9.1
%else
Requires: ruby(abi) = 1.8
BuildRequires: ruby(abi) = 1.8
%endif
%endif
# service-wait dependency
Requires: wget
Requires: curl
%if 0%{?rhel} == 6
Requires: redhat-logos >= 60.0.14
%endif
%if 0%{?fedora} > 18
Requires(post): candlepin-tomcat
%else
Requires(post): candlepin-tomcat6
%endif
Requires(post): chkconfig
Requires(postun): initscripts coreutils sed
Requires(pre): shadow-utils
Requires(preun): chkconfig
Requires(preun): initscripts
#Pulp Requirements
Requires: pulp-katello-plugins
Requires: pulp-nodes-parent
Requires: pulp-puppet-plugins
Requires: pulp-rpm-plugins
Requires: pulp-selinux
Requires: pulp-server
Requires: mongodb
Requires: mongodb-server
#Qpid Requirements
Requires: qpid-cpp-client
Requires: qpid-cpp-client-ssl
Requires: qpid-cpp-server
Requires: qpid-cpp-server-ssl
Requires: candlepin-selinux
Requires: createrepo >= 0.9.9-18%{?dist}
Requires: elasticsearch
Requires: foreman >= 1.3.0
Requires: java-openjdk
# Still Requires katello-common which clashes with
# new build - will re-enable after fixing
#Requires: katello-selinux
Requires: libvirt-devel
Requires: lsof
Requires: postgresql
Requires: postgresql-server
Requires: v8
Requires: %{?scl_prefix}rubygems
Requires: %{?scl_prefix}rubygem-angular-rails-templates >= 0.0.4
Requires: %{?scl_prefix}rubygem-rails
Requires: %{?scl_prefix}rubygem-json
Requires: %{?scl_prefix}rubygem-oauth
Requires: %{?scl_prefix}rubygem-rest-client
Requires: %{?scl_prefix}rubygem-net-ldap
Requires: %{?scl_prefix}rubygem-ldap_fluff >= 0.2.2
Requires: %{?scl_prefix}rubygem-foreigner => 1.4.2
Requires: %{?scl_prefix}rubygem-foreigner < 1.5
Requires: %{?scl_prefix}rubygem-daemons >= 1.1.4
Requires: %{?scl_prefix}rubygem-uuidtools
Requires: %{?scl_prefix}rubygem-rabl
Requires: %{?scl_prefix}rubygem-tire => 0.6.2
Requires: %{?scl_prefix}rubygem-tire < 0.7
Requires: %{?scl_prefix}rubygem-logging >= 1.8.0
Requires: %{?scl_prefix}rubygem-hooks
Requires: %{?scl_prefix}rubygem-foreman-tasks >= 0.5.0
Requires: %{?scl_prefix}rubygem-justified
Requires: %{?scl_prefix}rubygem-delayed_job => 3.0.2
Requires: %{?scl_prefix}rubygem-delayed_job < 3.1
Requires: %{?scl_prefix}rubygem-delayed_job_active_record => 0.3.3
Requires: %{?scl_prefix}rubygem-delayed_job_active_record < 0.4
Requires: %{?scl_prefix}rubygem-gettext_i18n_rails
Requires: %{?scl_prefix}rubygem-i18n_data >= 0.2.6
Requires: %{?scl_prefix}rubygem-apipie-rails >= 0.1.1
Requires: %{?scl_prefix}rubygem-maruku
Requires: %{?scl_prefix}rubygem-runcible >= 1.0.8
Requires: %{?scl_prefix}rubygem-ruby-openid
Requires: %{?scl_prefix}rubygem-anemone
Requires: %{?scl_prefix}rubygem-simple-navigation >= 3.3.4
Requires: %{?scl_prefix}rubygem-sass-rails
Requires: %{?scl_prefix}rubygem-less-rails
Requires: %{?scl_prefix}rubygem-compass-rails
Requires: %{?scl_prefix}rubygem-compass-960-plugin
Requires: %{?scl_prefix}rubygem-haml-rails
Requires: %{?scl_prefix}rubygem-ui_alchemy-rails = 1.0.12
Requires: %{?scl_prefix}rubygem-deface < 1.0.0
Requires: %{?scl_prefix}rubygem-strong_parameters
BuildRequires: foreman >= 1.3.0
BuildRequires: %{?scl_prefix}rubygem-angular-rails-templates >= 0.0.4
BuildRequires: %{?scl_prefix}rubygem-net-ldap
BuildRequires: %{?scl_prefix}rubygem-ldap_fluff >= 0.2.2
BuildRequires: %{?scl_prefix}rubygem-sqlite3
BuildRequires: %{?scl_prefix}rubygem-tire => 0.6.2
BuildRequires: %{?scl_prefix}rubygem-tire < 0.7
BuildRequires: %{?scl_prefix}rubygem-logging >= 1.8.0
BuildRequires: %{?scl_prefix}rubygem-hooks
BuildRequires: %{?scl_prefix}rubygem-foreman-tasks >= 0.5.0
BuildRequires: %{?scl_prefix}rubygem-justified
BuildRequires: %{?scl_prefix}rubygem-delayed_job => 3.0.2
BuildRequires: %{?scl_prefix}rubygem-delayed_job < 3.1
BuildRequires: %{?scl_prefix}rubygem-delayed_job_active_record => 0.3.3
BuildRequires: %{?scl_prefix}rubygem-delayed_job_active_record < 0.4
BuildRequires: %{?scl_prefix}rubygem-gettext_i18n_rails
BuildRequires: %{?scl_prefix}rubygem-i18n_data >= 0.2.6
BuildRequires: %{?scl_prefix}rubygem-apipie-rails >= 0.1.1
BuildRequires: %{?scl_prefix}rubygem-maruku
BuildRequires: %{?scl_prefix}rubygem-runcible >= 1.0.8
BuildRequires: %{?scl_prefix}rubygem-ruby-openid
BuildRequires: %{?scl_prefix}rubygem-anemone
BuildRequires: %{?scl_prefix}rubygem-simple-navigation >= 3.3.4
BuildRequires: %{?scl_prefix}rubygem-sass-rails
BuildRequires: %{?scl_prefix}rubygem-less-rails
BuildRequires: %{?scl_prefix}rubygem-compass-rails
BuildRequires: %{?scl_prefix}rubygem-compass-960-plugin
BuildRequires: %{?scl_prefix}rubygem-haml-rails
BuildRequires: %{?scl_prefix}rubygem-ui_alchemy-rails = 1.0.12
BuildRequires: %{?scl_prefix}rubygem-deface < 1.0.0
BuildRequires: %{?scl_prefix}rubygem(uglifier) >= 1.0.3
BuildRequires: %{?scl_prefix}rubygem-strong_parameters
BuildRequires: %{?scl_prefix}rubygems
BuildArch: noarch
Provides: %{?scl_prefix}rubygem(katello) = %{version}
%description
Katello
%package doc
BuildArch: noarch
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
Summary: Documentation for rubygem-%{gem_name}
%description doc
This package contains documentation for rubygem-%{gem_name}.
%prep
%setup -n %{pkg_name}-%{version} -q -c -T
mkdir -p .%{gem_dir}
%{?scl:scl enable %{scl} "}
gem install --local --install-dir .%{gem_dir} --force %{SOURCE0}
%{?scl:"}
%build
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
mkdir -p ./usr/share
cp -r %{foreman_dir} ./usr/share || echo 0
pushd ./usr/share/foreman
export GEM_PATH=%{gem_dir}:%{buildroot}%{gem_dir}
cat <<GEMFILE > ./bundler.d/%{gem_name}.rb
group :katello do
gem '%{gem_name}'
gem 'sass-rails'
end
GEMFILE
unlink tmp
cp %{buildroot}%{gem_instdir}/config/katello_defaults.yml %{buildroot}%{gem_instdir}/config/katello.yml
export BUNDLER_EXT_NOSTRICT=1
export BUNDLER_EXT_GROUPS="default assets katello"
%{scl_rake} assets:precompile:katello RAILS_ENV=production --trace
popd
rm -rf ./usr
rm %{buildroot}%{gem_instdir}/config/katello.yml
mkdir -p %{buildroot}%{foreman_bundlerd_dir}
cat <<GEMFILE > %{buildroot}%{foreman_bundlerd_dir}/%{gem_name}.rb
group :katello do
gem '%{gem_name}'
gem 'sass-rails'
end
GEMFILE
mkdir -p %{buildroot}%{foreman_dir}/public/assets
ln -s %{gem_instdir}/public/assets/katello %{buildroot}%{foreman_dir}/public/assets/katello
ln -s %{gem_instdir}/public/assets/bastion %{buildroot}%{foreman_dir}/public/assets/bastion
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-, root, root)
%{gem_instdir}/
%exclude %{gem_cache}
%{gem_spec}
%{foreman_bundlerd_dir}/%{gem_name}.rb
%{foreman_dir}/public/assets/katello
%{foreman_dir}/public/assets/bastion
%files doc
%{gem_dir}/doc/%{gem_name}-%{version}
%changelog
* Tue Jan 21 2014 Mike McCune <[email protected]> 1.5.0-10
- rebuild with latest in master
* Mon Dec 16 2013 Jason Montleon <[email protected]> 1.5.0-9
- Tag rubygem-katello-1.5.0-9
* Mon Dec 16 2013 Jason Montleon <[email protected]> 1.5.0-9
- fixes for engine packaging ([email protected])
- Merge remote-tracking branch 'upstream/master' into engine-packaging
- Merge pull request #3513 from daviddavis/temp/20131216104958
- Merge pull request #3510 from mkelley33/readme-grunt-bower-task
- Reorganize dependency errors section of README ([email protected])
- Creating a katello.local.rb for development ([email protected])
- Engine: Renaming localized gemfile to something less generic
- Merge pull request #3483 from komidore64/system-api-v2 ([email protected])
- Merge pull request #3507 from ehelms/update-readme ([email protected])
- Engine: Fixing katello_dev gem echo statement ([email protected])
- API v2 - v2 systems_controller w/ create, index, and show
- Merge pull request #3506 from jmontleon/version-fix ([email protected])
- Fixing inconsistency in setup workflow. ([email protected])
- Merge pull request #3469 from ehelms/allow-development-gems
- Changes to support Katello engine RPM builds ([email protected])
- Merge pull request #3497 from mkelley33/fix-product-namespacing
- change version to 1.5.0 for next release ([email protected])
- Allows development gems to be declared that can be ignored in production mode
by bundler. ([email protected])
- add locale directory to gem.files ([email protected])
- Fix namespacing in Katello::Authorization::Product ([email protected])
* Fri Dec 13 2013 Jason Montleon <[email protected]> 1.4.0-8
- fix gempsec ([email protected])
- Changes to support Katello engine RPM builds ([email protected])
- Merge pull request #3459 from ehelms/remove-travis ([email protected])
- Merge pull request #3484 from domcleal/no-puppet ([email protected])
- Merge pull request #3501 from daviddavis/temp/20131212153148
- Bastion: enabling jshint whitespace detection. ([email protected])
- Removing Travis configs and scripts as we rely on the Foreman CI
infrastructure. ([email protected])
- Remove obsolete Puppet/Facter installation references ([email protected])
* Thu Dec 12 2013 Jason Montleon <[email protected]> 1.4.0-7
- add changelog ([email protected])