bookie_accounting 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +100 -113
- data/bin/bookie-create-tables +1 -1
- data/bin/bookie-data +1 -1
- data/bin/bookie-send +1 -1
- data/lib/bookie/version.rb +1 -1
- data/rpm/activesupport.erb +151 -0
- data/rpm/bundle.erb +71 -0
- data/rpm/default.erb +147 -0
- data/rpm/mysql2.erb +149 -0
- data/rpm/pacct.erb +147 -0
- data/rpm/rspec-core.erb +149 -0
- data/rpm/sqlite3.erb +147 -0
- metadata +157 -152
- data/rpm/bookie_accounting.spec.erb +0 -83
- data/rpm/spec_template.erb +0 -77
data/rpm/mysql2.erb
ADDED
@@ -0,0 +1,149 @@
|
|
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
|
data/rpm/pacct.erb
ADDED
@@ -0,0 +1,147 @@
|
|
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}-universal-linux
|
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}-universal-linux.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}-universal-linux.gem
|
130
|
+
%{gemdir}/specifications/%{gemname}-%{version}-universal-linux.gemspec
|
131
|
+
|
132
|
+
<% if doc_subpackage -%>
|
133
|
+
%files doc
|
134
|
+
%doc %{gemdir}/doc/%{gemname}-%{version}-universal-linux
|
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/rspec-core.erb
ADDED
@@ -0,0 +1,149 @@
|
|
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}/exe -type f | xargs chmod a+x
|
102
|
+
find %{buildroot}%{_bindir} -type f | xargs chmod a+x
|
103
|
+
<% end -%>
|
104
|
+
<% if nongem -%>
|
105
|
+
mkdir -p %{buildroot}%{ruby_sitelib}
|
106
|
+
<% spec.files.select{ |f| spec.require_paths.include?(File::dirname(f)) }.each do |p| -%>
|
107
|
+
ln -s %{gemdir}/gems/%{gemname}-%{version}/<%= p %> %{buildroot}%{ruby_sitelib}
|
108
|
+
<% end -%>
|
109
|
+
<% end # if nongem -%>
|
110
|
+
|
111
|
+
%files
|
112
|
+
%{geminstdir}
|
113
|
+
<% unless spec.executables.nil? or spec.executables.empty? -%>
|
114
|
+
<% for f in spec.executables -%>
|
115
|
+
%{_bindir}/<%= f %>
|
116
|
+
<% end -%>
|
117
|
+
%{geminstdir}/exe
|
118
|
+
%{_bindir}/*
|
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
|
data/rpm/sqlite3.erb
ADDED
@@ -0,0 +1,147 @@
|
|
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: sqlite
|
32
|
+
BuildRequires: sqlite-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
|
+
<% 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
|