70 lines
1.9 KiB
RPMSpec
70 lines
1.9 KiB
RPMSpec
|
|
%global gem_name wikicloth
|
||
|
|
Name: rubygem-%{gem_name}
|
||
|
|
Version: 0.8.0
|
||
|
|
Release: 1
|
||
|
|
Summary: Mediawiki parser
|
||
|
|
License: MIT
|
||
|
|
URL: https://github.com/nricciar/wikicloth
|
||
|
|
Source0: https://rubygems.org/gems/wikicloth-%{version}.gem
|
||
|
|
Patch0: rubygem-wikicloth-0.8.0-minitest.patch
|
||
|
|
Requires: ruby(release) ruby(rubygems) rubygem(builder) rubygem(expression_parser)
|
||
|
|
BuildRequires: ruby(release) rubygems-devel rubygem(activesupport) rubygem(builder)
|
||
|
|
BuildRequires: rubygem(expression_parser)
|
||
|
|
BuildArch: noarch
|
||
|
|
Provides: rubygem(%{gem_name}) = %{version}
|
||
|
|
%description
|
||
|
|
An implementation of the mediawiki markup in Ruby.
|
||
|
|
|
||
|
|
%package doc
|
||
|
|
Summary: Documentation for %{name}
|
||
|
|
Requires: %{name} = %{version}-%{release}
|
||
|
|
BuildArch: noarch
|
||
|
|
%description doc
|
||
|
|
Documentation for %{name}
|
||
|
|
|
||
|
|
%prep
|
||
|
|
gem unpack %{SOURCE0}
|
||
|
|
%setup -q -D -T -n %{gem_name}-%{version}
|
||
|
|
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
||
|
|
%patch0 -p1
|
||
|
|
for f in .gitignore .travis.yml Gemfile Rakefile run_tests.rb tasks/wikicloth_tasks.rake; do
|
||
|
|
rm $f
|
||
|
|
sed -i "s|\"$f\".freeze,||g" %{gem_name}.gemspec
|
||
|
|
done
|
||
|
|
|
||
|
|
%build
|
||
|
|
gem build %{gem_name}.gemspec
|
||
|
|
%gem_install
|
||
|
|
rm .%{gem_instdir}/%{gem_name}.gemspec
|
||
|
|
|
||
|
|
%install
|
||
|
|
mkdir -p %{buildroot}%{gem_dir}
|
||
|
|
cp -pa .%{gem_dir}/* \
|
||
|
|
%{buildroot}%{gem_dir}/
|
||
|
|
|
||
|
|
%check
|
||
|
|
pushd .%{gem_instdir}
|
||
|
|
ruby -Ilib test/*_test.rb
|
||
|
|
popd
|
||
|
|
|
||
|
|
%files
|
||
|
|
%dir %{gem_instdir}
|
||
|
|
%doc %{gem_instdir}/README
|
||
|
|
%doc %{gem_instdir}/README.textile
|
||
|
|
%doc %{gem_instdir}/MIT-LICENSE
|
||
|
|
%{gem_libdir}
|
||
|
|
%exclude %{gem_cache}
|
||
|
|
%{gem_spec}
|
||
|
|
%{gem_instdir}/init.rb
|
||
|
|
%{gem_instdir}/lang
|
||
|
|
|
||
|
|
%files doc
|
||
|
|
%doc %{gem_docdir}
|
||
|
|
%exclude %{gem_instdir}/test
|
||
|
|
%{gem_instdir}/examples
|
||
|
|
%{gem_instdir}/sample_documents
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Sat Aug 8 2020 yanan li <liyanan032@huawei.com> - 0.8.0-1
|
||
|
|
- Package init
|