2009-06-25 10:18:53 +00:00
|
|
|
%global __strip %{_mingw32_strip}
|
|
|
|
%global __objdump %{_mingw32_objdump}
|
|
|
|
%global _use_internal_dependency_generator 0
|
|
|
|
%global __find_requires %{_mingw32_findrequires}
|
|
|
|
%global __find_provides %{_mingw32_findprovides}
|
2009-06-23 09:50:06 +00:00
|
|
|
%define __debug_install_post %{_mingw32_debug_install_post}
|
2008-12-21 11:15:27 +00:00
|
|
|
|
2009-06-25 10:18:53 +00:00
|
|
|
# bcond default logic is nicely backwards...
|
|
|
|
%bcond_without tcl
|
|
|
|
%global tclversion 8.5
|
|
|
|
|
2008-12-21 11:15:27 +00:00
|
|
|
Name: mingw32-sqlite
|
2009-06-25 10:18:53 +00:00
|
|
|
Version: 3.6.14.2
|
|
|
|
Release: 1%{?dist}
|
2008-12-21 11:15:27 +00:00
|
|
|
Summary: MinGW Windows port of sqlite embeddable SQL database engine
|
|
|
|
|
|
|
|
License: Public Domain
|
|
|
|
Group: Applications/Databases
|
|
|
|
URL: http://www.sqlite.org/
|
|
|
|
Source0: http://www.sqlite.org/sqlite-%{version}.tar.gz
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
# Patches from Fedora native package.
|
2009-04-23 11:39:19 +00:00
|
|
|
Patch1: sqlite-3.6.12-libdl.patch
|
|
|
|
# Avoid insecure sprintf(), use a system path for lempar.c, patch from Debian
|
2008-12-21 11:15:27 +00:00
|
|
|
Patch2: sqlite-3.6.6.2-lemon-snprintf.patch
|
2009-06-25 10:18:53 +00:00
|
|
|
Patch3: sqlite-3.6.13-iotest-nodirsync.patch
|
2008-12-21 11:15:27 +00:00
|
|
|
|
|
|
|
# Patches for MinGW port.
|
2009-04-23 11:39:19 +00:00
|
|
|
Patch1000: mingw32-sqlite-3.6.12-no-undefined.patch
|
2008-12-21 11:15:27 +00:00
|
|
|
|
2009-06-23 09:50:06 +00:00
|
|
|
BuildRequires: mingw32-filesystem >= 52
|
2008-12-21 11:15:27 +00:00
|
|
|
BuildRequires: mingw32-gcc
|
|
|
|
BuildRequires: mingw32-binutils
|
|
|
|
|
|
|
|
BuildRequires: mingw32-pdcurses
|
|
|
|
BuildRequires: mingw32-readline
|
|
|
|
BuildRequires: mingw32-termcap >= 1.3.1-3
|
|
|
|
|
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: libtool
|
2009-04-23 13:36:21 +00:00
|
|
|
BuildRequires: /usr/bin/tclsh
|
2008-12-21 11:15:27 +00:00
|
|
|
|
|
|
|
Requires: pkgconfig
|
|
|
|
|
2009-06-25 10:18:53 +00:00
|
|
|
%if %{with tcl}
|
|
|
|
BuildRequires: /usr/bin/tclsh
|
|
|
|
BuildRequires: mingw32-tcl
|
|
|
|
%endif
|
|
|
|
|
2008-12-21 11:15:27 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
SQLite is a C library that implements an SQL database engine. A large
|
|
|
|
subset of SQL92 is supported. A complete database is stored in a
|
|
|
|
single disk file. The API is designed for convenience and ease of use.
|
|
|
|
Applications that link against SQLite can enjoy the power and
|
|
|
|
flexibility of an SQL database without the administrative hassles of
|
|
|
|
supporting a separate database server. Version 2 and version 3 binaries
|
|
|
|
are named to permit each to be installed on a single host
|
|
|
|
|
|
|
|
This package contains cross-compiled libraries and development tools
|
|
|
|
for Windows.
|
|
|
|
|
|
|
|
|
2009-06-23 09:50:06 +00:00
|
|
|
%{_mingw32_debug_package}
|
|
|
|
|
|
|
|
|
2008-12-21 11:15:27 +00:00
|
|
|
%prep
|
|
|
|
%setup -q -n sqlite-%{version}
|
|
|
|
%patch1 -p1 -b .libdl
|
|
|
|
%patch2 -p1 -b .lemon-sprintf
|
2009-06-25 10:18:53 +00:00
|
|
|
%patch3 -p1 -b .nodirsync
|
2008-12-21 11:15:27 +00:00
|
|
|
%patch1000 -p1
|
|
|
|
|
|
|
|
# Ships with an old/broken version of libtool which cannot create
|
|
|
|
# Windows libraries properly. So pull in the current version.
|
|
|
|
autoreconf
|
|
|
|
libtoolize --force
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
# I think there's a bug in the configure script where, if
|
|
|
|
# cross-compiling, it cannot correctly determine the target executable
|
|
|
|
# extension (ie. .exe). As a result it doesn't correctly detect that
|
|
|
|
# the target is Windows and so tries to use Unix-specific functions
|
|
|
|
# which don't exist. In any case we can work around this by forcing
|
|
|
|
# the extension via this export.
|
|
|
|
# - RWMJ 2008-09-30
|
|
|
|
export config_TARGET_EXEEXT=.exe
|
2009-04-23 11:39:19 +00:00
|
|
|
# add compile flags to enable rtree, fts3
|
2009-04-23 18:20:15 +00:00
|
|
|
export MINGW32_CFLAGS="%{_mingw32_cflags} -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1 -fno-strict-aliasing"
|
2008-12-21 11:15:27 +00:00
|
|
|
|
2009-06-25 10:18:53 +00:00
|
|
|
%{_mingw32_configure} %{!?with_tcl:--disable-tcl} \
|
|
|
|
--enable-threadsafe \
|
|
|
|
--enable-threads-override-locks \
|
|
|
|
--enable-load-extension
|
2008-12-21 11:15:27 +00:00
|
|
|
make
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
|
|
|
|
|
|
|
# Remove static libraries but DON'T remove *.dll.a files.
|
|
|
|
rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libsqlite3.a
|
|
|
|
|
|
|
|
chmod 0644 $RPM_BUILD_ROOT%{_mingw32_libdir}/libsqlite3.dll.a
|
|
|
|
|
2009-06-25 10:18:53 +00:00
|
|
|
%if %{with tcl}
|
|
|
|
install -d -m755 $RPM_BUILD_ROOT%{_mingw32_datadir}/tcl%{tclversion}/sqlite3/
|
|
|
|
mv $RPM_BUILD_ROOT%{_datadir}/tcl%{tclversion}/sqlite3/pkgIndex.tcl $RPM_BUILD_ROOT%{_mingw32_datadir}/tcl%{tclversion}/sqlite3/
|
|
|
|
%endif
|
2008-12-21 11:15:27 +00:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc README VERSION
|
|
|
|
%{_mingw32_bindir}/sqlite3.exe
|
|
|
|
%{_mingw32_bindir}/libsqlite3-0.dll
|
|
|
|
%{_mingw32_libdir}/libsqlite3.dll.a
|
|
|
|
%{_mingw32_libdir}/libsqlite3.la
|
|
|
|
%{_mingw32_includedir}/sqlite3.h
|
|
|
|
%{_mingw32_includedir}/sqlite3ext.h
|
|
|
|
%{_mingw32_libdir}/pkgconfig/sqlite3.pc
|
2009-06-25 10:18:53 +00:00
|
|
|
%if %{with tcl}
|
|
|
|
%{_mingw32_datadir}/tcl%{tclversion}/sqlite3/
|
|
|
|
%{_mingw32_datadir}/tcl%{tclversion}/sqlite3/pkgIndex.tcl
|
|
|
|
%endif
|
2008-12-21 11:15:27 +00:00
|
|
|
|
|
|
|
%changelog
|
2009-06-25 10:18:53 +00:00
|
|
|
* Tue Jun 23 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 3.6.14.2-1
|
|
|
|
- update to 3.6.14.2
|
2009-06-23 09:50:06 +00:00
|
|
|
- add debuginfo packages
|
|
|
|
|
2009-04-23 18:20:15 +00:00
|
|
|
* Thu Apr 23 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 3.6.12-4
|
|
|
|
- fix CFLAGS setting
|
|
|
|
|
2009-04-23 17:11:32 +00:00
|
|
|
* Thu Apr 23 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 3.6.12-3
|
|
|
|
- use Erik van Pienbroek way to add to CFLAGS
|
|
|
|
|
2009-04-23 13:36:21 +00:00
|
|
|
* Thu Apr 23 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 3.6.12-2
|
|
|
|
- BR tclsh; the build process without tclsh and with extensions
|
|
|
|
enabled is broken
|
|
|
|
|
2009-04-23 11:39:19 +00:00
|
|
|
* Thu Apr 23 2009 Thomas Sailer <t.sailer@alumni.ee.ethz.ch> - 3.6.12-1
|
|
|
|
- update to 3.6.12 to match native
|
|
|
|
- enable rtree, fts3
|
|
|
|
|
2009-02-26 01:26:08 +00:00
|
|
|
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.6.2-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
|
|
|
|
2009-02-20 23:29:29 +00:00
|
|
|
* Fri Feb 20 2009 Richard W.M. Jones <rjones@redhat.com> - 3.6.6.2-2
|
|
|
|
- Rebuild for mingw32-gcc 4.4
|
|
|
|
|
2008-12-21 11:15:27 +00:00
|
|
|
* Tue Dec 16 2008 Richard Jones <rjones@redhat.com> - 3.6.6.2-1
|
|
|
|
- New upstream release (to match Fedora native), 3.6.6.2.
|
|
|
|
- Replace patches with ones from native.
|
|
|
|
- Rebase -no-undefined patch.
|
|
|
|
- Remove spurious +x permissions on libsqlite3.dll.a.
|
|
|
|
- Requires pkgconfig.
|
|
|
|
|
|
|
|
* Sat Nov 22 2008 Richard Jones <rjones@redhat.com> - 3.5.9-3
|
|
|
|
- Rebuild against new readline.
|
|
|
|
|
|
|
|
* Fri Oct 31 2008 Richard Jones <rjones@redhat.com> - 3.5.9-2
|
|
|
|
- Rebuild against latest termcap.
|
|
|
|
|
|
|
|
* Thu Sep 25 2008 Richard Jones <rjones@redhat.com> - 3.5.9-1
|
|
|
|
- Initial RPM release.
|