summaryrefslogtreecommitdiffstats
path: root/rubygem-rdiscount.spec
diff options
context:
space:
mode:
Diffstat (limited to 'rubygem-rdiscount.spec')
-rw-r--r--rubygem-rdiscount.spec50
1 files changed, 40 insertions, 10 deletions
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 <ktdreyer@ktdreyer.com> - 1.3.1.1-1
+- Downgrade to version 1.3.1.1
+- RHEL 6 compatibility
+
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.3.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild