# 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.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) = %{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} Group: Documentation BuildArch: noarch Requires: %{name} = %{version}-%{release} %description Description: Discount is an implementation of John Gruber's Markdown markup language in C. It implements all of the language described in the markdown syntax document and passes the Markdown 1.0 test suite. #-- %description doc This package contains Rakefile, test directory and documentation for %{name}. %prep %setup -q -c -T %build mkdir -p .%{gem_dir} export CONFIGURE_ARGS="--with-cflags='%{optflags}'" gem install -V --local --install-dir $(pwd)/%{gem_dir} \ --force --rdoc %{SOURCE0} %install rm -rf %{buildroot} mkdir -p %{buildroot}%{gem_dir} mkdir -p %{buildroot}%{_mandir}/man1 mkdir -p %{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} rmdir %{buildroot}%{gem_dir}/bin find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x %clean rm -rf %{buildroot} %check pushd .%{gem_instdir} testrb test/*_test.rb popd %files %defattr(-, root, root, -) %{_bindir}/rdiscount %dir %{gem_instdir} %{gem_instdir}/bin/ %{gem_libdir}/ %doc %{gem_instdir}/COPYING %doc %{gem_instdir}/README.markdown %{gem_cache} %{gem_spec} %if 0%{?el6} %{ruby_sitearch}/rdiscount.so %else %{gem_extdir}/ %endif #-- %files doc %defattr(-, root, root, -) %doc %{gem_instdir}/Rakefile %{gem_docdir} %{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 * Fri Feb 03 2012 Vít Ondruch - 1.6.3.2-7 - Rebuilt for Ruby 1.9.3. * Sat Jan 14 2012 Fedora Release Engineering - 1.6.3.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Wed Feb 09 2011 Fedora Release Engineering - 1.6.3.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Sat Jun 12 2010 Gerd Pokorra - 1.6.3.2-4 - removed the unused macro "ruby_sitelib" - put the file rdiscount.gemspec to the doc-subpackage - add dependency to the main package for the doc-subpackage * Thu Jun 10 2010 Gerd Pokorra - 1.6.3.2-3 - changed ruby(abi) dependency to be strict - changed rubygem module related dependency style - only arch-dependent files are in "ruby_sitearch" - tests are now successful; "rake test:unit" is used - "geminstdir" macro is used when possible - "geminstdir" is owned by package - ext/ subdirectory is removed form "buildroot" during install; no exclude * Tue Jun 08 2010 Gerd Pokorra - 1.6.3.2-2 - files under ext/ subdirectory excluded - remove BuildRoot tag - add "Requires: ruby(abi) >= 1.8" - use global macro instead of define macro - changed license tag * Sun Jun 06 2010 Gerd Pokorra - 1.6.3.2-1 - add "BuildRequires: ruby-devel" - Initial package