/[packages]/cauldron/ruby-RubyGems/current/SOURCES/rubygems.macros
ViewVC logotype

Contents of /cauldron/ruby-RubyGems/current/SOURCES/rubygems.macros

Parent Directory Parent Directory | Revision Log Revision Log


Revision 910252 - (show annotations) (download)
Sun Dec 13 22:37:28 2015 UTC (4 years, 3 months ago) by pterjan
File size: 1656 byte(s)
Fix gem_install macro
1 # The RubyGems root folder.
2 %gem_dir %{_datadir}/gems
3 %gem_archdir %{_libdir}/gems
4
5 # Common gem locations and files.
6 %gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}
7 %gem_extdir_mri %{gem_archdir}/ruby/%{gem_name}-%{version}
8 %gem_libdir %{gem_instdir}/lib
9 %gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem
10 %gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec
11 %gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}
12
13 %gem_name %{?oname}%{!?oname:%(echo %{name}|cut -d\- -f2-)}
14
15 %gem_setup \
16 %setup -q \
17 tar xmf data.tar.gz \
18 if [ ! -f %{gem_name}.gemspec ]; then \
19 %{_bindir}/gem specification -l --ruby %{SOURCE0} > %{gem_name}.gemspec \
20 fi \
21 sed -i -e 's/`git ls-files`/`find -type f`/' \\\
22 -e 's/`git ls-files -- \\\(.*\\\)`/`find \\\1 -type f`/' \\\
23 -e 's/`git ls-files \\\(.*\\\)`/`find \\\1 -type f`/' \\\
24 -e 's/ s.version = .*/ s.version = "%{version}"/' \\\
25 %{gem_name}.gemspec
26
27 %gem_build \
28 if [ ! -f %{gem_name}.gemspec ]; then \
29 %{_bindir}/gem specification -l --ruby %{SOURCE0} > %{gem_name}.gemspec \
30 fi \
31 %{_bindir}/gem build %{gem_name}.gemspec
32
33 %gem_install(d) \
34 %{_bindir}/gem install %{gem_name}-%{version}.gem --local \\\
35 --env-shebang --rdoc --ri --force --ignore-dependencies \\\
36 --install-dir %{buildroot}%{gem_dir} \\\
37 --bindir %{buildroot}%{_bindir} \
38 %{-d: \
39 mkdir -p %{buildroot}%{ruby_vendorarchdir} \
40 mv -f %{buildroot}%{gem_extdir_mri}/*.h %{buildroot}%{ruby_vendorarchdir} \
41 } \
42 rm -fr %{buildroot}%{gem_dir}/{cache,extensions,gems/%{gem_name}-%{version}/ext,gems/%{gem_name}-%{version}/%{gem_name}.gemspec} \
43 rm -f %{buildroot}%{gem_extdir_mri}/{gem_make.out,mkmf.log}
44

  ViewVC Help
Powered by ViewVC 1.1.26