Include the license file.
[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.6.6.2
9 Release:        1%{?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 # Patches from Fedora native package.
21 Patch1:         sqlite-3.6.6.2-libdl.patch
22 Patch2:         sqlite-3.6.6.2-lemon-snprintf.patch
23
24 # Patches for MinGW port.
25 Patch1000:      mingw32-sqlite-3.6.6.2-no-undefined.patch
26
27 BuildRequires:  mingw32-filesystem >= 26
28 BuildRequires:  mingw32-gcc
29 BuildRequires:  mingw32-binutils
30
31 BuildRequires:  mingw32-pdcurses
32 BuildRequires:  mingw32-readline
33 BuildRequires:  mingw32-termcap >= 1.3.1-3
34
35 BuildRequires:  autoconf
36 BuildRequires:  libtool
37
38 Requires:       pkgconfig
39
40
41 %description
42 SQLite is a C library that implements an SQL database engine. A large
43 subset of SQL92 is supported. A complete database is stored in a
44 single disk file. The API is designed for convenience and ease of use.
45 Applications that link against SQLite can enjoy the power and
46 flexibility of an SQL database without the administrative hassles of
47 supporting a separate database server.  Version 2 and version 3 binaries
48 are named to permit each to be installed on a single host
49
50 This package contains cross-compiled libraries and development tools
51 for Windows.
52
53
54 %prep
55 %setup -q -n sqlite-%{version}
56 %patch1 -p1 -b .libdl
57 %patch2 -p1 -b .lemon-sprintf
58 %patch1000 -p1
59
60 # Ships with an old/broken version of libtool which cannot create
61 # Windows libraries properly.  So pull in the current version.
62 autoreconf
63 libtoolize --force
64
65
66 %build
67 # I think there's a bug in the configure script where, if
68 # cross-compiling, it cannot correctly determine the target executable
69 # extension (ie. .exe).  As a result it doesn't correctly detect that
70 # the target is Windows and so tries to use Unix-specific functions
71 # which don't exist.  In any case we can work around this by forcing
72 # the extension via this export.
73 #   - RWMJ 2008-09-30
74 export config_TARGET_EXEEXT=.exe
75
76 %{_mingw32_configure}
77 make
78
79
80 %install
81 rm -rf $RPM_BUILD_ROOT
82 make DESTDIR=$RPM_BUILD_ROOT install
83
84 # Remove static libraries but DON'T remove *.dll.a files.
85 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libsqlite3.a
86
87 chmod 0644 $RPM_BUILD_ROOT%{_mingw32_libdir}/libsqlite3.dll.a
88
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93
94 %files
95 %defattr(-,root,root)
96 %doc README VERSION
97 %{_mingw32_bindir}/sqlite3.exe
98 %{_mingw32_bindir}/libsqlite3-0.dll
99 %{_mingw32_libdir}/libsqlite3.dll.a
100 %{_mingw32_libdir}/libsqlite3.la
101 %{_mingw32_includedir}/sqlite3.h
102 %{_mingw32_includedir}/sqlite3ext.h
103 %{_mingw32_libdir}/pkgconfig/sqlite3.pc
104
105
106 %changelog
107 * Tue Dec 16 2008 Richard Jones <rjones@redhat.com> - 3.6.6.2-1
108 - New upstream release (to match Fedora native), 3.6.6.2.
109 - Replace patches with ones from native.
110 - Rebase -no-undefined patch.
111 - Remove spurious +x permissions on libsqlite3.dll.a.
112 - Requires pkgconfig.
113
114 * Sat Nov 22 2008 Richard Jones <rjones@redhat.com> - 3.5.9-3
115 - Rebuild against new readline.
116
117 * Fri Oct 31 2008 Richard Jones <rjones@redhat.com> - 3.5.9-2
118 - Rebuild against latest termcap.
119
120 * Thu Sep 25 2008 Richard Jones <rjones@redhat.com> - 3.5.9-1
121 - Initial RPM release.