[packages/ruby-rdiscount] install to vendor dir; noarch doc packages; cleanups
glen
glen at pld-linux.org
Sat Oct 17 10:28:01 CEST 2015
commit 2f38e19b56734c1579c8bcfb6a308c7ae1244893
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sat Oct 17 01:13:46 2015 +0300
install to vendor dir; noarch doc packages; cleanups
ruby-rdiscount.spec | 39 ++++++++++++++++++++-------------------
1 file changed, 20 insertions(+), 19 deletions(-)
---
diff --git a/ruby-rdiscount.spec b/ruby-rdiscount.spec
index 42f1fb9..19e7970 100644
--- a/ruby-rdiscount.spec
+++ b/ruby-rdiscount.spec
@@ -7,10 +7,9 @@
Summary: Discount Markdown Processor for Ruby
Name: ruby-rdiscount
Version: 1.2.7
-Release: 0.1
+Release: 1
License: BSD-style
-#Source0: http://rubyforge.org/frs/download.php/18699/%{pkgname}-%{version}.tgz
-Source0: http://github.com/rtomayko/rdiscount/tarball/v1.2.7/%{name}-%{version}.tar.gz
+Source0: http://github.com/rtomayko/rdiscount/tarball/v%{version}/%{name}-%{version}.tar.gz
# Source0-md5: 85edbb9768bfa7e36455dbf8749dccae
Patch0: %{name}-ruby1.9.patch
Group: Development/Languages
@@ -20,7 +19,6 @@ BuildRequires: ruby >= 1:1.9
BuildRequires: ruby-devel
BuildRequires: ruby-modules
BuildRequires: setup.rb
-%{?ruby_mod_ver_requires_eq}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -31,7 +29,7 @@ Summary: Markdown processor
Group: Applications/Publishing
Requires: %{name} = %{version}-%{release}
-%description -nrdiscount
+%description -n rdiscount
Markdown processor.
%package rdoc
@@ -39,6 +37,9 @@ Summary: HTML documentation for %{pkgname}
Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{pkgname}
Group: Documentation
Requires: ruby >= 1:1.8.7-4
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
%description rdoc
HTML documentation for %{pkgname}.
@@ -51,6 +52,9 @@ Summary: ri documentation for %{pkgname}
Summary(pl.UTF-8): Dokumentacja w formacie ri dla %{pkgname}
Group: Documentation
Requires: ruby
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
%description ri
ri documentation for %{pkgname}.
@@ -61,33 +65,30 @@ Dokumentacji w formacie ri dla %{pkgname}.
%prep
%setup -q -c
mv rtomayko-rdiscount-*/* .
-rm -rf rtomayko-rdiscount-*
-
%patch0 -p1
%build
-
cp %{_datadir}/setup.rb .
-ruby setup.rb config \
- --rbdir=%{ruby_rubylibdir} \
- --sodir=%{ruby_archdir}
+%{__ruby} setup.rb config \
+ --rbdir=%{ruby_vendorlibdir} \
+ --sodir=%{ruby_vendorarchdir}
-ruby setup.rb setup
+%{__ruby} setup.rb setup
rdoc --ri --op ri lib
rdoc --op rdoc lib
+rm -r ri/Object
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}}
-
-#cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir}
+install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_ridir},%{ruby_rdocdir}}
cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir}
cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version}
-ruby setup.rb install \
+%{__ruby} setup.rb install \
--prefix=$RPM_BUILD_ROOT
%clean
@@ -96,9 +97,9 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc COPYING README.markdown
-%{ruby_rubylibdir}/%{pkgname}.rb
-%{ruby_rubylibdir}/markdown.rb
-%attr(755,root,root) %{ruby_archdir}/%{pkgname}.so
+%{ruby_vendorlibdir}/markdown.rb
+%{ruby_vendorlibdir}/rdiscount.rb
+%attr(755,root,root) %{ruby_vendorarchdir}/rdiscount.so
%files -n rdiscount
%defattr(644,root,root,755)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ruby-rdiscount.git/commitdiff/2f38e19b56734c1579c8bcfb6a308c7ae1244893
More information about the pld-cvs-commit
mailing list