Summary: Library that implements an embeddable SQL database engine Name: sqlite Version: 3.5.4 Release: 2 License: Public Domain Group: Applications/Databases URL: http://www.sqlite.org/ Source: http://www.sqlite.org/sqlite-%{version}.tar.gz Obsoletes: sqlite3 sqlite3-devel BuildRequires: ncurses-devel, make BuildRoot: %{_tmppath}/%{name}-%{version}-root %description SQLite is a C library that implements an embeddable 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. %package devel Summary: Header files and libraries for developing apps which will use sqlite. Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: pkg-config %description devel The sqlite-devel package contains the header files and libraries needed to develop programs that use the sqlite database library. %prep %setup -q %build mkdir build cd build # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" # first build the 64-bit version export CC="cc -q64" ../configure \ --prefix=%{_prefix} \ --enable-shared --enable-static \ --disable-tcl \ --enable-threadsafe \ --enable-threads-override-locks # "correct" Makefile cat Makefile | sed -e "s|THREADLIB|LIBPTHREAD|" > Makefile.tmp mv Makefile.tmp Makefile gmake %{?_smp_mflags} cp .libs/libsqlite3.so.0 . gmake distclean # now build the 32-bit version export CC="cc" ../configure \ --prefix=%{_prefix} \ --enable-shared --enable-static \ --disable-tcl \ --enable-threadsafe \ --enable-threads-override-locks # "correct" Makefile cat Makefile | sed -e "s|THREADLIB|LIBPTHREAD|" > Makefile.tmp mv Makefile.tmp Makefile gmake %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q .libs/libsqlite3.a ./libsqlite3.so.0 %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT cd build gmake install DESTDIR=$RPM_BUILD_ROOT strip %{buildroot}%{_bindir}/* mkdir -p %{buildroot}%{_mandir}/man1/ cp ../sqlite3.1 %{buildroot}%{_mandir}/man1 chmod 644 %{buildroot}%{_mandir}/man1/* %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,system) %doc README %{_bindir}/* %{_libdir}/*.a %{_mandir}/man?/* %files devel %defattr(-,root,system) %doc doc/ %{_includedir}/*.h %{_libdir}/*.la %{_libdir}/pkgconfig/*.pc %changelog * Thu Jan 03 2008 Michael Perzl - 3.5.4-2 - included both 32-bit and 64-bit shared objects * Tue Dec 18 2007 Michael Perzl 3.5.4-1 - First version for AIX5L v5.1 and higher