[packages/ruby-treetop] Rel 5

arekm arekm at pld-linux.org
Sat Mar 21 01:39:39 CET 2026


commit 664305f962a57df11b417cd16c1ac9159e908785
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sat Mar 21 01:39:27 2026 +0100

    Rel 5

 ruby-treetop-shebang.patch |  9 +++++++
 ruby-treetop.spec          | 58 +++++++++++++++++++++++-----------------------
 2 files changed, 38 insertions(+), 29 deletions(-)
---
diff --git a/ruby-treetop.spec b/ruby-treetop.spec
index 6517005..3392ebd 100644
--- a/ruby-treetop.spec
+++ b/ruby-treetop.spec
@@ -1,85 +1,80 @@
 %define pkgname treetop
-Summary:	A packrat parser implementation for Ruby
+Summary:	A Ruby-based text analysis and parsing tool
 Name:		ruby-%{pkgname}
 Version:	1.4.15
-Release:	4
+Release:	5
 License:	MIT
 Group:		Development/Languages
 Source0:	http://rubygems.org/downloads/%{pkgname}-%{version}.gem
 # Source0-md5:	87f30c0684d7760dce9feac8ff8bd869
-URL:		http://treetop.rubyforge.org
+Patch0:		ruby-treetop-shebang.patch
+URL:		http://treetop.rubyforge.org/
 BuildRequires:	rpm-rubyprov
 BuildRequires:	rpmbuild(macros) >= 1.665
-Requires:	ruby-polyglot
+BuildRequires:	ruby-devel
+Requires:	ruby-polyglot >= 0.3.1
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-Treetop is a Ruby-based DSL for text parsing and interpretation. It
-facilitates an extension of the object-oriented paradigm called
-syntax-oriented programming. There's a readme that will get you going
-and some examples.
+Treetop is a Ruby-based text analysis and parsing tool.
 
 %package rdoc
-Summary:	HTML documentation for %{pkgname}
-Summary(pl.UTF-8):	Dokumentacja w formacie HTML dla %{pkgname}
+Summary:	HTML documentation for %{name}
+Summary(pl.UTF-8):	Dokumentacja w formacie HTML dla %{name}
 Group:		Documentation
-Requires:	ruby >= 1:1.8.7-4
+Requires:	%{name} = %{version}-%{release}
 
 %description rdoc
-HTML documentation for %{pkgname}.
+HTML documentation for %{name}.
 
 %description rdoc -l pl.UTF-8
-Dokumentacja w formacie HTML dla %{pkgname}.
+Dokumentacja w formacie HTML dla %{name}.
 
 %package ri
-Summary:	ri documentation for %{pkgname}
-Summary(pl.UTF-8):	Dokumentacja w formacie ri dla %{pkgname}
+Summary:	ri documentation for %{name}
+Summary(pl.UTF-8):	Dokumentacja w formacie ri dla %{name}
 Group:		Documentation
-Requires:	ruby
+Requires:	%{name} = %{version}-%{release}
 
 %description ri
-ri documentation for %{pkgname}.
+ri documentation for %{name}.
 
 %description ri -l pl.UTF-8
-Dokumentacji w formacie ri dla %{pkgname}.
+Dokumentacji w formacie ri dla %{name}.
 
 %prep
 %setup -q -n %{pkgname}-%{version}
-cp %{_datadir}/setup.rb .
+%patch -P0 -p1
 
 %build
-# write .gemspec
 %__gem_helper spec
 
-rdoc --op rdoc lib
 rdoc --ri --op ri lib
-rm -r ri/{IntervalSkipList,String}
+rdoc --op rdoc lib
 rm ri/created.rid
 rm ri/cache.ri
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir},%{_bindir},%{_examplesdir}/%{name}-%{version},%{ruby_ridir},%{ruby_rdocdir}}
+install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir},%{ruby_ridir},%{ruby_rdocdir},%{_bindir}}
 
 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
-cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
 cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
-
 cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir}
 cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version}
-cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+install -p bin/* $RPM_BUILD_ROOT%{_bindir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc README.md doc/*
+%doc README.md LICENSE
 %attr(755,root,root) %{_bindir}/tt
-%{ruby_vendorlibdir}/treetop*
+%{ruby_vendorlibdir}/treetop.rb
+%{ruby_vendorlibdir}/treetop
 %{ruby_specdir}/%{pkgname}-%{version}.gemspec
-%{_examplesdir}/%{name}-%{version}
 
 %files rdoc
 %defattr(644,root,root,755)
@@ -87,4 +82,9 @@ rm -rf $RPM_BUILD_ROOT
 
 %files ri
 %defattr(644,root,root,755)
+%{ruby_ridir}/IntervalSkipList
+%{ruby_ridir}/Object
+%{ruby_ridir}/String
 %{ruby_ridir}/Treetop
+%{ruby_ridir}/Trusted
+%{ruby_ridir}/lib
diff --git a/ruby-treetop-shebang.patch b/ruby-treetop-shebang.patch
new file mode 100644
index 0000000..6b6c555
--- /dev/null
+++ b/ruby-treetop-shebang.patch
@@ -0,0 +1,9 @@
+diff -uNr treetop-1.4.15.orig/bin/tt treetop-1.4.15/bin/tt
+--- treetop-1.4.15.orig/bin/tt	2026-03-21 00:53:04.863383972 +0100
++++ treetop-1.4.15/bin/tt	2026-03-21 00:53:04.880146247 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env ruby
++#!/usr/bin/ruby
+ require 'optparse'
+ require 'rubygems'
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ruby-treetop.git/commitdiff/664305f962a57df11b417cd16c1ac9159e908785



More information about the pld-cvs-commit mailing list