01143dc
# bcond default logic is nicely backwards...
01143dc
%bcond_without tcl
01143dc
%bcond_with static
f1af58c
%bcond_with check
2abe230
jbj 2680542
Summary: Library that implements an embeddable SQL database engine
jbj 2680542
Name: sqlite
cb487c9
Version: 3.6.6.2
e30c1c7
Release: 4%{?dist}
jbj 2680542
License: Public Domain
jbj 2680542
Group: 	Applications/Databases
jbj 2680542
URL: http://www.sqlite.org/
jbj 2680542
Source: http://www.sqlite.org/sqlite-%{version}.tar.gz
2182006
# Fix build with --enable-load-extension, upstream ticket #3137
cb487c9
Patch1: sqlite-3.6.6.2-libdl.patch
e30c1c7
# Avoid insecure sprintf(), use a system path for lempar.c, patch from Debian
e30c1c7
Patch2: sqlite-3.6.6.2-lemon-snprintf.patch
jbj 2680542
Obsoletes: sqlite3 sqlite3-devel
Paul Nasrat b93e7ec
BuildRequires: ncurses-devel readline-devel glibc-devel
01143dc
%if %{with tcl}
cd74556
BuildRequires: /usr/bin/tclsh
2abe230
BuildRequires: tcl-devel
cd74556
%{!?tcl_version: %global tcl_version 8.5}
f5ed264
%{!?tcl_sitearch: %global tcl_sitearch %{_libdir}/tcl%{tcl_version}}
2abe230
%endif
jbj 2680542
BuildRoot: %{_tmppath}/%{name}-root
jbj 2680542
jbj 2680542
%description
jbj 2680542
SQLite is a C library that implements an SQL database engine. A large
jbj 2680542
subset of SQL92 is supported. A complete database is stored in a
jbj 2680542
single disk file. The API is designed for convenience and ease of use.
jbj 2680542
Applications that link against SQLite can enjoy the power and
Paul Nasrat 0ea3bf2
flexibility of an SQL database without the administrative hassles of
2abe230
supporting a separate database server.  Version 2 and version 3 binaries
jbj 2680542
are named to permit each to be installed on a single host
jbj 2680542
jbj 2680542
%package devel
jbj 2680542
Summary: Development tools for the sqlite3 embeddable SQL database engine.
jbj 2680542
Group: Development/Libraries
jbj 2680542
Requires: %{name} = %{version}-%{release}
f5ed264
Requires: pkgconfig
jbj 2680542
jbj 2680542
%description devel
f32dde3
This package contains the header files and development documentation 
f32dde3
for %{name}. If you like to develop programs using %{name}, you will need 
f32dde3
to install %{name}-devel.
jbj 2680542
e30c1c7
%package -n lemon
e30c1c7
Summary: A parser generator
e30c1c7
Group: Development/Tools
e30c1c7
e30c1c7
%description -n lemon
e30c1c7
Lemon is an LALR(1) parser generator for C or C++. It does the same
e30c1c7
job as bison and yacc. But lemon is not another bison or yacc
e30c1c7
clone. It uses a different grammar syntax which is designed to reduce
e30c1c7
the number of coding errors. Lemon also uses a more sophisticated
e30c1c7
parsing engine that is faster than yacc and bison and which is both
e30c1c7
reentrant and thread-safe. Furthermore, Lemon implements features
e30c1c7
that can be used to eliminate resource leaks, making is suitable for
e30c1c7
use in long-running programs such as graphical user interfaces or
e30c1c7
embedded controllers.
e30c1c7
01143dc
%if %{with tcl}
jbj 2680542
%package tcl
jbj 2680542
Summary: Tcl module for the sqlite3 embeddable SQL database engine.
jbj 2680542
Group: Development/Languages
jbj 2680542
Requires: %{name} = %{version}-%{release}
f5ed264
Requires: tcl(abi) = %{tcl_version}
jbj 2680542
jbj 2680542
%description tcl
jbj 2680542
This package contains the tcl modules for %{name}.
jbj 2680542
%endif
jbj 2680542
2abe230
%prep
2abe230
%setup -q
2182006
%patch1 -p1 -b .libdl
e30c1c7
%patch2 -p1 -b .lemon-sprintf
jbj 2680542
jbj 2680542
%build
a75a4db
export CFLAGS="$RPM_OPT_FLAGS -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -Wall"
01143dc
%configure %{!?with_tcl:--disable-tcl} \
Paul Nasrat 0ea3bf2
           --enable-threadsafe \
778c041
           --enable-threads-override-locks \
778c041
           --enable-load-extension 
debaecc
Paul Nasrat b9100e2
make %{?_smp_mflags}
2abe230
make doc
jbj 2680542
jbj 2680542
%install
jbj 2680542
rm -rf $RPM_BUILD_ROOT
jbj 2680542
f5ed264
make DESTDIR=${RPM_BUILD_ROOT} %{?with_tcl:TCLLIBDIR=%{tcl_sitearch}} install
jbj 2680542
e30c1c7
install -D -m0644 sqlite3.1 $RPM_BUILD_ROOT/%{_mandir}/man1/sqlite3.1
e30c1c7
install -D -m0755 lemon $RPM_BUILD_ROOT/%{_bindir}/lemon
bf1898b
install -D -m0644 tool/lempar.c $RPM_BUILD_ROOT/%{_datadir}/lemon/lempar.c
jbj 2680542
f5ed264
%if %{with tcl}
f5ed264
# fix up permissions to enable dep extraction
f5ed264
chmod 0755 ${RPM_BUILD_ROOT}/%{tcl_sitearch}/sqlite3/*.so
f5ed264
%endif
f5ed264
01143dc
%if ! %{with static}
455084c
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.{la,a}
Paul Nasrat 0ea3bf2
%endif
455084c
f1af58c
%if %{with check}
jbj 2680542
%check
2abe230
make test
2abe230
%endif
jbj 2680542
jbj 2680542
%clean
jbj 2680542
rm -rf $RPM_BUILD_ROOT
jbj 2680542
jbj 2680542
%post -p /sbin/ldconfig
jbj 2680542
jbj 2680542
%postun -p /sbin/ldconfig
jbj 2680542
jbj 2680542
%files
jbj 2680542
%defattr(-, root, root)
jbj 2680542
%doc README
jbj 2680542
%{_bindir}/*
jbj 2680542
%{_libdir}/*.so.*
jbj 2680542
%{_mandir}/man?/*
jbj 2680542
jbj 2680542
%files devel
jbj 2680542
%defattr(-, root, root)
jbj 2680542
%{_includedir}/*.h
jbj 2680542
%{_libdir}/*.so
jbj 2680542
%{_libdir}/pkgconfig/*.pc
01143dc
%if %{with static}
Paul Nasrat 0ea3bf2
%{_libdir}/*.a
Paul Nasrat 0ea3bf2
%exclude %{_libdir}/*.la
Paul Nasrat 0ea3bf2
%endif
f5ed264
e30c1c7
%files -n lemon
e30c1c7
%defattr(-, root, root)
e30c1c7
%{_bindir}/lemon
e30c1c7
%{_datadir}/lemon
e30c1c7
01143dc
%if %{with tcl}
jbj 2680542
%files tcl
jbj 2680542
%defattr(-, root, root)
f5ed264
%{tcl_sitearch}/sqlite3
0242ca7
%endif
jbj 2680542
jbj 2680542
%changelog
e30c1c7
* Fri Dec 05 2008 Panu Matilainen <pmatilai@redhat.com> - 3.6.6.2-4
e30c1c7
- add lemon subpackage
e30c1c7
0bb9e3a
* Thu Dec  4 2008 Matthias Clasen <mclasen@redhat.com> - 3.6.6.2-3
0bb9e3a
- Rebuild for pkg-config provides 
0bb9e3a
f5ed264
* Tue Dec 02 2008 Panu Matilainen <pmatilai@redhat.com> - 3.6.6.2-2
f5ed264
- require tcl(abi) in sqlite-tcl subpackage (#474034)
f5ed264
- move tcl extensions to arch-specific location
f5ed264
- enable dependency extraction on the tcl dso
f5ed264
- require pkgconfig in sqlite-devel
f5ed264
cb487c9
* Sat Nov 29 2008 Panu Matilainen <pmatilai@redhat.com> - 3.6.6.2-1
cb487c9
- update to 3.6.6.2
cb487c9
2182006
* Sat Nov 08 2008 Panu Matilainen <pmatilai@redhat.com> - 3.6.4-1
2182006
- update to 3.6.4
2182006
- drop patches already upstream
2182006
778c041
* Mon Sep 22 2008 Panu Matilainen <pmatilai@redhat.com> - 3.5.9-2
778c041
- Remove references to temporary registers from cache on release (#463061)
778c041
- Enable loading of external extensions (#457433)
778c041
11e1913
* Tue Jun 17 2008 Stepan Kasal <skasal@redhat.com> - 3.5.9-1
11e1913
- update to 3.5.9
11e1913
debaecc
* Wed Apr 23 2008 Panu Matilainen <pmatilai@redhat.com> - 3.5.8-1
debaecc
- update to 3.5.8
debaecc
- provide full version in pkg-config (#443692)
debaecc
f32dde3
* Mon Mar 31 2008 Panu Matilainen <pmatilai@redhat.com> - 3.5.6-2
f32dde3
- remove reference to static libs from -devel description (#439376)
f32dde3
f12ee82
* Tue Feb 12 2008 Panu Matilainen <pmatilai@redhat.com> - 3.5.6-1
f12ee82
- update to 3.5.6
f12ee82
- also fixes #432447
f12ee82
a75a4db
* Fri Jan 25 2008 Panu Matilainen <pmatilai@redhat.com> - 3.5.4-3
a75a4db
- enable column metadata API (#430258)
a75a4db
f80fbbe
* Tue Jan 08 2008 Panu Matilainen <pmatilai@redhat.com> - 3.5.4-2
f80fbbe
- avoid packaging CVS directory as documentation (#427755)
f80fbbe
16115b8
* Fri Dec 21 2007 Panu Matilainen <pmatilai@redhat.com> - 3.5.4-1
16115b8
- Update to 3.5.4 (#413801)
16115b8
f1af58c
* Fri Sep 28 2007 Panu Matilainen <pmatilai@redhat.com> - 3.4.2-3
f1af58c
- Add another build conditional for enabling %%check
f1af58c
8fe2169
* Fri Sep 28 2007 Panu Matilainen <pmatilai@redhat.com> - 3.4.2-2
01143dc
- Use bconds for the spec build conditionals
01143dc
- Enable -tcl subpackage again (#309041)
01143dc
Paul Nasrat eb16c7d
* Wed Aug 15 2007 Paul Nasrat <pnasrat@redhat.com> - 3.4.2-1
Paul Nasrat eb16c7d
- Update to 3.4.2
Paul Nasrat eb16c7d
Paul Nasrat 40ea45c
* Sat Jul 21 2007 Paul Nasrat <pnasrat@redhat.com> - 3.4.1-1
Paul Nasrat 40ea45c
- Update to 3.4.1
Paul Nasrat 40ea45c
Paul Nasrat b9100e2
* Sun Jun 24 2007 Paul Nasrat <pnsarat@redhat.com> - 3.4.0-2
Paul Nasrat b9100e2
- Disable load for now (#245486)
Paul Nasrat b9100e2
Paul Nasrat 2f6acee
* Tue Jun 19 2007 Paul Nasrat <pnasrat@redhat.com> - 3.4.0-1
Paul Nasrat 2f6acee
- Update to 3.4.0
Paul Nasrat 2f6acee
Paul Nasrat d869240
* Fri Jun 01 2007 Paul Nasrat <pnasrat@redhat.com> - 3.3.17-2
Paul Nasrat d869240
- Enable load 
Paul Nasrat d869240
- Build fts1 and fts2
Paul Nasrat 94c54e7
- Don't sync on dirs (#237427)
Paul Nasrat d869240
Paul Nasrat d02c06c
* Tue May 29 2007 Paul Nasrat <pnasrat@redhat.com> - 3.3.17-1
Paul Nasrat d02c06c
- Update to 3.3.17
Paul Nasrat d02c06c
Paul Nasrat 9972207
* Mon Mar 19 2007 Paul Nasrat <pnasrat@redhat.com> - 3.3.13-1
Paul Nasrat 9972207
- Update to 3.3.13
Paul Nasrat 9972207
Paul Nasrat fc6d77a
* Fri Aug 11 2006 Paul Nasrat <pnasrat@redhat.com> - 3.3.6-2
Paul Nasrat fc6d77a
- Fix conditional typo (patch from Gareth Armstrong)
Paul Nasrat fc6d77a
59a588a
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 3.3.6-1.1
59a588a
- rebuild
59a588a
Paul Nasrat 0ea3bf2
* Mon Jun 26 2006 Paul Nasrat <pnasrat@redhat.com> - 3.3.6-1
Paul Nasrat 0ea3bf2
- Update to 3.3.6
Paul Nasrat 0ea3bf2
- Fix typo  (#189647)
Paul Nasrat 0ea3bf2
- Enable threading fixes (#181298)
Paul Nasrat 0ea3bf2
- Conditionalize static library
Paul Nasrat 0ea3bf2
Paul Nasrat 0795915
* Mon Apr 17 2006 Paul Nasrat <pnasrat@redhat.com> - 3.3.5-1
Paul Nasrat 0795915
- Update to 3.3.5
Paul Nasrat 0795915
b905003
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 3.3.3-1.2
b905003
- bump again for double-long bug on ppc(64)
b905003
0fd446b
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 3.3.3-1.1
0fd446b
- rebuilt for new gcc4.1 snapshot and glibc changes
0fd446b
a71c3f8
* Tue Jan 31 2006 Christopher Aillon <caillon@redhat.com> - 3.3.3-1
a71c3f8
- Update to 3.3.3
a71c3f8
a394dc6
* Tue Jan 31 2006 Christopher Aillon <caillon@redhat.com> - 3.3.2-1
a394dc6
- Update to 3.3.2
a394dc6
Paul Nasrat 8b0e8b3
* Tue Jan 24 2006 Paul Nasrat <pnasrat@redhat.com> - 3.2.8-1
Paul Nasrat 8b0e8b3
- Add --enable-threadsafe (Nicholas Miell)
Paul Nasrat 8b0e8b3
- Update to 3.2.8
Paul Nasrat 8b0e8b3
4e0116a
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
4e0116a
- rebuilt
4e0116a
455084c
* Tue Oct  4 2005 Jeremy Katz <katzj@redhat.com> - 3.2.7-2
455084c
- no more static file or libtool archive (#169874) 
455084c
Florian La Roche 4d69ef8
* Wed Sep 28 2005 Florian La Roche <laroche@redhat.com>
Florian La Roche 4d69ef8
- Upgrade to 3.2.7 release.
Florian La Roche 4d69ef8
Florian La Roche 634b37d
* Thu Sep 22 2005 Florian La Roche <laroche@redhat.com>
Florian La Roche 634b37d
- Upgrade to 3.2.6 release.
Florian La Roche 634b37d
Florian La Roche 6eced65
* Sun Sep 11 2005 Florian La Roche <laroche@redhat.com>
Florian La Roche 6eced65
- Upgrade to 3.2.5 release.
Florian La Roche 6eced65
2abe230
* Fri Jul  8 2005 Roland McGrath <roland@redhat.com> - 3.2.2-1
2abe230
- Upgrade to 3.2.2 release.
2abe230
61bc2da
* Sat Apr  9 2005 Warren Togami <wtogami@redhat.com> - 3.1.2-3
61bc2da
- fix buildreqs (#154298)
61bc2da
0242ca7
* Mon Apr  4 2005 Jeremy Katz <katzj@redhat.com> - 3.1.2-2
0242ca7
- disable tcl subpackage
0242ca7
jbj 2680542
* Wed Mar  9 2005 Jeff Johnson <jbj@redhat.com> 3.1.2-1
jbj 2680542
- rename to "sqlite" from "sqlite3" (#149719, #150012).
jbj 2680542
jbj 2680542
* Wed Feb 16 2005 Jeff Johnson <jbj@jbj.org> 3.1.2-1
jbj 2680542
- upgrade to 3.1.2.
jbj 2680542
- add sqlite3-tcl sub-package.
jbj 2680542
jbj 2680542
* Sat Feb  5 2005 Jeff Johnson <jbj@jbj.org> 3.0.8-3
jbj 2680542
- repackage for fc4.
jbj 2680542
jbj 2680542
* Mon Jan 17 2005 R P Herrold <info@owlriver.com> 3.0.8-2orc
2abe230
- fix a man page nameing conflict when co-installed with sqlite-2, as
jbj 2680542
  is permissible