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