Thursday, October 30, 2008

.spec file for sqlite3 for RPM or LTIB

Was searching for sqlite3 .spec file for LTIB and here is one. If there are anything need to be changed to make it generic, please share it across.

%define pfx /opt/freescale/rootfs/%{_target_cpu}
%define __os_install_post %{nil}

Summary : SQLite is a C library that implements an embeddable SQL database engine
Name : sqlite
Version : 3.6.4
Release : 1
License : Public Domain
Vendor : Sqlite
Packager : Kannaiyan
Group : System/Libraries
Source : %{name}-%{version}.tar.gz
BuildRoot : %{_tmppath}/%{name}
Prefix : %{pfx}

%Description
SQLite is a software library that implements a self-contained, serverless,
zero-configuration, transactional SQL database engine.
Programs that link with the SQLite library can have SQL database access
without running a separate RDBMS process. The distribution comes with a
standalone command-line access program (sqlite) that can be used to
administer an SQLite database and which serves as an example of how to
use the SQLite library.

%Prep
%setup

%Build
export BUILD_CC=/usr/bin/gcc
./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build} --mandir=%{_mandir} --infodir=%{_infodir}
make

%Install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT/%{pfx}
rm -f $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/lib/*.la

%Clean
rm -rf $RPM_BUILD_ROOT

%Files
%defattr(-,root,root)
%{pfx}/*