[packages/ruby-maruku] Up to 0.7.3
arekm
arekm at pld-linux.org
Fri Mar 20 14:56:16 CET 2026
commit 388d4f9e91cf6cca2553e2b094e90dbc1d3d8413
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Fri Mar 20 14:56:06 2026 +0100
Up to 0.7.3
maruku-entities-path.patch | 11 ++++++++++
ruby-maruku.spec | 54 +++++++++++++++++++++++++++-------------------
2 files changed, 43 insertions(+), 22 deletions(-)
---
diff --git a/ruby-maruku.spec b/ruby-maruku.spec
index ea01982..b3ff14d 100644
--- a/ruby-maruku.spec
+++ b/ruby-maruku.spec
@@ -1,43 +1,53 @@
-%define pkgname maruku
-Summary: Maruku is a Markdown-superset interpreter written in Ruby
+%define pkgname maruku
+Summary: Markdown-superset interpreter written in Ruby
+Summary(pl.UTF-8): Interpreter nadzbioru Markdown napisany w Rubym
Name: ruby-%{pkgname}
-Version: 0.7.3
-Release: 1
-License: MIT
-Group: Development/Languages
-Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem
-# Source0-md5: 78f0ba4703550eb311f544ebf91be6b0
-URL: http://github.com/bhollis/maruku
-BuildRequires: rpm-rubyprov
-BuildRequires: rpmbuild(macros) >= 1.656
-BuildRequires: sed >= 4.0
-BuildArch: noarch
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+Version: 0.7.3
+Release: 1
+License: MIT
+Group: Development/Languages
+Source0: https://rubygems.org/downloads/%{pkgname}-%{version}.gem
+# Source0-md5: 78f0ba4703550eb311f544ebf91be6b0
+Patch0: maruku-entities-path.patch
+URL: http://maruku.rubyforge.org/
+BuildRequires: rpm-rubyprov
+BuildRequires: rpmbuild(macros) >= 1.665
+BuildRequires: sed >= 4.0
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-Maruku is a Markdown interpreter in Ruby. It features native export to
-HTML and PDF (via Latex). The output is really beautiful!
+Maruku is a Markdown-superset interpreter written in Ruby.
+
+%description -l pl.UTF-8
+Maruku to napisany w Rubym interpreter nadzbioru Markdown.
%prep
%setup -q -n %{pkgname}-%{version}
+%patch -P 0 -p1
%{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
-%{__sed} -i -e "s|File.join(File.dirname(__FILE__), '..', '..', '..', 'data', 'entities.xml')|'%{ruby_vendorlibdir}/maruku/data/entities.xml'|" lib/maruku/output/entity_table.rb
+%build
+%__gem_helper spec
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir}/%{pkgname}/data,%{_bindir}}
-cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
-cp -p data/entities.xml $RPM_BUILD_ROOT%{ruby_vendorlibdir}/%{pkgname}/data
+install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir},%{_bindir}}
+cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
+# data directory is required by the patched code
+cp -a data $RPM_BUILD_ROOT%{ruby_vendorlibdir}/maruku/
+cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
+%doc MIT-LICENSE.txt docs
%attr(755,root,root) %{_bindir}/maruku
%attr(755,root,root) %{_bindir}/marutex
-%{ruby_vendorlibdir}/%{pkgname}.rb
-%{ruby_vendorlibdir}/%{pkgname}
+%{ruby_vendorlibdir}/maruku.rb
+%{ruby_vendorlibdir}/maruku
+%{ruby_specdir}/%{pkgname}-%{version}.gemspec
diff --git a/maruku-entities-path.patch b/maruku-entities-path.patch
new file mode 100644
index 0000000..5f496b9
--- /dev/null
+++ b/maruku-entities-path.patch
@@ -0,0 +1,11 @@
+--- a/lib/maruku/output/entity_table.rb 2026-03-18 20:00:00.000000000 +0000
++++ b/lib/maruku/output/entity_table.rb 2026-03-18 20:00:00.000000000 +0000
+@@ -9,7 +9,7 @@
+ def initialize
+ @entity_table = {}
+
+- xml = File.new(File.join(File.dirname(__FILE__), '..', '..', '..', 'data', 'entities.xml'))
++ xml = File.new('/usr/share/ruby/vendor_ruby/maruku/data/entities.xml')
+ doc = REXML::Document.new(xml)
+ doc.elements.each("//char") do |c|
+ num = c.attributes['num'].to_i
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ruby-maruku.git/commitdiff/388d4f9e91cf6cca2553e2b094e90dbc1d3d8413
More information about the pld-cvs-commit
mailing list