%define __find_provides %{_mingw32_findprovides}
Name: mingw32-sqlite
-Version: 3.5.9
-Release: 3%{?dist}
+Version: 3.6.6.2
+Release: 1%{?dist}
Summary: MinGW Windows port of sqlite embeddable SQL database engine
License: Public Domain
BuildArch: noarch
-Patch1: sqlite-3.5.8-pkgconfig-version.patch
+# Patches from Fedora native package.
+Patch1: sqlite-3.6.6.2-libdl.patch
+Patch2: sqlite-3.6.6.2-lemon-snprintf.patch
-Patch1000: mingw32-sqlite-3.5.9-no-undefined.patch
+# Patches for MinGW port.
+Patch1000: mingw32-sqlite-3.6.6.2-no-undefined.patch
BuildRequires: mingw32-filesystem >= 26
BuildRequires: mingw32-gcc
BuildRequires: autoconf
BuildRequires: libtool
+Requires: pkgconfig
+
%description
SQLite is a C library that implements an SQL database engine. A large
%prep
%setup -q -n sqlite-%{version}
-%patch1 -p1
+%patch1 -p1 -b .libdl
+%patch2 -p1 -b .lemon-sprintf
%patch1000 -p1
# Ships with an old/broken version of libtool which cannot create
# 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
+
%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_includedir}/sqlite3.h
%{_mingw32_includedir}/sqlite3ext.h
%{_mingw32_libdir}/pkgconfig/sqlite3.pc
-# etc.
%changelog
+* 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.