More test programs to track down Format / overflow bug.
[fedora-mingw.git] / sqlite / mingw32-sqlite.spec
1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
6
7 Name:           mingw32-sqlite
8 Version:        3.5.9
9 Release:        2%{?dist}
10 Summary:        MinGW Windows port of sqlite embeddable SQL database engine
11
12 License:        Public Domain
13 Group:          Applications/Databases
14 URL:            http://www.sqlite.org/
15 Source0:        http://www.sqlite.org/sqlite-%{version}.tar.gz
16 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
17
18 BuildArch:      noarch
19
20 Patch1:         sqlite-3.5.8-pkgconfig-version.patch
21 Patch10:        mingw32-sqlite-3.5.9-no-undefined.patch
22
23 BuildRequires:  mingw32-filesystem >= 26
24 BuildRequires:  mingw32-gcc
25 BuildRequires:  mingw32-binutils
26
27 BuildRequires:  mingw32-pdcurses
28 BuildRequires:  mingw32-readline
29 BuildRequires:  mingw32-termcap >= 1.3.1-3
30
31 BuildRequires:  autoconf
32 BuildRequires:  libtool
33
34
35 %description
36 SQLite is a C library that implements an SQL database engine. A large
37 subset of SQL92 is supported. A complete database is stored in a
38 single disk file. The API is designed for convenience and ease of use.
39 Applications that link against SQLite can enjoy the power and
40 flexibility of an SQL database without the administrative hassles of
41 supporting a separate database server.  Version 2 and version 3 binaries
42 are named to permit each to be installed on a single host
43
44 This package contains cross-compiled libraries and development tools
45 for Windows.
46
47
48 %prep
49 %setup -q -n sqlite-%{version}
50 %patch1 -p1
51 %patch10 -p1
52
53 # Ships with an old/broken version of libtool which cannot create
54 # Windows libraries properly.  So pull in the current version.
55 autoreconf
56 libtoolize --force
57
58
59 %build
60 # I think there's a bug in the configure script where, if
61 # cross-compiling, it cannot correctly determine the target executable
62 # extension (ie. .exe).  As a result it doesn't correctly detect that
63 # the target is Windows and so tries to use Unix-specific functions
64 # which don't exist.  In any case we can work around this by forcing
65 # the extension via this export.
66 #   - RWMJ 2008-09-30
67 export config_TARGET_EXEEXT=.exe
68
69 %{_mingw32_configure} \
70   --with-readline-inc='-I%{_mingw32_includedir}/readline' \
71   --with-readline-lib=%{_mingw32_libdir}/readline.dll.a
72 make
73
74
75 %install
76 rm -rf $RPM_BUILD_ROOT
77 make DESTDIR=$RPM_BUILD_ROOT install
78
79 # Remove static libraries but DON'T remove *.dll.a files.
80 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libsqlite3.a
81
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86
87 %files
88 %defattr(-,root,root)
89 %{_mingw32_bindir}/sqlite3.exe
90 %{_mingw32_bindir}/libsqlite3-0.dll
91 %{_mingw32_libdir}/libsqlite3.dll.a
92 %{_mingw32_libdir}/libsqlite3.la
93 %{_mingw32_includedir}/sqlite3.h
94 %{_mingw32_includedir}/sqlite3ext.h
95 %{_mingw32_libdir}/pkgconfig/sqlite3.pc
96 # etc.
97
98
99 %changelog
100 * Fri Oct 31 2008 Richard Jones <rjones@redhat.com> - 3.5.9-2
101 - Rebuild against latest termcap.
102
103 * Thu Sep 25 2008 Richard Jones <rjones@redhat.com> - 3.5.9-1
104 - Initial RPM release.