[packages/ruby-mustache] install to vendor dir; noarch; cleanups
glen
glen at pld-linux.org
Sat Oct 17 00:10:17 CEST 2015
commit 5e9f997bdc960b8f02e46201869fe51a1964096d
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sat Oct 17 01:09:59 2015 +0300
install to vendor dir; noarch; cleanups
ruby-mustache.spec | 63 ++++++++++++++++++++++--------------------------------
1 file changed, 26 insertions(+), 37 deletions(-)
---
diff --git a/ruby-mustache.spec b/ruby-mustache.spec
index 97cf930..2abc2fa 100644
--- a/ruby-mustache.spec
+++ b/ruby-mustache.spec
@@ -3,28 +3,22 @@
# /usr/lib/ruby/1.9/rack/bug/panels/mustache_panel.rb
# /usr/lib/ruby/1.9/rack/bug/panels/mustache_panel/mustache_extension.rb
# /usr/lib/ruby/1.9/rack/bug/panels/mustache_panel/view.mustache
-# - rm -r ri/Rack? (see XXX below)
%define pkgname mustache
Summary: Logic-less templates
Name: ruby-mustache
Version: 0.11.2
-Release: 0.1
+Release: 1
License: MIT
-Source0: http://github.com/defunkt/mustache/tarball/v0.11.2/%{name}-%{version}.tar.gz
+Source0: http://github.com/defunkt/mustache/tarball/v%{version}/%{name}-%{version}.tar.gz
# Source0-md5: fc6e868cf09d40eaf36ffabaf1f412c4
-Group: Libraries
+Group: Development/Languages
URL: http://mustache.github.com/
-BuildRequires: rpmbuild(macros) >= 1.484
-BuildRequires: ruby >= 1:1.8.6
-BuildRequires: ruby-modules
-BuildRequires: setup.rb
-%{?ruby_mod_ver_requires_eq}
+BuildRequires: rpm-rubyprov
+BuildRequires: rpmbuild(macros) >= 1.665
+BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-# nothing to be placed there. we're not noarch only because of ruby packaging
-%define _enable_debug_packages 0
-
%description
Inspired by ctemplate and et, Mustache is a framework-agnostic way to
render logic-free views.
@@ -71,42 +65,31 @@ ri documentation for %{pkgname}.
Dokumentacji w formacie ri dla %{pkgname}.
%prep
-%setup -q -c
+%setup -qc
mv defunkt-mustache-*/* .
-rm -rf defunkt-mustache-*
-
-%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
-# XXX rm -r ri/Rack?
-# rm -r ri/NOT_THIS_MODULE_RELATED_DIRS
+rm -r ri/Object
+rm -r ri/lib/rack
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{%{ruby_vendorlibdir},%{_bindir},%{_mandir}/man{1,5},%{ruby_ridir},%{ruby_rdocdir}}
+cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
+cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
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,5}
-mv $RPM_BUILD_ROOT%{_mandir}/{,man1/}%{pkgname}.1
-mv $RPM_BUILD_ROOT%{_mandir}/{,man5/}%{pkgname}.5
-
-# Remove HTML and source markdown files
-rm $RPM_BUILD_ROOT%{_mandir}/*.*.*
+install -d $RPM_BUILD_ROOT
+cp -a man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
+cp -a man/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
%clean
rm -rf $RPM_BUILD_ROOT
@@ -114,8 +97,14 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc CONTRIBUTORS HISTORY.md README.md
-%{ruby_rubylibdir}/%{pkgname}.rb
-%{ruby_rubylibdir}/%{pkgname}
+%{ruby_vendorlibdir}/mustache.rb
+%{ruby_vendorlibdir}/mustache
+
+%if 0
+# not packaging, don't want to pull rack as dep
+%{ruby_vendorlibdir}/rack/bug/panels/mustache_panel.rb
+%{ruby_vendorlibdir}/rack/bug/panels/mustache_panel
+%endif
%files -n mustache
%defattr(644,root,root,755)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ruby-mustache.git/commitdiff/5e9f997bdc960b8f02e46201869fe51a1964096d
More information about the pld-cvs-commit
mailing list