/
rubygem-rubyzip.spec
108 lines (81 loc) · 2.63 KB
/
rubygem-rubyzip.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
# Generated from rubyzip-0.9.1.gem by gem2rpm -*- rpm-spec -*-
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
%global gemname rubyzip
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
Summary: A ruby module for reading and writing zip files
Name: rubygem-%{gemname}
Version: 0.9.4
Release: 2%{?dist}
Group: Development/Languages
License: GPLv2+ or Ruby
URL: http://rubyzip.sourceforge.net/
Source0: Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem
Patch0: rubyzip-commentsize.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: ruby(abi) = 1.8
Requires: rubygems
BuildRequires: rubygems
BuildArch: noarch
Provides: rubygem(%{gemname}) = %{version}
%description
rubyzip is a ruby module for reading and writing zip files
%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
%description doc
This package contains documentation for %{name}.
%prep
%build
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{gemdir}
gem install --local --install-dir %{buildroot}%{gemdir} \
--force --rdoc %{SOURCE0}
pushd %{buildroot}
patch -p0 < %{PATCH0}
popd
chmod 755 %{buildroot}%{geminstdir}/install.rb
for SCRIPT in example_filesystem gtkRubyzip example write_simple qtzip zipfind
do
chmod 755 %{buildroot}%{geminstdir}/samples/$SCRIPT.rb
done
for RB in stdrubyext zip tempfile_bugfixed ioextras zipfilesystem ziprequire
do
chmod 644 %{buildroot}%{geminstdir}/lib/zip/$RB.rb
done
chmod 644 %{buildroot}%{geminstdir}/Rakefile
# These aren't executables
sed -i -e '/^#!\/usr\/bin\/env ruby/d' \
%{buildroot}%{geminstdir}/Rakefile
# CRLF is sprinkled throughout the files
find %{buildroot}%{geminstdir} -type f -print0 | xargs -0 -n1 sed -i 's/\r//'
%clean
rm -rf %{buildroot}
%files
%defattr(-, root, root, -)
%doc %{geminstdir}/[A-Z]*
%dir %{geminstdir}
%{geminstdir}/install.rb
%{geminstdir}/lib
%{geminstdir}/samples
%doc %{gemdir}/doc/%{gemname}-%{version}
%{gemdir}/cache/%{gemname}-%{version}.gem
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
%files doc
%defattr(-,root,root,-)
%{geminstdir}/Rakefile
%{geminstdir}/test
%{gemdir}/doc/%{gemname}-%{version}
%changelog
* Thu May 13 2010 Adam Young <ayoung@redhat.com> - 0.9.4-2
- Upgraded to 0.9.4, with a patch to make buildr run
* Tue May 11 2010 Adam Young <ayoung@redhat.com> - 0.9.1-2
- Split documentation out into separate rpm
- Fixed rpmlint errors
* Tue May 11 2010 Adam Young <ayoung@redhat.com> - 0.9.1-2
- Fixed License
- Added ABI Dependency
- changed define to global
* Tue Apr 06 2010 Adam Young <ayoung@redhat.com> - 0.9.1-1
- Initial package