File sqlite2.spec of Package sqlite2
#
# spec file for package sqlite2 (Version 2.8.17)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: sqlite2
BuildRequires: readline-devel tcl-devel update-desktop-files
License: Public Domain, Freeware
Group: Productivity/Databases/Servers
Summary: Embeddable SQL Database Engine
# bug437293
%ifarch ppc64
Obsoletes: sqlite2-64bit
%endif
#
Url: http://www.sqlite.org/
Version: 2.8.17
Release: 169
Source0: http://www.sqlite.org/sqlite-%version.tar.bz2
Source1: sqlite2.desktop
Source2: baselibs.conf
Patch0: sqlite.diff
Patch1: sqlite2-tcl.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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.
SQLite is not a client library used to connect to a big database
server. SQLite is the server and the SQLite library reads and writes
directly to and from the database files on disk.
SQLite can be used via the sqlite command line tool or via any
application that supports the Qt database plug-ins.
Authors:
--------
D. Richard Hipp <drh@hwaci.com>
%package devel
License: Public Domain, Freeware
Group: Productivity/Databases/Servers
Summary: Embeddable SQL Database Engine
Requires: sqlite2 = %version glibc-devel
# bug437293
%ifarch ppc64
Obsoletes: sqlite2-devel-64bit
%endif
#
%description devel
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.
SQLite is not a client library used to connect to a big database
server. SQLite is the server and the SQLite library reads and writes
directly to and from the database files on disk.
SQLite can be used via the sqlite command line tool or via any
application that supports the Qt database plug-ins.
Authors:
--------
D. Richard Hipp <drh@hwaci.com>
%prep
%setup -q -n sqlite-%version
%patch0
%patch1
%ifarch s390 s390x
# some (minor ?) miscalculations with float values on these platforms
# needs to be checked deeper later
rm test/printf.test
%endif
%ifarch ppc
# minor miscalculation
rm test/format3.test
%endif
%ifarch ia64 x86_64 s390x sparc64 mips64 axp ppc64
# these test cases are not 64bit clean (more a Tcl issue than a sqlite one)
rm test/format3.test test/pager.test test/btree*.test test/version.test test/pragma.test
%endif
# FIXME: the test itself runs, but it doesn't work, when the
# join3 did run before. no idea yet.
rm test/tclsqlite.test
# does not work due to our ulimits in our build system
rm test/bigfile.test
autoreconf -fi
%build
export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG=1 -fno-strict-aliasing"
export CXXFLAGS="$CFLAGS -fno-strict-aliasing"
mkdir build
cd build
ln -s ../VERSION .
../configure \
--prefix=/usr \
--libdir=%_libdir \
--mandir=%_mandir \
--enable-utf8 \
--sysconfdir=/etc/ \
--disable-static \
--with-pic
%{__make} %{?_smp_mflags}
make doc
%check
cd build
make fulltest
%install
cd build
make DESTDIR="$RPM_BUILD_ROOT" install
install -d $RPM_BUILD_ROOT%_mandir/man1/
install -m 0644 ../sqlite.1 $RPM_BUILD_ROOT%_mandir/man1/
#
# install the susehelp meta file
mkdir -p $RPM_BUILD_ROOT/usr/share/susehelp/meta/Development/Libraries/
install -m 0644 %SOURCE1 \
$RPM_BUILD_ROOT/usr/share/susehelp/meta/Development/Libraries/
%suse_update_desktop_file $RPM_BUILD_ROOT/usr/share/susehelp/meta/Development/Libraries/sqlite2.desktop
%{__rm} -f %{buildroot}%{_libdir}/*.la
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
/usr/bin/sqlite
%_mandir/man1/*
%_libdir/libsqlite.so.*
%files devel
%defattr(-,root,root)
%doc build/doc/*
%doc /usr/share/susehelp
/usr/include/sqlite.h
%_libdir/libsqlite.so
%_libdir/pkgconfig/sqlite.pc
%changelog