#1 update to 1.1.2
Merged 5 years ago by hpejakle. Opened 5 years ago by jaruga.
rpms/ jaruga/rubygem-coderay feature/update-to-1.1.2  into  master

file modified
+40 -23
@@ -2,18 +2,18 @@ 

  

  Summary: Fast syntax highlighter engine for many programming languages

  Name: rubygem-%{gem_name}

- Version: 1.1.0

- Release: 10%{?dist}

- Group: Development/Languages

"Group" is not recommended on the RPM spec file specification.

+ Version: 1.1.2

+ Release: 1%{?dist}

  License: LGPLv2+

  URL: http://coderay.rubychan.de

- Source0: http://gems.rubyforge.org/gems/%{gem_name}-%{version}.gem

- Requires: ruby(release)

- Requires: ruby(rubygems)

- #BuildRequires: rubygem(term-ansicolor)

+ Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem

+ # git clone https://github.com/rubychan/coderay.git && cd coderay

+ # git checkout v1.1.2 && tar czvf coderay-1.1.2-tests.tgz test/

+ Source1: %{gem_name}-%{version}-tests.tgz

We need to prepare test files as coderay-*.gem file does not include test files any more.
You can see this way for example here.
https://src.fedoraproject.org/rpms/rubygem-activerecord/blob/master/f/rubygem-activerecord.spec#_12-15

+ BuildRequires: ruby(release)

  BuildRequires: rubygems-devel

+ BuildRequires: rubygem(test-unit)

  BuildArch: noarch

- Provides: rubygem(%{gem_name}) = %{version}

"Provides" is not needed on the latest specification.

  

  %description

  Coderay is a Ruby library for syntax highlighting. CodeRay is build to be easy
@@ -21,43 +21,60 @@ 

  efficient. 

  

  

+ %package doc

+ Summary: Documentation for %{name}

+ Requires: %{name} = %{version}-%{release}

+ BuildArch: noarch

+ 

+ %description doc

+ Documentation for %{name}.

+ 

  %prep

- %setup -q -c -T

- %gem_install -n %{SOURCE0}

+ %setup -q -n %{gem_name}-%{version}

  

  %build

+ gem build ../%{gem_name}-%{version}.gemspec

+ 

+ %gem_install

  

  %install

  mkdir -p %{buildroot}%{gem_dir}

- cp -pa .%{gem_dir}/* \

+ cp -a .%{gem_dir}/* \

          %{buildroot}%{gem_dir}/

  

  

  mkdir -p %{buildroot}%{_bindir}

- cp -pa .%{_bindir}/* \

+ cp -a .%{_bindir}/* \

          %{buildroot}%{_bindir}/

  

- rm -rf %{buildroot}/%{gem_libdir}/term

"%{buildroot}/%{gem_libdir}/term" directory or file does not exist.

  

  find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x

- find %{buildroot}/%{gem_instdir}/bin -type f | xargs sed -i 's/\r//' $FILES

There is a file bin/coderay under the bin directory.
But this sed command changes nothing now.

  

- %files 

+ %check

+ pushd .%{gem_instdir}

+ tar xzvf %{SOURCE1}

+ LANG=en_US.UTF-8

+ ruby ./test/functional/suite.rb

+ ruby ./test/functional/for_redcloth.rb

+ popd

+ 

+ %files

+ %dir %{gem_instdir}

  %{_bindir}/coderay

- %dir %{gem_instdir}/

- %dir %{gem_libdir}

- %dir %{gem_instdir}/test

- %{gem_instdir}/test/*

+ %license %{gem_instdir}/MIT-LICENSE

  %{gem_instdir}/bin

- %{gem_libdir}/[cC]*

- %doc %{gem_docdir}

- %doc %{gem_instdir}/Rakefile

- %doc %{gem_instdir}/README_INDEX.rdoc

+ %{gem_libdir}

  %exclude %{gem_cache}

  %{gem_spec}

  

+ %files doc

+ %doc %{gem_docdir}

+ %doc %{gem_instdir}/README_INDEX.rdoc

  

  %changelog

+ * Wed Jul 25 2018 Jun Aruga <jaruga@redhat.com> - 1.1.2-1

+ - update to new version

+ 

  * Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-10

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

  

I updated coderay to the latest version 1.1.2.

Detail

I aligned some parts with the output of Ruby SIG's tool latest version gem2rpm: gem2rpm coderay-1.1.2.gem. [1]

Because of that, there are some changes.

  • I added rubygem-coderay-doc sub package.
  • I added check section to run unit tests. Now the unit tests are run when building.
  • %files section: As the upstream coderay project changed the file structure in coderay-*.gem, I aligend with the output of gem2rpm.

  • I checked the packages that requires rubygem-coderay as build or runtime depenency. While updating the coderay to latest version, there is no bad affection for the packages.

  • i checked by rpmlint command.
  • I checked the built coderay binary RPM installation.
  • Scratch build was success.
    https://koji.fedoraproject.org/koji/taskinfo?taskID=28599254

I also commented some things for each code line.

If you are okay, I would update sources and .gitignore by fedpkg import *.src.rpm later in this pull-request.

[1] https://gist.github.com/junaruga/075d15b4233fc6a615e1bb7cb5620532

We need to prepare test files as coderay-*.gem file does not include test files any more.
You can see this way for example here.
https://src.fedoraproject.org/rpms/rubygem-activerecord/blob/master/f/rubygem-activerecord.spec#_12-15

"Provides" is not needed on the latest specification.

"Group" is not recommended on the RPM spec file specification.

"%{buildroot}/%{gem_libdir}/term" directory or file does not exist.

There is a file bin/coderay under the bin directory.
But this sed command changes nothing now.

Pull-Request has been merged by hpejakle

5 years ago
Metadata