From: Wai-Sun Chia Date: 2002-12-29T14:53:41+09:00 Subject: RPM .spec file for DBI This is a multi-part message in MIME format. --------------020103080405080901010304 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Here's a SPEC file for building a RPM for ruby-dbi. Should work for most RPM-based Linux distros... -- Wai-Sun "Squidster" Chia Consulting & Integration Linux/Unix/Web Developer Dude "Just Another Ruby Miner" --------------020103080405080901010304 Content-Type: text/plain; name="ruby-dbi.spec" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ruby-dbi.spec" %define name ruby-dbi %define version 0.0.18 %define release 1 Summary: Ruby/DBI - a database independent interface for accessing databases Name: %{name} Version: %{version} Release: %{release} Source0: http://umn.dl.sourceforge.net/sourceforge/ruby-dbi/%{name}-all-%{version}.tar.gz Copyright: Ruby Group: Development/Other BuildRoot: %{_tmppath}/%{name}-buildroot Prefix: %{_prefix} Requires: ruby >= 1.6 BuildRequires: ruby-devel %description A Database independent API to access databases, similar to Perl's DBI. DBDs for following databases are included: * ADO (ActiveX Data Objects) * IBM DB2 * InterBase * mSQL * MySQL * ODBC * Oracle * PostgreSQL * Proxy/Server (DBI over TCP/IP) * SQLite * SQLRelay %prep %setup -q -n %{name}-all %build ruby setup.rb config --with=dbi,dbd_proxy,dbd_mysql,dbd_oracle,dbd_sqlrelay,dbd_sqlite,dbd_pg ruby setup.rb setup # Have to have the config.save to prefix %buildroot mv config.save config.tmp sed -e "s,bin-dir=,bin-dir=$RPM_BUILD_ROOT," \ -e "s,rb-dir=,rb-dir=$RPM_BUILD_ROOT," \ -e "s,so-dir=,so-dir=$RPM_BUILD_ROOT," \ -e "s,data-dir=,data-dir=$RPM_BUILD_ROOT," config.tmp > config.save %install rm -rf %buildroot ruby setup.rb install %clean rm -rf %buildroot %files %defattr(-,root,root) %doc ChangeLog LICENSE README test examples contrib doc %{_bindir}/proxyserver.rb %{_bindir}/sqlsh.rb %{_libdir}/ruby/site_ruby/*/DBD/* %{_libdir}/ruby/site_ruby/*/dbi.rb %{_libdir}/ruby/site_ruby/*/*/DBD/* %{_libdir}/ruby/site_ruby/*/dbi/* %changelog * Sat Dec 29 2002 Squidster 0.0.18-1 - first release # end of file --------------020103080405080901010304--