From b4520be62df745cfcc5a3708930d67d42dcbfab2 Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Wed, 6 Feb 2013 19:12:11 -0700 Subject: Downgrade to version 1.3.1.1 and add RHEL 6 compatibility - Downgrade to version 1.3.1.1 - RHEL 6 compatibility --- .gitignore | 2 +- rubygem-rdiscount.spec | 50 ++++++++++++++++++++++++++++++++++++++++---------- sources | 2 +- 3 files changed, 42 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index c1ca11c..983030b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -rdiscount-1.6.3.2.gem +/rdiscount-1.3.1.1.gem diff --git a/rubygem-rdiscount.spec b/rubygem-rdiscount.spec index 2ea4dd0..4bd6d66 100644 --- a/rubygem-rdiscount.spec +++ b/rubygem-rdiscount.spec @@ -1,23 +1,41 @@ # Generated from rdiscount-1.6.3.2.gem by gem2rpm -*- rpm-spec -*- - +%if 0%{?el6} +%global rubyabi 1.8 +%else +%global rubyabi 1.9.1 +%endif %global gem_name rdiscount Summary: Fast Implementation of Gruber's Markdown in C Name: rubygem-%{gem_name} -Version: 1.6.3.2 -Release: 8%{?dist} +Version: 1.3.1.1 +Release: 1%{?dist} Group: Development/Languages License: ASL 1.1 URL: http://github.com/rtomayko/rdiscount Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem -Requires: ruby(abi) = 1.9.1 +Requires: ruby(abi) = %{rubyabi} Requires: ruby(rubygems) +%if 0%{?fedora} BuildRequires: rubygems-devel +%else +BuildRequires: ruby(rubygems) +%endif BuildRequires: ruby-devel BuildRequires: rubygem(minitest) Provides: rubygem(%{gem_name}) = %{version} +# macros for RHEL6 compatibility: +%{!?gem_dir: %global gem_dir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)} +%{!?gem_instdir: %global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}} +%{!?gem_libdir: %global gem_libdir %{gem_instdir}/lib} +%{!?gem_cache: %global gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem} +%{!?gem_spec: %global gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec} +%{!?gem_docdir: %global gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}} +%{!?gem_extdir: %global gem_extdir %{_libdir}/gems/exts/%{gem_name}-%{version}} +%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]')} + %package doc Summary: Documentation for %{name} @@ -52,12 +70,19 @@ rm -rf %{buildroot} mkdir -p %{buildroot}%{gem_dir} mkdir -p %{buildroot}%{_mandir}/man1 mkdir -p %{buildroot}%{_mandir}/man7 -mkdir -p %{buildroot}%{gem_extdir}/lib/ -mv .%{gem_instdir}/man/rdiscount.1 %{buildroot}%{_mandir}/man1 -mv .%{gem_instdir}/man/markdown.7 %{buildroot}%{_mandir}/man7 cp -a .%{gem_dir}/* %{buildroot}%{gem_dir} rm -rf %{buildroot}%{gem_instdir}/ext + +%if 0%{?el6} +# gem_extdir doesn't really work on EL 6 +mkdir -p %{buildroot}%{ruby_sitearch} +# move the extension to ruby_sitearch +mv %{buildroot}%{gem_libdir}/rdiscount.so %{buildroot}%{ruby_sitearch} +%else +mkdir -p %{buildroot}%{gem_extdir}/lib/ +# move the extension to gem_extdir mv %{buildroot}%{gem_libdir}/rdiscount.so %{buildroot}%{gem_extdir}/lib/ +%endif mkdir -p %{buildroot}/%{_bindir} mv %{buildroot}%{gem_dir}/bin/* %{buildroot}/%{_bindir} @@ -82,9 +107,11 @@ popd %doc %{gem_instdir}/README.markdown %{gem_cache} %{gem_spec} +%if 0%{?el6} +%{ruby_sitearch}/rdiscount.so +%else %{gem_extdir}/ -%{_mandir}/man1/rdiscount.1.gz -%{_mandir}/man7/markdown.7.gz +%endif #-- @@ -92,12 +119,15 @@ popd %defattr(-, root, root, -) %doc %{gem_instdir}/Rakefile %{gem_docdir} -%{gem_instdir}/man %{gem_instdir}/test %{gem_instdir}/rdiscount.gemspec %changelog +* Wed Feb 06 2013 Ken Dreyer - 1.3.1.1-1 +- Downgrade to version 1.3.1.1 +- RHEL 6 compatibility + * Sat Jul 21 2012 Fedora Release Engineering - 1.6.3.2-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild diff --git a/sources b/sources index e85abdb..9564bc1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4dd15db2e2a3def6ed41d13f7063f925 rdiscount-1.6.3.2.gem +52a697f009e7a3985513f8bed5f0ee31 rdiscount-1.3.1.1.gem -- cgit