bundle2rpm 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/bundle2rpm +2 -46
- data/bundle2rpm.gemspec +1 -1
- data/etc/template.spec +43 -0
- metadata +4 -3
data/bin/bundle2rpm
CHANGED
|
@@ -120,7 +120,8 @@ end
|
|
|
120
120
|
def write_rpm_spec(to_file)
|
|
121
121
|
puts "Generating RPM spec file."
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
template_path = File.expand_path(File.dirname(__FILE__) + "/../etc/template.spec")
|
|
124
|
+
spec_file = File.read(template_path)
|
|
124
125
|
|
|
125
126
|
# Replace all |xxx| variables in our template with the mapped
|
|
126
127
|
# values via @variable_map:
|
|
@@ -328,48 +329,3 @@ rescue Exceptions::CommandError => e
|
|
|
328
329
|
ensure
|
|
329
330
|
cleanup_working_dir unless @no_cleanup
|
|
330
331
|
end
|
|
331
|
-
|
|
332
|
-
__END__
|
|
333
|
-
Summary: bundle2rpm Package
|
|
334
|
-
Name: |package_name|
|
|
335
|
-
Version: |package_version|
|
|
336
|
-
Release: |package_release|
|
|
337
|
-
License: |license|
|
|
338
|
-
Group: Applications/RubyGems
|
|
339
|
-
URL: |url|
|
|
340
|
-
BuildRoot: %{_tmppath}/%{name}-root
|
|
341
|
-
Prefix: %(echo %{_prefix})
|
|
342
|
-
AutoProv: no
|
|
343
|
-
|
|
344
|
-
%description
|
|
345
|
-
This package was generated by bundle2rpm. It contains a deployed Gem bundle which
|
|
346
|
-
may contain one or more individual Ruby Gems.
|
|
347
|
-
|
|
348
|
-
%install
|
|
349
|
-
[ -d ${RPM_BUILD_ROOT} ] && rm -rf ${RPM_BUILD_ROOT}
|
|
350
|
-
install -d ${RPM_BUILD_ROOT}%{_prefix}
|
|
351
|
-
cp -R ${RPM_SOURCE_DIR}/* ${RPM_BUILD_ROOT}%{_prefix}
|
|
352
|
-
|
|
353
|
-
find ${RPM_BUILD_ROOT}%{_prefix} \( \( -type f -o -type l \) -printf '"%%p"\n' \) \
|
|
354
|
-
-o \( -type d -a -printf '%%%%dir "%%p"\n' \) \
|
|
355
|
-
| sed "s@${RPM_BUILD_ROOT}@@g" \
|
|
356
|
-
> bundle.lst
|
|
357
|
-
|
|
358
|
-
# Remove the first line, it's the prefix-dir which we do not
|
|
359
|
-
# want under rpm control:
|
|
360
|
-
sed -i 1d bundle.lst
|
|
361
|
-
|
|
362
|
-
%post
|
|
363
|
-
#!/bin/bash
|
|
364
|
-
bundle_dir="%{_prefix}/%{name}-%{version}-%{release}"
|
|
365
|
-
sed -i "s@REPLACE_WITH_BUNDLE_DIR@${bundle_dir}@g" ${bundle_dir}/.bundle/*
|
|
366
|
-
sed -i "s@REPLACE_WITH_BUNDLE_DIR@${bundle_dir}@g" ${bundle_dir}/bin/*
|
|
367
|
-
|
|
368
|
-
%clean
|
|
369
|
-
[ -d ${RPM_BUILD_ROOT} ] && rm -rf ${RPM_BUILD_ROOT}
|
|
370
|
-
|
|
371
|
-
%files -f bundle.lst
|
|
372
|
-
%defattr(-,|user|,|group|,-)
|
|
373
|
-
|
|
374
|
-
%changelog
|
|
375
|
-
|changelog|
|
data/bundle2rpm.gemspec
CHANGED
data/etc/template.spec
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Summary: bundle2rpm Package
|
|
2
|
+
Name: |package_name|
|
|
3
|
+
Version: |package_version|
|
|
4
|
+
Release: |package_release|
|
|
5
|
+
License: |license|
|
|
6
|
+
Group: Applications/RubyGems
|
|
7
|
+
URL: |url|
|
|
8
|
+
BuildRoot: %{_tmppath}/%{name}-root
|
|
9
|
+
Prefix: %(echo %{_prefix})
|
|
10
|
+
AutoProv: no
|
|
11
|
+
|
|
12
|
+
%description
|
|
13
|
+
This package was generated by bundle2rpm. It contains a deployed Gem bundle which
|
|
14
|
+
may contain one or more individual Ruby Gems.
|
|
15
|
+
|
|
16
|
+
%install
|
|
17
|
+
[ -d ${RPM_BUILD_ROOT} ] && rm -rf ${RPM_BUILD_ROOT}
|
|
18
|
+
install -d ${RPM_BUILD_ROOT}%{_prefix}
|
|
19
|
+
cp -R ${RPM_SOURCE_DIR}/* ${RPM_BUILD_ROOT}%{_prefix}
|
|
20
|
+
|
|
21
|
+
find ${RPM_BUILD_ROOT}%{_prefix} \( \( -type f -o -type l \) -printf '"%%p"\n' \) \
|
|
22
|
+
-o \( -type d -a -printf '%%%%dir "%%p"\n' \) \
|
|
23
|
+
| sed "s@${RPM_BUILD_ROOT}@@g" \
|
|
24
|
+
> bundle.lst
|
|
25
|
+
|
|
26
|
+
# Remove the first line, it's the prefix-dir which we do not
|
|
27
|
+
# want under rpm control:
|
|
28
|
+
sed -i 1d bundle.lst
|
|
29
|
+
|
|
30
|
+
%post
|
|
31
|
+
#!/bin/bash
|
|
32
|
+
bundle_dir="%{_prefix}/%{name}-%{version}-%{release}"
|
|
33
|
+
sed -i "s@REPLACE_WITH_BUNDLE_DIR@${bundle_dir}@g" ${bundle_dir}/.bundle/*
|
|
34
|
+
sed -i "s@REPLACE_WITH_BUNDLE_DIR@${bundle_dir}@g" ${bundle_dir}/bin/*
|
|
35
|
+
|
|
36
|
+
%clean
|
|
37
|
+
[ -d ${RPM_BUILD_ROOT} ] && rm -rf ${RPM_BUILD_ROOT}
|
|
38
|
+
|
|
39
|
+
%files -f bundle.lst
|
|
40
|
+
%defattr(-,|user|,|group|,-)
|
|
41
|
+
|
|
42
|
+
%changelog
|
|
43
|
+
|changelog|
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bundle2rpm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 19
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 1
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 1.0.
|
|
9
|
+
- 2
|
|
10
|
+
version: 1.0.2
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Matt Savona
|
|
@@ -48,6 +48,7 @@ files:
|
|
|
48
48
|
- README.md
|
|
49
49
|
- bin/bundle2rpm
|
|
50
50
|
- bundle2rpm.gemspec
|
|
51
|
+
- etc/template.spec
|
|
51
52
|
- lib/.gitstub
|
|
52
53
|
has_rdoc: true
|
|
53
54
|
homepage: http://loopforever.com
|