source: rtems-source-builder/source-builder/config/sqlite-3-1.cfg @ f07d2b6

5
Last change on this file since f07d2b6 was 712516a, checked in by Chris Johns <chrisj@…>, on 01/28/15 at 10:42:46

Add Sqlite as a 3rd party package.

Thanks to Wendell P Silva for the excellent Wiki page.

  • Property mode set to 100644
File size: 1.8 KB
Line 
1#
2# Sqlite 3.x.x.x Version 1.
3#
4# This configuration file configure's, make's and install's Sqlite
5#
6
7%if %{release} == %{nil}
8%define release 1
9%endif
10
11Name:      sqlite-%{sqlite_version}-%{_host}-%{release}
12Summary:   SQLite is an in-process library that implements a
13           self-contained, serverless, zero-configuration,
14           transactional SQL database engine.
15Version:   %{sqlite_version}
16Release:   %{release}
17URL:       http://www.sqlite.org/
18BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
19
20#
21# Sqlite Source
22#
23%source set sqlite http://www.sqlite.org/%{sqlite_src_year}/sqlite-src-%{sqlite_src_version}.zip
24
25#
26# Prepare the source code.
27#
28%prep
29  build_top=$(pwd)
30
31  source_dir_sqlite="sqlite-src-%{sqlite_src_version}"
32  %source setup sqlite -q -n sqlite-src-%{sqlite_src_version}
33  %patch setup sqlite -p1
34
35  cd ${build_top}
36
37%build
38  build_top=$(pwd)
39
40  %{build_directory}
41
42  mkdir -p ${build_dir}
43  cd ${build_dir}
44
45  %{host_build_flags}
46
47  CFLAGS="${CFLAGS} -DSQLITE_OMIT_WAL=1 -DSQLITE_ENABLE_COLUMN_METADATA=1"
48
49  ../${source_dir_sqlite}/configure \
50    --host=%{_host} \
51    --prefix=%{_prefix} \
52    --bindir=%{_bindir} \
53    --exec_prefix=%{_exec_prefix} \
54    --includedir=%{_includedir} \
55    --libdir=%{_libdir} \
56    --libexecdir=%{_libexecdir} \
57    --mandir=%{_mandir} \
58    --infodir=%{_infodir} \
59    --datadir=%{_datadir} \
60    --disable-largefile \
61    --disable-tcl \
62    --disable-readline \
63    --disable-amalgamation
64
65  %{__make} %{?_smp_mflags} sqlite3.h libsqlite3.la
66
67  #
68  # Create the sqlite shell executable so the install works.
69  #
70  touch sqlite3
71
72  cd ${build_top}
73
74%install
75  build_top=$(pwd)
76
77  %{__rmdir} $SB_BUILD_ROOT
78
79  cd ${build_dir}
80  %{__make} DESTDIR=$SB_BUILD_ROOT install
81  cd ${build_top}
82
83  #
84  # Remove the sqlite shell as it is just a touch.
85  #
86  %{__rm} $SB_BUILD_ROOT%{_bindir}/sqlite3
Note: See TracBrowser for help on using the repository browser.