[packages/ruby-ronn] package noarch and to vendor dir; cleanups

glen glen at pld-linux.org
Fri Oct 16 23:28:13 CEST 2015


commit c29623b215a94192551073c3ca0df1375be16b2f
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat Oct 17 00:27:55 2015 +0300

    package noarch and to vendor dir; cleanups

 ruby-ronn.spec | 69 +++++++++++++++++++---------------------------------------
 1 file changed, 22 insertions(+), 47 deletions(-)
---
diff --git a/ruby-ronn.spec b/ruby-ronn.spec
index e660299..78a9a6e 100644
--- a/ruby-ronn.spec
+++ b/ruby-ronn.spec
@@ -1,32 +1,19 @@
-%bcond_with	gitmaster	# build latest git version, build with n5 builder flag
-
-%if %{with gitmaster}
-%define dl_ver	master
-%else
-%define dl_ver	%{version}
-%endif
-
 %define pkgname ronn
-
-%define		rel	0.1
-
 Summary:	Markdown to man and HTML translator
 Name:		ruby-ronn
 Version:	0.7.3
-Release:	%{?with_gitmaster:master.}%{rel}
+Release:	1
 License:	MIT
-Source0:	http://github.com/rtomayko/ronn/tarball/%{dl_ver}/%{name}-%{dl_ver}.tar.gz
+Source0:	http://github.com/rtomayko/ronn/tarball/%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	6fce1de64c54b014b88270567c29b5ce
 Group:		Development/Languages
-URL:		http://github.com/rtomayko/ronn
-BuildRequires:	rpmbuild(macros) >= 1.484
-BuildRequires:	ruby >= 1:1.8.6
-BuildRequires:	ruby-modules
-BuildRequires:	setup.rb
+URL:		https://github.com/rtomayko/ronn
+BuildRequires:	rpm-rubyprov
+BuildRequires:	rpmbuild(macros) >= 1.665
 Requires:	ruby-hpricot
 Requires:	ruby-mustache
 Requires:	ruby-rdiscount
-%{?ruby_mod_ver_requires_eq}
+BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -71,56 +58,44 @@ ri documentation for %{pkgname}.
 Dokumentacji w formacie ri dla %{pkgname}.
 
 %prep
-%setup -q -c
+%setup -qc
 mv rtomayko-ronn-*/* .
-rm -rf rtomayko-ronn-*
-
-%build
-
-cp %{_datadir}/setup.rb .
 
-ruby setup.rb config \
-	--rbdir=%{ruby_rubylibdir} \
-	--sodir=%{ruby_archdir}
-
-ruby setup.rb setup
+%{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
 
+%build
 rdoc --ri --op ri lib
 rdoc --op rdoc lib
+rm -r ri/lib/ronn/template
 rm ri/created.rid
+rm ri/cache.ri
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{ruby_rubylibdir},%{ruby_ridir},%{ruby_rdocdir}}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man{1,7},%{ruby_vendorlibdir},%{ruby_ridir},%{ruby_rdocdir}}
+
+cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
+cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
+cp -p man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
+cp -p man/*.7 $RPM_BUILD_ROOT%{_mandir}/man7
 
 cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir}
 cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version}
 
-ruby setup.rb install \
-	--prefix=$RPM_BUILD_ROOT
-
-install -d $RPM_BUILD_ROOT%{_mandir}/man{1,7}
-mv $RPM_BUILD_ROOT%{_mandir}/{,man1/}%{pkgname}.1
-mv $RPM_BUILD_ROOT%{_mandir}/{,man7/}%{pkgname}-format.7
-
-# Remove HTML and source markdown files
-rm $RPM_BUILD_ROOT%{_mandir}/*.*.*
-rm $RPM_BUILD_ROOT%{_mandir}/index*
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
 %doc CHANGES README.md
-%{ruby_rubylibdir}/%{pkgname}.rb
-%{ruby_rubylibdir}/%{pkgname}
+%{ruby_vendorlibdir}/ronn.rb
+%{ruby_vendorlibdir}/ronn
 
 %files -n ronn
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/%{pkgname}
-%{_mandir}/man1/%{pkgname}.1*
-%{_mandir}/man7/%{pkgname}-format.7*
+%attr(755,root,root) %{_bindir}/ronn
+%{_mandir}/man1/ronn.1*
+%{_mandir}/man7/ronn-format.7*
 
 %files rdoc
 %defattr(644,root,root,755)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ruby-ronn.git/commitdiff/c29623b215a94192551073c3ca0df1375be16b2f



More information about the pld-cvs-commit mailing list