bookie_accounting 1.2.3 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -3
- data/README.md +4 -24
- data/Rakefile +9 -116
- data/bin/bookie-data +48 -7
- data/bin/bookie-send +6 -14
- data/bookie_accounting.gemspec +4 -3
- data/lib/bookie/database/group.rb +33 -0
- data/lib/bookie/database/job.rb +201 -0
- data/lib/bookie/database/job_summary.rb +268 -0
- data/lib/bookie/database/lock.rb +36 -0
- data/lib/bookie/database/system.rb +166 -0
- data/lib/bookie/database/system_type.rb +80 -0
- data/lib/bookie/database/user.rb +54 -0
- data/lib/bookie/database.rb +7 -805
- data/lib/bookie/extensions.rb +23 -44
- data/lib/bookie/formatter.rb +8 -4
- data/lib/bookie/sender.rb +12 -14
- data/lib/bookie/version.rb +1 -1
- data/snapshot/test_config.json +2 -2
- data/spec/config_spec.rb +2 -2
- data/spec/database/group_spec.rb +36 -0
- data/spec/database/job_spec.rb +308 -0
- data/spec/database/job_summary_spec.rb +302 -0
- data/spec/database/lock_spec.rb +41 -0
- data/spec/database/migration_spec.rb +44 -0
- data/spec/database/system_spec.rb +232 -0
- data/spec/database/system_type_spec.rb +68 -0
- data/spec/database/user_spec.rb +69 -0
- data/spec/formatter_spec.rb +44 -37
- data/spec/{comma_dump_formatter_spec.rb → formatters/comma_dump_spec.rb} +16 -30
- data/spec/formatters/spreadsheet_spec.rb +98 -0
- data/spec/{stdout_formatter_spec.rb → formatters/stdout_spec.rb} +15 -29
- data/spec/sender_spec.rb +92 -66
- data/spec/{standalone_sender_spec.rb → senders/standalone_spec.rb} +10 -9
- data/spec/{torque_cluster_sender_spec.rb → senders/torque_cluster_spec.rb} +9 -13
- data/spec/spec_helper.rb +111 -57
- data/todo.txt +13 -0
- metadata +38 -23
- data/rpm/activesupport.erb +0 -151
- data/rpm/bundle.erb +0 -71
- data/rpm/default.erb +0 -147
- data/rpm/mysql2.erb +0 -149
- data/rpm/pacct.erb +0 -147
- data/rpm/rspec-core.erb +0 -149
- data/rpm/sqlite3.erb +0 -147
- data/spec/database_spec.rb +0 -1078
- data/spec/spreadsheet_formatter_spec.rb +0 -114
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bookie_accounting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Merritt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -94,7 +94,7 @@ dependencies:
|
|
94
94
|
- - '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
-
description: A simple system to
|
97
|
+
description: A simple system to consolidate and analyze process accounting records
|
98
98
|
email:
|
99
99
|
- blm768@gmail.com
|
100
100
|
executables:
|
@@ -117,6 +117,13 @@ files:
|
|
117
117
|
- lib/bookie.rb
|
118
118
|
- lib/bookie/config.rb
|
119
119
|
- lib/bookie/database.rb
|
120
|
+
- lib/bookie/database/group.rb
|
121
|
+
- lib/bookie/database/job.rb
|
122
|
+
- lib/bookie/database/job_summary.rb
|
123
|
+
- lib/bookie/database/lock.rb
|
124
|
+
- lib/bookie/database/system.rb
|
125
|
+
- lib/bookie/database/system_type.rb
|
126
|
+
- lib/bookie/database/user.rb
|
120
127
|
- lib/bookie/extensions.rb
|
121
128
|
- lib/bookie/formatter.rb
|
122
129
|
- lib/bookie/formatters/comma_dump.rb
|
@@ -126,13 +133,6 @@ files:
|
|
126
133
|
- lib/bookie/senders/standalone.rb
|
127
134
|
- lib/bookie/senders/torque_cluster.rb
|
128
135
|
- lib/bookie/version.rb
|
129
|
-
- rpm/activesupport.erb
|
130
|
-
- rpm/bundle.erb
|
131
|
-
- rpm/default.erb
|
132
|
-
- rpm/mysql2.erb
|
133
|
-
- rpm/pacct.erb
|
134
|
-
- rpm/rspec-core.erb
|
135
|
-
- rpm/sqlite3.erb
|
136
136
|
- snapshot/config.json
|
137
137
|
- snapshot/default.json
|
138
138
|
- snapshot/pacct
|
@@ -144,17 +144,25 @@ files:
|
|
144
144
|
- snapshot/torque_invalid_lines_2
|
145
145
|
- snapshot/torque_invalid_lines_3
|
146
146
|
- snapshot/torque_large
|
147
|
-
- spec/comma_dump_formatter_spec.rb
|
148
147
|
- spec/config_spec.rb
|
149
|
-
- spec/
|
148
|
+
- spec/database/group_spec.rb
|
149
|
+
- spec/database/job_spec.rb
|
150
|
+
- spec/database/job_summary_spec.rb
|
151
|
+
- spec/database/lock_spec.rb
|
152
|
+
- spec/database/migration_spec.rb
|
153
|
+
- spec/database/system_spec.rb
|
154
|
+
- spec/database/system_type_spec.rb
|
155
|
+
- spec/database/user_spec.rb
|
150
156
|
- spec/extensions_spec.rb
|
151
157
|
- spec/formatter_spec.rb
|
158
|
+
- spec/formatters/comma_dump_spec.rb
|
159
|
+
- spec/formatters/spreadsheet_spec.rb
|
160
|
+
- spec/formatters/stdout_spec.rb
|
152
161
|
- spec/sender_spec.rb
|
162
|
+
- spec/senders/standalone_spec.rb
|
163
|
+
- spec/senders/torque_cluster_spec.rb
|
153
164
|
- spec/spec_helper.rb
|
154
|
-
-
|
155
|
-
- spec/standalone_sender_spec.rb
|
156
|
-
- spec/stdout_formatter_spec.rb
|
157
|
-
- spec/torque_cluster_sender_spec.rb
|
165
|
+
- todo.txt
|
158
166
|
homepage: https://github.com/blm768/bookie/
|
159
167
|
licenses:
|
160
168
|
- MIT
|
@@ -178,16 +186,23 @@ rubyforge_project:
|
|
178
186
|
rubygems_version: 2.0.3
|
179
187
|
signing_key:
|
180
188
|
specification_version: 4
|
181
|
-
summary: A simple system to
|
189
|
+
summary: A simple system to consolidate and analyze process accounting records
|
182
190
|
test_files:
|
183
|
-
- spec/comma_dump_formatter_spec.rb
|
184
191
|
- spec/config_spec.rb
|
185
|
-
- spec/
|
192
|
+
- spec/database/group_spec.rb
|
193
|
+
- spec/database/job_spec.rb
|
194
|
+
- spec/database/job_summary_spec.rb
|
195
|
+
- spec/database/lock_spec.rb
|
196
|
+
- spec/database/migration_spec.rb
|
197
|
+
- spec/database/system_spec.rb
|
198
|
+
- spec/database/system_type_spec.rb
|
199
|
+
- spec/database/user_spec.rb
|
186
200
|
- spec/extensions_spec.rb
|
187
201
|
- spec/formatter_spec.rb
|
202
|
+
- spec/formatters/comma_dump_spec.rb
|
203
|
+
- spec/formatters/spreadsheet_spec.rb
|
204
|
+
- spec/formatters/stdout_spec.rb
|
188
205
|
- spec/sender_spec.rb
|
206
|
+
- spec/senders/standalone_spec.rb
|
207
|
+
- spec/senders/torque_cluster_spec.rb
|
189
208
|
- spec/spec_helper.rb
|
190
|
-
- spec/spreadsheet_formatter_spec.rb
|
191
|
-
- spec/standalone_sender_spec.rb
|
192
|
-
- spec/stdout_formatter_spec.rb
|
193
|
-
- spec/torque_cluster_sender_spec.rb
|
data/rpm/activesupport.erb
DELETED
@@ -1,151 +0,0 @@
|
|
1
|
-
# Generated from <%= package.spec.file_name %> by gem2rpm -*- rpm-spec -*-
|
2
|
-
<% doc_subpackage = false %>
|
3
|
-
%global gemname <%= spec.name %>
|
4
|
-
|
5
|
-
<% if nongem -%>
|
6
|
-
%global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
|
7
|
-
<% end -%>
|
8
|
-
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
|
9
|
-
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
|
10
|
-
<%# TODO: Try to check against spec.required_ruby_version -%>
|
11
|
-
%global rubyabi 1.8
|
12
|
-
|
13
|
-
Summary: <%= spec.summary.gsub(/\.$/, "") %>
|
14
|
-
Name: rubygem-%{gemname}
|
15
|
-
Version: <%= spec.version %>
|
16
|
-
Release: 1%{?dist}
|
17
|
-
Group: Development/Languages
|
18
|
-
License: <%= if spec.licenses.length > 0 then spec.licenses.join(" and ") else "Unknown" end %>
|
19
|
-
<% if spec.homepage -%>
|
20
|
-
URL: <%= spec.homepage %>
|
21
|
-
<% end -%>
|
22
|
-
Source0: <%= download_path %>%{gemname}-%{version}.gem
|
23
|
-
Requires: ruby(abi) = %{rubyabi}
|
24
|
-
<% for req in spec.required_rubygems_version -%>
|
25
|
-
Requires: ruby(rubygems) <%= req %>
|
26
|
-
<% end -%>
|
27
|
-
<% for d in spec.runtime_dependencies -%>
|
28
|
-
<% for req in d.requirement -%>
|
29
|
-
Requires: rubygem(<%= d.name %>) <%= req %>
|
30
|
-
<% end -%>
|
31
|
-
<% end -%>
|
32
|
-
BuildRequires: ruby(abi) = %{rubyabi}
|
33
|
-
<% for req in spec.required_rubygems_version -%>
|
34
|
-
BuildRequires: ruby(rubygems) <%= req %>
|
35
|
-
<% end -%>
|
36
|
-
<%# TODO: Unfortunately this does not match with ruby(abi) yet -%>
|
37
|
-
<% for req in spec.required_ruby_version -%>
|
38
|
-
BuildRequires: ruby<%= "-devel" unless spec.extensions.empty? %> <%= req %>
|
39
|
-
<% end -%>
|
40
|
-
<% if spec.extensions.empty? -%>
|
41
|
-
BuildArch: noarch
|
42
|
-
<% else -%>
|
43
|
-
BuildRequires: ruby-devel
|
44
|
-
<% end -%>
|
45
|
-
Provides: rubygem(%{gemname}) = %{version}
|
46
|
-
|
47
|
-
%description
|
48
|
-
<%= spec.description %>
|
49
|
-
|
50
|
-
<% if doc_subpackage -%>
|
51
|
-
%package doc
|
52
|
-
Summary: Documentation for %{name}
|
53
|
-
Group: Documentation
|
54
|
-
Requires: %{name} = %{version}-%{release}
|
55
|
-
BuildArch: noarch
|
56
|
-
|
57
|
-
%description doc
|
58
|
-
Documentation for %{name}
|
59
|
-
<% end # if doc_subpackage -%>
|
60
|
-
|
61
|
-
<% if nongem -%>
|
62
|
-
%package -n ruby-%{gemname}
|
63
|
-
Summary: <%= spec.summary.gsub(/\.$/, "") %>
|
64
|
-
Group: Development/Languages
|
65
|
-
Requires: rubygem(%{gemname}) = %{version}
|
66
|
-
<% spec.files.select{ |f| spec.require_paths.include?(File::dirname(f)) }.reject { |f| f =~ /\.rb$/ }.collect { |f| File::basename(f) }.each do |p| -%>
|
67
|
-
Provides: ruby(<%= p %>) = %{version}
|
68
|
-
<% end -%>
|
69
|
-
%description -n ruby-%{gemname}
|
70
|
-
<%= spec.description -%>
|
71
|
-
<% end # if nongem -%>
|
72
|
-
|
73
|
-
%prep
|
74
|
-
%setup -q -c -T
|
75
|
-
mkdir -p .%{gemdir}
|
76
|
-
<% unless spec.extensions.empty? -%>
|
77
|
-
export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
|
78
|
-
<% end -%>
|
79
|
-
#To do: fix doc issue so docs can be installed on CentOS?
|
80
|
-
gem install --local --install-dir .%{gemdir} \
|
81
|
-
--no-rdoc \
|
82
|
-
--no-ri \
|
83
|
-
<% unless spec.executables.nil? or spec.executables.empty? -%>
|
84
|
-
--bindir .%{_bindir} \
|
85
|
-
<% end -%>
|
86
|
-
<% unless spec.extensions.empty? -%>
|
87
|
-
-V \
|
88
|
-
<% end -%>
|
89
|
-
--force %{SOURCE0}
|
90
|
-
|
91
|
-
%build
|
92
|
-
|
93
|
-
%install
|
94
|
-
mkdir -p %{buildroot}%{gemdir}
|
95
|
-
cp -pa .%{gemdir}/* \
|
96
|
-
%{buildroot}%{gemdir}/
|
97
|
-
<% unless spec.executables.nil? or spec.executables.empty? -%>
|
98
|
-
|
99
|
-
mkdir -p %{buildroot}%{_bindir}
|
100
|
-
cp -pa .%{_bindir}/* \
|
101
|
-
%{buildroot}%{_bindir}/
|
102
|
-
<% end -%>
|
103
|
-
|
104
|
-
<% unless spec.executables.empty? -%>
|
105
|
-
find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x
|
106
|
-
<% end -%>
|
107
|
-
<% if nongem -%>
|
108
|
-
mkdir -p %{buildroot}%{ruby_sitelib}
|
109
|
-
<% spec.files.select{ |f| spec.require_paths.include?(File::dirname(f)) }.each do |p| -%>
|
110
|
-
ln -s %{gemdir}/gems/%{gemname}-%{version}/<%= p %> %{buildroot}%{ruby_sitelib}
|
111
|
-
<% end -%>
|
112
|
-
<% end # if nongem -%>
|
113
|
-
|
114
|
-
%files
|
115
|
-
%{geminstdir}
|
116
|
-
<% unless spec.executables.nil? or spec.executables.empty? -%>
|
117
|
-
<% for f in spec.executables -%>
|
118
|
-
%{_bindir}/<%= f %>
|
119
|
-
<% end -%>
|
120
|
-
%{geminstdir}/bin
|
121
|
-
<% end -%>
|
122
|
-
%{geminstdir}/lib
|
123
|
-
<% unless spec.extensions.empty? -%>
|
124
|
-
<%# TODO: Is it possible to delete the folder specified by the spec.extensions? -%>
|
125
|
-
%exclude %{geminstdir}/ext
|
126
|
-
<% end -%>
|
127
|
-
<% unless doc_subpackage -%>
|
128
|
-
#%doc %{gemdir}/doc/%{gemname}-%{version}
|
129
|
-
<% for f in spec.extra_rdoc_files -%>
|
130
|
-
#%doc %{geminstdir}/<%= f %>
|
131
|
-
<% end -%>
|
132
|
-
<% end -%>
|
133
|
-
%exclude %{gemdir}/cache/%{gemname}-%{version}.gem
|
134
|
-
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
|
135
|
-
|
136
|
-
<% if doc_subpackage -%>
|
137
|
-
%files doc
|
138
|
-
%doc %{gemdir}/doc/%{gemname}-%{version}
|
139
|
-
<% for f in spec.extra_rdoc_files -%>
|
140
|
-
%doc %{geminstdir}/<%= f %>
|
141
|
-
<% end -%>
|
142
|
-
<% end # if doc_subpackage -%>
|
143
|
-
|
144
|
-
<% if nongem -%>
|
145
|
-
%files -n ruby-%{gemname}
|
146
|
-
%{ruby_sitelib}/*
|
147
|
-
<% end # if nongem -%>
|
148
|
-
|
149
|
-
%changelog
|
150
|
-
* <%= Time.now.strftime("%a %b %d %Y") %> <%= packager %> - <%= spec.version %>-1
|
151
|
-
- Initial package
|
data/rpm/bundle.erb
DELETED
@@ -1,71 +0,0 @@
|
|
1
|
-
#Borrows a few tricks from the gem2rpm default template
|
2
|
-
|
3
|
-
%define _prefix /opt/bookie
|
4
|
-
%define gemdir %{_prefix}
|
5
|
-
|
6
|
-
Name: bookie_accounting
|
7
|
-
Version: <%= bookie_spec.version %>
|
8
|
-
Release: 1%{?dist}
|
9
|
-
Summary: <%= bookie_spec.summary[0 ... -1] %>
|
10
|
-
|
11
|
-
#To do: change group?
|
12
|
-
Group: System Management
|
13
|
-
License: MIT
|
14
|
-
URL: http://github.com/blm768/bookie
|
15
|
-
<% sources.each_with_index do |src, i| %>
|
16
|
-
Source<%= i %>: <%= src %>
|
17
|
-
<% end %>
|
18
|
-
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
19
|
-
|
20
|
-
BuildRequires: ruby-devel, rubygems, mysql-devel, sqlite-devel
|
21
|
-
Requires: rubygems, mysql-libs, sqlite
|
22
|
-
|
23
|
-
%description
|
24
|
-
<% bookie_spec.description %>
|
25
|
-
|
26
|
-
|
27
|
-
%prep
|
28
|
-
export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
|
29
|
-
|
30
|
-
<% sources.each_with_index do |src, i| %>
|
31
|
-
gem install --local --install-dir .%{gemdir} \
|
32
|
-
--bindir .%{_bindir} \
|
33
|
-
--no-rdoc --no-ri \
|
34
|
-
-V \
|
35
|
-
--force %{SOURCE<%= i %>}
|
36
|
-
<% end %>
|
37
|
-
|
38
|
-
|
39
|
-
%build
|
40
|
-
|
41
|
-
|
42
|
-
%install
|
43
|
-
rm -rf %{buildroot}
|
44
|
-
mkdir -p %{buildroot}%{gemdir}
|
45
|
-
cp -r .%{gemdir}/* %{buildroot}%{gemdir}
|
46
|
-
echo "{}" > %{buildroot}%{_prefix}/config.json
|
47
|
-
chmod 600 %{buildroot}%{_prefix}/config.json
|
48
|
-
cat > %{buildroot}%{_bindir}/bookie-env <<-EOF
|
49
|
-
#!/bin/sh
|
50
|
-
export GEM_HOME=%{gemdir}
|
51
|
-
#To do: change path based on Ruby version.
|
52
|
-
export GEM_PATH=\$GEM_HOME:/usr/lib/ruby/gems/1.8
|
53
|
-
export PATH=%{_bindir}:\$PATH
|
54
|
-
export BOOKIE_CONFIG=%{_prefix}/config.json
|
55
|
-
|
56
|
-
eval "\$@"
|
57
|
-
EOF
|
58
|
-
chmod 700 %{buildroot}%{_bindir}/bookie-env
|
59
|
-
|
60
|
-
|
61
|
-
%clean
|
62
|
-
rm -rf %{buildroot}
|
63
|
-
|
64
|
-
|
65
|
-
%files
|
66
|
-
%defattr(-,root,root,-)
|
67
|
-
%{gemdir}
|
68
|
-
|
69
|
-
|
70
|
-
%changelog
|
71
|
-
|
data/rpm/default.erb
DELETED
@@ -1,147 +0,0 @@
|
|
1
|
-
# Generated from <%= package.spec.file_name %> by gem2rpm -*- rpm-spec -*-
|
2
|
-
%global gemname <%= spec.name %>
|
3
|
-
|
4
|
-
<% if nongem -%>
|
5
|
-
%global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
|
6
|
-
<% end -%>
|
7
|
-
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
|
8
|
-
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
|
9
|
-
<%# TODO: Try to check against spec.required_ruby_version -%>
|
10
|
-
%global rubyabi 1.8
|
11
|
-
|
12
|
-
Summary: <%= spec.summary.gsub(/\.$/, "") %>
|
13
|
-
Name: rubygem-%{gemname}
|
14
|
-
Version: <%= spec.version %>
|
15
|
-
Release: 1%{?dist}
|
16
|
-
Group: Development/Languages
|
17
|
-
License: <%= if spec.licenses.length > 0 then spec.licenses.join(" and ") else "Unknown" end %>
|
18
|
-
<% if spec.homepage -%>
|
19
|
-
URL: <%= spec.homepage %>
|
20
|
-
<% end -%>
|
21
|
-
Source0: <%= download_path %>%{gemname}-%{version}.gem
|
22
|
-
Requires: ruby(abi) = %{rubyabi}
|
23
|
-
<% for req in spec.required_rubygems_version -%>
|
24
|
-
Requires: ruby(rubygems) <%= req %>
|
25
|
-
<% end -%>
|
26
|
-
<% for d in spec.runtime_dependencies -%>
|
27
|
-
<% for req in d.requirement -%>
|
28
|
-
Requires: rubygem(<%= d.name %>) <%= req %>
|
29
|
-
<% end -%>
|
30
|
-
<% end -%>
|
31
|
-
BuildRequires: ruby(abi) = %{rubyabi}
|
32
|
-
<% for req in spec.required_rubygems_version -%>
|
33
|
-
BuildRequires: ruby(rubygems) <%= req %>
|
34
|
-
<% end -%>
|
35
|
-
<%# TODO: Unfortunately this does not match with ruby(abi) yet -%>
|
36
|
-
<% for req in spec.required_ruby_version -%>
|
37
|
-
BuildRequires: ruby<%= "-devel" unless spec.extensions.empty? %> <%= req %>
|
38
|
-
<% end -%>
|
39
|
-
<% if spec.extensions.empty? -%>
|
40
|
-
BuildArch: noarch
|
41
|
-
<% else -%>
|
42
|
-
BuildRequires: ruby-devel
|
43
|
-
<% end -%>
|
44
|
-
Provides: rubygem(%{gemname}) = %{version}
|
45
|
-
|
46
|
-
%description
|
47
|
-
<%= spec.description %>
|
48
|
-
|
49
|
-
<% if doc_subpackage -%>
|
50
|
-
%package doc
|
51
|
-
Summary: Documentation for %{name}
|
52
|
-
Group: Documentation
|
53
|
-
Requires: %{name} = %{version}-%{release}
|
54
|
-
BuildArch: noarch
|
55
|
-
|
56
|
-
%description doc
|
57
|
-
Documentation for %{name}
|
58
|
-
<% end # if doc_subpackage -%>
|
59
|
-
|
60
|
-
<% if nongem -%>
|
61
|
-
%package -n ruby-%{gemname}
|
62
|
-
Summary: <%= spec.summary.gsub(/\.$/, "") %>
|
63
|
-
Group: Development/Languages
|
64
|
-
Requires: rubygem(%{gemname}) = %{version}
|
65
|
-
<% spec.files.select{ |f| spec.require_paths.include?(File::dirname(f)) }.reject { |f| f =~ /\.rb$/ }.collect { |f| File::basename(f) }.each do |p| -%>
|
66
|
-
Provides: ruby(<%= p %>) = %{version}
|
67
|
-
<% end -%>
|
68
|
-
%description -n ruby-%{gemname}
|
69
|
-
<%= spec.description -%>
|
70
|
-
<% end # if nongem -%>
|
71
|
-
|
72
|
-
%prep
|
73
|
-
%setup -q -c -T
|
74
|
-
mkdir -p .%{gemdir}
|
75
|
-
<% unless spec.extensions.empty? -%>
|
76
|
-
export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
|
77
|
-
<% end -%>
|
78
|
-
gem install --local --install-dir .%{gemdir} \
|
79
|
-
<% unless spec.executables.nil? or spec.executables.empty? -%>
|
80
|
-
--bindir .%{_bindir} \
|
81
|
-
<% end -%>
|
82
|
-
<% unless spec.extensions.empty? -%>
|
83
|
-
-V \
|
84
|
-
<% end -%>
|
85
|
-
--force %{SOURCE0}
|
86
|
-
|
87
|
-
%build
|
88
|
-
|
89
|
-
%install
|
90
|
-
mkdir -p %{buildroot}%{gemdir}
|
91
|
-
cp -pa .%{gemdir}/* \
|
92
|
-
%{buildroot}%{gemdir}/
|
93
|
-
<% unless spec.executables.nil? or spec.executables.empty? -%>
|
94
|
-
|
95
|
-
mkdir -p %{buildroot}%{_bindir}
|
96
|
-
cp -pa .%{_bindir}/* \
|
97
|
-
%{buildroot}%{_bindir}/
|
98
|
-
<% end -%>
|
99
|
-
|
100
|
-
<% unless spec.executables.empty? -%>
|
101
|
-
find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x
|
102
|
-
<% end -%>
|
103
|
-
<% if nongem -%>
|
104
|
-
mkdir -p %{buildroot}%{ruby_sitelib}
|
105
|
-
<% spec.files.select{ |f| spec.require_paths.include?(File::dirname(f)) }.each do |p| -%>
|
106
|
-
ln -s %{gemdir}/gems/%{gemname}-%{version}/<%= p %> %{buildroot}%{ruby_sitelib}
|
107
|
-
<% end -%>
|
108
|
-
<% end # if nongem -%>
|
109
|
-
|
110
|
-
%files
|
111
|
-
%{geminstdir}
|
112
|
-
<% unless spec.executables.nil? or spec.executables.empty? -%>
|
113
|
-
<% for f in spec.executables -%>
|
114
|
-
%{_bindir}/<%= f %>
|
115
|
-
<% end -%>
|
116
|
-
%{geminstdir}/bin
|
117
|
-
<% end -%>
|
118
|
-
%{geminstdir}/lib
|
119
|
-
<% unless spec.extensions.empty? -%>
|
120
|
-
<%# TODO: Is it possible to delete the folder specified by the spec.extensions? -%>
|
121
|
-
%exclude %{geminstdir}/ext
|
122
|
-
<% end -%>
|
123
|
-
<% unless doc_subpackage -%>
|
124
|
-
%doc %{gemdir}/doc/%{gemname}-%{version}
|
125
|
-
<% for f in spec.extra_rdoc_files -%>
|
126
|
-
%doc %{geminstdir}/<%= f %>
|
127
|
-
<% end -%>
|
128
|
-
<% end -%>
|
129
|
-
%exclude %{gemdir}/cache/%{gemname}-%{version}.gem
|
130
|
-
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
|
131
|
-
|
132
|
-
<% if doc_subpackage -%>
|
133
|
-
%files doc
|
134
|
-
%doc %{gemdir}/doc/%{gemname}-%{version}
|
135
|
-
<% for f in spec.extra_rdoc_files -%>
|
136
|
-
%doc %{geminstdir}/<%= f %>
|
137
|
-
<% end -%>
|
138
|
-
<% end # if doc_subpackage -%>
|
139
|
-
|
140
|
-
<% if nongem -%>
|
141
|
-
%files -n ruby-%{gemname}
|
142
|
-
%{ruby_sitelib}/*
|
143
|
-
<% end # if nongem -%>
|
144
|
-
|
145
|
-
%changelog
|
146
|
-
* <%= Time.now.strftime("%a %b %d %Y") %> <%= packager %> - <%= spec.version %>-1
|
147
|
-
- Initial package
|
data/rpm/mysql2.erb
DELETED
@@ -1,149 +0,0 @@
|
|
1
|
-
# Generated from <%= package.spec.file_name %> by gem2rpm -*- rpm-spec -*-
|
2
|
-
%global gemname <%= spec.name %>
|
3
|
-
|
4
|
-
<% if nongem -%>
|
5
|
-
%global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
|
6
|
-
<% end -%>
|
7
|
-
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
|
8
|
-
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
|
9
|
-
<%# TODO: Try to check against spec.required_ruby_version -%>
|
10
|
-
%global rubyabi 1.8
|
11
|
-
|
12
|
-
Summary: <%= spec.summary.gsub(/\.$/, "") %>
|
13
|
-
Name: rubygem-%{gemname}
|
14
|
-
Version: <%= spec.version %>
|
15
|
-
Release: 1%{?dist}
|
16
|
-
Group: Development/Languages
|
17
|
-
License: <%= if spec.licenses.length > 0 then spec.licenses.join(" and ") else "Unknown" end %>
|
18
|
-
<% if spec.homepage -%>
|
19
|
-
URL: <%= spec.homepage %>
|
20
|
-
<% end -%>
|
21
|
-
Source0: <%= download_path %>%{gemname}-%{version}.gem
|
22
|
-
Requires: ruby(abi) = %{rubyabi}
|
23
|
-
<% for req in spec.required_rubygems_version -%>
|
24
|
-
Requires: ruby(rubygems) <%= req %>
|
25
|
-
<% end -%>
|
26
|
-
<% for d in spec.runtime_dependencies -%>
|
27
|
-
<% for req in d.requirement -%>
|
28
|
-
Requires: rubygem(<%= d.name %>) <%= req %>
|
29
|
-
<% end -%>
|
30
|
-
<% end -%>
|
31
|
-
Requires: mysql-libs
|
32
|
-
BuildRequires: mysql-devel
|
33
|
-
BuildRequires: ruby(abi) = %{rubyabi}
|
34
|
-
<% for req in spec.required_rubygems_version -%>
|
35
|
-
BuildRequires: ruby(rubygems) <%= req %>
|
36
|
-
<% end -%>
|
37
|
-
<%# TODO: Unfortunately this does not match with ruby(abi) yet -%>
|
38
|
-
<% for req in spec.required_ruby_version -%>
|
39
|
-
BuildRequires: ruby<%= "-devel" unless spec.extensions.empty? %> <%= req %>
|
40
|
-
<% end -%>
|
41
|
-
<% if spec.extensions.empty? -%>
|
42
|
-
BuildArch: noarch
|
43
|
-
<% else -%>
|
44
|
-
BuildRequires: ruby-devel
|
45
|
-
<% end -%>
|
46
|
-
Provides: rubygem(%{gemname}) = %{version}
|
47
|
-
|
48
|
-
%description
|
49
|
-
<%= spec.description %>
|
50
|
-
|
51
|
-
<% if doc_subpackage -%>
|
52
|
-
%package doc
|
53
|
-
Summary: Documentation for %{name}
|
54
|
-
Group: Documentation
|
55
|
-
Requires: %{name} = %{version}-%{release}
|
56
|
-
BuildArch: noarch
|
57
|
-
|
58
|
-
%description doc
|
59
|
-
Documentation for %{name}
|
60
|
-
<% end # if doc_subpackage -%>
|
61
|
-
|
62
|
-
<% if nongem -%>
|
63
|
-
%package -n ruby-%{gemname}
|
64
|
-
Summary: <%= spec.summary.gsub(/\.$/, "") %>
|
65
|
-
Group: Development/Languages
|
66
|
-
Requires: rubygem(%{gemname}) = %{version}
|
67
|
-
<% spec.files.select{ |f| spec.require_paths.include?(File::dirname(f)) }.reject { |f| f =~ /\.rb$/ }.collect { |f| File::basename(f) }.each do |p| -%>
|
68
|
-
Provides: ruby(<%= p %>) = %{version}
|
69
|
-
<% end -%>
|
70
|
-
%description -n ruby-%{gemname}
|
71
|
-
<%= spec.description -%>
|
72
|
-
<% end # if nongem -%>
|
73
|
-
|
74
|
-
%prep
|
75
|
-
%setup -q -c -T
|
76
|
-
mkdir -p .%{gemdir}
|
77
|
-
<% unless spec.extensions.empty? -%>
|
78
|
-
export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
|
79
|
-
<% end -%>
|
80
|
-
gem install --local --install-dir .%{gemdir} \
|
81
|
-
<% unless spec.executables.nil? or spec.executables.empty? -%>
|
82
|
-
--bindir .%{_bindir} \
|
83
|
-
<% end -%>
|
84
|
-
<% unless spec.extensions.empty? -%>
|
85
|
-
-V \
|
86
|
-
<% end -%>
|
87
|
-
--force %{SOURCE0}
|
88
|
-
|
89
|
-
%build
|
90
|
-
|
91
|
-
%install
|
92
|
-
mkdir -p %{buildroot}%{gemdir}
|
93
|
-
cp -pa .%{gemdir}/* \
|
94
|
-
%{buildroot}%{gemdir}/
|
95
|
-
<% unless spec.executables.nil? or spec.executables.empty? -%>
|
96
|
-
|
97
|
-
mkdir -p %{buildroot}%{_bindir}
|
98
|
-
cp -pa .%{_bindir}/* \
|
99
|
-
%{buildroot}%{_bindir}/
|
100
|
-
<% end -%>
|
101
|
-
|
102
|
-
<% unless spec.executables.empty? -%>
|
103
|
-
find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x
|
104
|
-
<% end -%>
|
105
|
-
<% if nongem -%>
|
106
|
-
mkdir -p %{buildroot}%{ruby_sitelib}
|
107
|
-
<% spec.files.select{ |f| spec.require_paths.include?(File::dirname(f)) }.each do |p| -%>
|
108
|
-
ln -s %{gemdir}/gems/%{gemname}-%{version}/<%= p %> %{buildroot}%{ruby_sitelib}
|
109
|
-
<% end -%>
|
110
|
-
<% end # if nongem -%>
|
111
|
-
|
112
|
-
%files
|
113
|
-
%{geminstdir}
|
114
|
-
<% unless spec.executables.nil? or spec.executables.empty? -%>
|
115
|
-
<% for f in spec.executables -%>
|
116
|
-
%{_bindir}/<%= f %>
|
117
|
-
<% end -%>
|
118
|
-
%{geminstdir}/bin
|
119
|
-
<% end -%>
|
120
|
-
%{geminstdir}/lib
|
121
|
-
<% unless spec.extensions.empty? -%>
|
122
|
-
<%# TODO: Is it possible to delete the folder specified by the spec.extensions? -%>
|
123
|
-
%exclude %{geminstdir}/ext
|
124
|
-
<% end -%>
|
125
|
-
<% unless doc_subpackage -%>
|
126
|
-
%doc %{gemdir}/doc/%{gemname}-%{version}
|
127
|
-
<% for f in spec.extra_rdoc_files -%>
|
128
|
-
%doc %{geminstdir}/<%= f %>
|
129
|
-
<% end -%>
|
130
|
-
<% end -%>
|
131
|
-
%exclude %{gemdir}/cache/%{gemname}-%{version}.gem
|
132
|
-
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
|
133
|
-
|
134
|
-
<% if doc_subpackage -%>
|
135
|
-
%files doc
|
136
|
-
%doc %{gemdir}/doc/%{gemname}-%{version}
|
137
|
-
<% for f in spec.extra_rdoc_files -%>
|
138
|
-
%doc %{geminstdir}/<%= f %>
|
139
|
-
<% end -%>
|
140
|
-
<% end # if doc_subpackage -%>
|
141
|
-
|
142
|
-
<% if nongem -%>
|
143
|
-
%files -n ruby-%{gemname}
|
144
|
-
%{ruby_sitelib}/*
|
145
|
-
<% end # if nongem -%>
|
146
|
-
|
147
|
-
%changelog
|
148
|
-
* <%= Time.now.strftime("%a %b %d %Y") %> <%= packager %> - <%= spec.version %>-1
|
149
|
-
- Initial package
|