Added win64 support
This commit is contained in:
parent
64652309f8
commit
70cf12832e
@ -1,6 +1,4 @@
|
|||||||
%global __strip %{mingw32_strip}
|
%?mingw_package_header
|
||||||
%global __objdump %{mingw32_objdump}
|
|
||||||
%define __debug_install_post %{mingw32_debug_install_post}
|
|
||||||
|
|
||||||
%global name1 sqlite
|
%global name1 sqlite
|
||||||
|
|
||||||
@ -11,9 +9,12 @@
|
|||||||
%bcond_with tcl
|
%bcond_with tcl
|
||||||
%global tclversion 8.5
|
%global tclversion 8.5
|
||||||
|
|
||||||
|
%global mingw_build_win32 1
|
||||||
|
%global mingw_build_win64 1
|
||||||
|
|
||||||
Name: mingw-%{name1}
|
Name: mingw-%{name1}
|
||||||
Version: %{rpmver}
|
Version: %{rpmver}
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: MinGW Windows port of sqlite embeddable SQL database engine
|
Summary: MinGW Windows port of sqlite embeddable SQL database engine
|
||||||
|
|
||||||
License: Public Domain
|
License: Public Domain
|
||||||
@ -32,13 +33,20 @@ Patch2: sqlite-3.7.7.1-stupid-openfiles-test.patch
|
|||||||
# Patches for MinGW port.
|
# Patches for MinGW port.
|
||||||
Patch1000: mingw32-sqlite-3.7.9-no-undefined.patch
|
Patch1000: mingw32-sqlite-3.7.9-no-undefined.patch
|
||||||
|
|
||||||
BuildRequires: mingw32-filesystem
|
BuildRequires: mingw32-filesystem >= 95
|
||||||
BuildRequires: mingw32-gcc
|
BuildRequires: mingw32-gcc
|
||||||
BuildRequires: mingw32-binutils
|
BuildRequires: mingw32-binutils
|
||||||
|
|
||||||
BuildRequires: mingw32-pdcurses
|
BuildRequires: mingw32-pdcurses
|
||||||
BuildRequires: mingw32-readline
|
BuildRequires: mingw32-readline
|
||||||
BuildRequires: mingw32-termcap >= 1.3.1-3
|
BuildRequires: mingw32-termcap
|
||||||
|
|
||||||
|
BuildRequires: mingw64-filesystem >= 95
|
||||||
|
BuildRequires: mingw64-gcc
|
||||||
|
BuildRequires: mingw64-binutils
|
||||||
|
#BuildRequires: mingw64-pdcurses
|
||||||
|
BuildRequires: mingw64-readline
|
||||||
|
BuildRequires: mingw64-termcap
|
||||||
|
|
||||||
|
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
@ -63,6 +71,7 @@ This package contains cross-compiled libraries and development tools
|
|||||||
for Windows.
|
for Windows.
|
||||||
|
|
||||||
|
|
||||||
|
# Win32
|
||||||
%package -n mingw32-%{name1}
|
%package -n mingw32-%{name1}
|
||||||
Summary: MinGW Windows port of sqlite embeddable SQL database engine
|
Summary: MinGW Windows port of sqlite embeddable SQL database engine
|
||||||
Requires: pkgconfig
|
Requires: pkgconfig
|
||||||
@ -79,7 +88,6 @@ are named to permit each to be installed on a single host
|
|||||||
This package contains cross-compiled libraries and development tools
|
This package contains cross-compiled libraries and development tools
|
||||||
for Windows.
|
for Windows.
|
||||||
|
|
||||||
|
|
||||||
%package -n mingw32-%{name1}-static
|
%package -n mingw32-%{name1}-static
|
||||||
Summary: Static version of MinGW Windows port of sqlite library
|
Summary: Static version of MinGW Windows port of sqlite library
|
||||||
Requires: mingw32-%{name1} = %{version}-%{release}
|
Requires: mingw32-%{name1} = %{version}-%{release}
|
||||||
@ -96,8 +104,41 @@ are named to permit each to be installed on a single host
|
|||||||
|
|
||||||
This package contains static cross-compiled library
|
This package contains static cross-compiled library
|
||||||
|
|
||||||
|
# Win64
|
||||||
|
%package -n mingw64-%{name1}
|
||||||
|
Summary: MinGW Windows port of sqlite embeddable SQL database engine
|
||||||
|
Requires: pkgconfig
|
||||||
|
|
||||||
%{?mingw32_debug_package}
|
%description -n mingw64-%{name1}
|
||||||
|
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.
|
||||||
|
|
||||||
|
%package -n mingw64-%{name1}-static
|
||||||
|
Summary: Static version of MinGW Windows port of sqlite library
|
||||||
|
Requires: mingw64-%{name1} = %{version}-%{release}
|
||||||
|
Group: Development/Libraries
|
||||||
|
|
||||||
|
%description -n mingw64-%{name1}-static
|
||||||
|
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 static cross-compiled library
|
||||||
|
|
||||||
|
|
||||||
|
%?mingw_debug_package
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
@ -123,35 +164,44 @@ libtoolize --force
|
|||||||
export config_TARGET_EXEEXT=.exe
|
export config_TARGET_EXEEXT=.exe
|
||||||
# add compile flags to enable rtree, fts3
|
# add compile flags to enable rtree, fts3
|
||||||
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"
|
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"
|
||||||
|
export MINGW64_CFLAGS="%{mingw64_cflags} -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1 -fno-strict-aliasing"
|
||||||
|
|
||||||
%{mingw32_configure} %{!?with_tcl:--disable-tcl} \
|
%mingw_configure %{!?with_tcl:--disable-tcl} --enable-threadsafe --enable-threads-override-locks --enable-load-extension
|
||||||
--enable-threadsafe \
|
|
||||||
--enable-threads-override-locks \
|
|
||||||
--enable-load-extension
|
|
||||||
|
|
||||||
# -lc hack
|
# -lc hack
|
||||||
|
for i in build_win32 build_win64 ; do
|
||||||
|
pushd $i
|
||||||
sed -e s,build_libtool_need_lc=yes,build_libtool_need_lc=no, < libtool > libtool.x
|
sed -e s,build_libtool_need_lc=yes,build_libtool_need_lc=no, < libtool > libtool.x
|
||||||
mv libtool.x libtool
|
mv libtool.x libtool
|
||||||
chmod a+x libtool
|
chmod a+x libtool
|
||||||
|
popd
|
||||||
|
done
|
||||||
|
|
||||||
make
|
%mingw_make %{?_smp_mflags}
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
%mingw_make_install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
chmod 0644 $RPM_BUILD_ROOT%{mingw32_libdir}/libsqlite3.dll.a
|
chmod 0644 $RPM_BUILD_ROOT%{mingw32_libdir}/libsqlite3.dll.a
|
||||||
|
chmod 0644 $RPM_BUILD_ROOT%{mingw64_libdir}/libsqlite3.dll.a
|
||||||
|
|
||||||
mv $RPM_BUILD_ROOT%{mingw32_libdir}/libsqlite3-0.dll $RPM_BUILD_ROOT%{mingw32_bindir}/
|
mv $RPM_BUILD_ROOT%{mingw32_libdir}/libsqlite3-0.dll $RPM_BUILD_ROOT%{mingw32_bindir}/
|
||||||
|
mv $RPM_BUILD_ROOT%{mingw64_libdir}/libsqlite3-0.dll $RPM_BUILD_ROOT%{mingw64_bindir}/
|
||||||
|
|
||||||
%if %{with tcl}
|
%if %{with tcl}
|
||||||
install -d -m755 $RPM_BUILD_ROOT%{mingw32_datadir}/tcl%{tclversion}/sqlite3/
|
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/
|
mv $RPM_BUILD_ROOT%{_datadir}/tcl%{tclversion}/sqlite3/pkgIndex.tcl $RPM_BUILD_ROOT%{mingw32_datadir}/tcl%{tclversion}/sqlite3/
|
||||||
|
|
||||||
|
install -d -m755 $RPM_BUILD_ROOT%{mingw64_datadir}/tcl%{tclversion}/sqlite3/
|
||||||
|
mv $RPM_BUILD_ROOT%{_datadir}/tcl%{tclversion}/sqlite3/pkgIndex.tcl $RPM_BUILD_ROOT%{mingw64_datadir}/tcl%{tclversion}/sqlite3/
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Drop all .la files
|
# Drop all .la files
|
||||||
find $RPM_BUILD_ROOT -name "*.la" -delete
|
find $RPM_BUILD_ROOT -name "*.la" -delete
|
||||||
|
|
||||||
|
|
||||||
|
# Win32
|
||||||
%files -n mingw32-%{name1}
|
%files -n mingw32-%{name1}
|
||||||
%doc README VERSION
|
%doc README VERSION
|
||||||
%{mingw32_bindir}/sqlite3.exe
|
%{mingw32_bindir}/sqlite3.exe
|
||||||
@ -168,7 +218,28 @@ find $RPM_BUILD_ROOT -name "*.la" -delete
|
|||||||
%files -n mingw32-%{name1}-static
|
%files -n mingw32-%{name1}-static
|
||||||
%{mingw32_libdir}/libsqlite3.a
|
%{mingw32_libdir}/libsqlite3.a
|
||||||
|
|
||||||
|
# Win64
|
||||||
|
%files -n mingw64-%{name1}
|
||||||
|
%doc README VERSION
|
||||||
|
%{mingw64_bindir}/sqlite3.exe
|
||||||
|
%{mingw64_bindir}/libsqlite3-0.dll
|
||||||
|
%{mingw64_libdir}/libsqlite3.dll.a
|
||||||
|
%{mingw64_includedir}/sqlite3.h
|
||||||
|
%{mingw64_includedir}/sqlite3ext.h
|
||||||
|
%{mingw64_libdir}/pkgconfig/sqlite3.pc
|
||||||
|
%if %{with tcl}
|
||||||
|
%{mingw64_datadir}/tcl%{tclversion}/sqlite3/
|
||||||
|
%{mingw64_datadir}/tcl%{tclversion}/sqlite3/pkgIndex.tcl
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files -n mingw64-%{name1}-static
|
||||||
|
%{mingw64_libdir}/libsqlite3.a
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Mar 10 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 3.7.9-5
|
||||||
|
- Added win64 support
|
||||||
|
|
||||||
* Fri Mar 09 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 3.7.9-4
|
* Fri Mar 09 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 3.7.9-4
|
||||||
- Dropped .la files
|
- Dropped .la files
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user