[packages/ruby-pg] build to vendor dirs
glen
glen at pld-linux.org
Thu Apr 25 21:46:21 CEST 2013
commit c68499d13bb5e0b47c54d33a160f0e07f70c9472
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Thu Apr 25 22:46:13 2013 +0300
build to vendor dirs
ruby-pg.spec | 31 ++++++++++++++-----------------
1 file changed, 14 insertions(+), 17 deletions(-)
---
diff --git a/ruby-pg.spec b/ruby-pg.spec
index 3df57ca..2cc8f1e 100644
--- a/ruby-pg.spec
+++ b/ruby-pg.spec
@@ -2,14 +2,15 @@ Summary: PostgreSQL module for Ruby
Summary(pl.UTF-8): Moduł PostgreSQL dla Ruby
Name: ruby-pg
Version: 0.13.2
-Release: 1
+Release: 2
License: Ruby License
Group: Development/Languages
Source0: http://bitbucket.org/ged/ruby-pg/get/v%{version}.tar.gz
# Source0-md5: 6dfc70279ae5f8ea0d5cfb318086c5fd
URL: http://rubyforge.org/projects/ruby-pg/
BuildRequires: postgresql-devel
-BuildRequires: rpmbuild(macros) >= 1.277
+BuildRequires: rpm-rubyprov
+BuildRequires: rpmbuild(macros) >= 1.656
BuildRequires: ruby-devel >= 1:1.8.4-5
BuildRequires: setup.rb
%{?ruby_mod_ver_requires_eq}
@@ -23,24 +24,20 @@ PostgreSQL module for Ruby.
Moduł PostgreSQL dla Ruby.
%prep
-%setup -q -n ged-ruby-pg-c79cd308363d
-# -n pg-%{version}
-#mv ged-ruby-pg-c79cd308363d pg-%{version}
+%setup -qc
+mv ged-ruby-pg-c79cd308363d/* .
cp %{_datadir}/setup.rb .
%build
-ruby setup.rb config \
- --rbdir=%{ruby_rubylibdir} \
- --sodir=%{ruby_archdir}
-
-ruby setup.rb setup
+%{__ruby} setup.rb config
+%{__make} V=1 -C ext \
+ CC="%{__cc}"
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{ruby_archdir}
-
-ruby setup.rb install \
- --prefix=$RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{ruby_vendorarchdir},%{ruby_vendorlibdir}}
+cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
+install -p ext/*.so $RPM_BUILD_ROOT%{ruby_vendorarchdir}
%clean
rm -rf $RPM_BUILD_ROOT
@@ -48,6 +45,6 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc README*
-%{ruby_rubylibdir}/pg
-%{ruby_rubylibdir}/pg.rb
-%attr(755,root,root) %{ruby_archdir}/pg_ext.so
+%{ruby_vendorlibdir}/pg.rb
+%{ruby_vendorlibdir}/pg
+%attr(755,root,root) %{ruby_vendorarchdir}/pg_ext.so
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ruby-pg.git/commitdiff/c68499d13bb5e0b47c54d33a160f0e07f70c9472
More information about the pld-cvs-commit
mailing list