[projects/template-specs] recent changes

glen glen at pld-linux.org
Wed Sep 11 12:42:17 CEST 2013


commit 6d4ddd20da70d9d3f3be01d4fb55d122407cd4c1
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed Sep 11 13:41:53 2013 +0300

    recent changes

 ruby.spec | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)
---
diff --git a/ruby.spec b/ruby.spec
index 34e2b61..9b2f400 100644
--- a/ruby.spec
+++ b/ruby.spec
@@ -16,16 +16,16 @@ Source0:	http://rubygems.org/downloads/%{pkgname}-%{version}.gem
 # Source0-md5:	-
 Group:		Development/Languages
 URL:		http://rubyforge.org/projects/.../
-BuildRequires:	rpmbuild(macros) >= 1.665
 BuildRequires:	rpm-rubyprov
-BuildRequires:	setup.rb
-%{?ruby_mod_ver_requires_eq}
+BuildRequires:	rpmbuild(macros) >= 1.665
+#BuildRequires:	setup.rb
+# optional locale BR, see ri/rdoc building below
+#%if %(locale -a | grep -q '^en_US$'; echo $?)
+#BuildRequires:	glibc-localedb-all
+#%endif
 #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
 ...
 
@@ -54,19 +54,14 @@ ri documentation for %{pkgname}.
 Dokumentacji w formacie ri dla %{pkgname}.
 
 %prep
+# gem
+%setup -q -n %{pkgname}-%{version}
 # tgz
 #%setup -q -n %{pkgname}-%{version}
 
 # ext build
 cp -p %{_datadir}/setup.rb .
 
-# gem install
-%setup -qc
-
-# gem install
-%{__tar} xf %{SOURCE0} -O data.tar.gz | %{__tar} xz
-find -newer README -o -print | xargs touch --reference %{SOURCE0}
-
 # cleanup backups after patching
 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 
@@ -105,6 +100,7 @@ ruby setup.rb setup
 %endif
 
 # binary pkgs:
+cd ext/%{pkgname}
 %{__ruby} extconf.rb
 %{__make} \
 	CC="%{__cc}" \
@@ -112,6 +108,10 @@ ruby setup.rb setup
 	CFLAGS="%{rpmcflags} -fPIC"
 
 # with rdoc/ri:
+# optional locale force, see BR above as well
+# UTF8 locale needed for doc generation
+#export LC_ALL=en_US.UTF-8
+
 rdoc --ri --op ri lib
 rdoc --op rdoc lib
 # rm -r ri/NOT_THIS_MODULE_RELATED_DIRS
@@ -119,8 +119,8 @@ rm ri/created.rid
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{ruby_rubylibdir},%{ruby_ridir},%{ruby_rdocdir}}
-install -d $RPM_BUILD_ROOT{%{ruby_rubylibdir},%{ruby_ridir},%{ruby_rdocdir},%{_bindir}}
+install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_ridir},%{ruby_rdocdir}}
+install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_ridir},%{ruby_rdocdir},%{_bindir}}
 %{__ruby} setup.rb install \
 	--prefix=$RPM_BUILD_ROOT
 
@@ -128,7 +128,7 @@ install -d $RPM_BUILD_ROOT%{ruby_vendorlibdir}
 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
 
 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
-cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir}
+cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
 
 cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir}
 
@@ -149,9 +149,9 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc CHANGELOG README
-%{ruby_rubylibdir}/%{pkgname}.rb
-%{ruby_rubylibdir}/%{pkgname}
-%attr(755,root,root) %{ruby_archdir}/%{pkgname}_ext.so
+%{ruby_vendorlibdir}/%{pkgname}.rb
+%{ruby_vendorlibdir}/%{pkgname}
+%attr(755,root,root) %{ruby_vendorarchdir}/%{pkgname}_ext.so
 %{ruby_specdir}/%{pkgname}-%{version}.gemspec
 
 %files rdoc
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/template-specs.git/commitdiff/6d4ddd20da70d9d3f3be01d4fb55d122407cd4c1



More information about the pld-cvs-commit mailing list