1 |
%define realname sqlite |
2 |
|
3 |
%define major 0 |
4 |
%define libname %mklibname %{name}_ %{major} |
5 |
%define develname %mklibname %{name} -d |
6 |
%define staticdevelname %mklibname %{name} -d -s |
7 |
|
8 |
Summary: C library that implements an embeddable SQL database engine |
9 |
Name: sqlite3 |
10 |
Version: 3.7.3 |
11 |
Release: %mkrel 2 |
12 |
License: Public Domain |
13 |
Group: System/Libraries |
14 |
URL: http://www.sqlite.org/ |
15 |
Source0: http://www.sqlite.org/%{realname}-%{version}.tar.gz |
16 |
Patch0: sqlite-3.6.18-bookmarks.patch |
17 |
Patch1: sqlite-3.7.0.1-link-dl.patch |
18 |
BuildRequires: chrpath |
19 |
BuildRequires: ncurses-devel |
20 |
BuildRequires: readline-devel |
21 |
BuildRequires: tcl-devel |
22 |
BuildRequires: tcl |
23 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
24 |
|
25 |
%description |
26 |
SQLite is a C library that implements an embeddable SQL database |
27 |
engine. Programs that link with the SQLite library can have SQL |
28 |
database access without running a separate RDBMS process. The |
29 |
distribution comes with a standalone command-line access program |
30 |
(sqlite) that can be used to administer an SQLite database and |
31 |
which serves as an example of how to use the SQLite library. |
32 |
|
33 |
%package -n %{libname} |
34 |
Summary: C library that implements an embeddable SQL database engine |
35 |
Group: System/Libraries |
36 |
|
37 |
%description -n %{libname} |
38 |
SQLite is a C library that implements an embeddable SQL database |
39 |
engine. Programs that link with the SQLite library can have SQL |
40 |
database access without running a separate RDBMS process. The |
41 |
distribution comes with a standalone command-line access program |
42 |
(sqlite) that can be used to administer an SQLite database and |
43 |
which serves as an example of how to use the SQLite library. |
44 |
|
45 |
This package contains the shared libraries for %{name} |
46 |
|
47 |
%package -n %{develname} |
48 |
Summary: Development library and header files for the %{name} library |
49 |
Group: Development/C |
50 |
Requires: %{libname} = %{version}-%{release} |
51 |
Provides: lib%{name}-devel = %{version}-%{release} |
52 |
Provides: %{name}-devel = %{version}-%{release} |
53 |
Obsoletes: %mklibname %{name}_ %{major} -d |
54 |
|
55 |
%description -n %{develname} |
56 |
SQLite is a C library that implements an embeddable SQL database |
57 |
engine. Programs that link with the SQLite library can have SQL |
58 |
database access without running a separate RDBMS process. The |
59 |
distribution comes with a standalone command-line access program |
60 |
(sqlite) that can be used to administer an SQLite database and |
61 |
which serves as an example of how to use the SQLite library. |
62 |
|
63 |
This package contains the static %{libname} library and its header |
64 |
files. |
65 |
|
66 |
%package -n %{staticdevelname} |
67 |
Summary: Static development library for the %{name} library |
68 |
Group: Development/C |
69 |
Requires: %{develname} = %{version}-%{release} |
70 |
Provides: lib%{name}-static-devel = %{version}-%{release} |
71 |
Provides: %{name}-static-devel = %{version}-%{release} |
72 |
Obsoletes: %mklibname %{name}_ %{major} -d -s |
73 |
|
74 |
%description -n %{staticdevelname} |
75 |
SQLite is a C library that implements an embeddable SQL database |
76 |
engine. Programs that link with the SQLite library can have SQL |
77 |
database access without running a separate RDBMS process. The |
78 |
distribution comes with a standalone command-line access program |
79 |
(sqlite) that can be used to administer an SQLite database and |
80 |
which serves as an example of how to use the SQLite library. |
81 |
|
82 |
This package contains the static %{libname} library. |
83 |
|
84 |
%package tools |
85 |
Summary: Command line tools for managing the %{libname} library |
86 |
Group: Databases |
87 |
Requires: %{libname} = %{version}-%{release} |
88 |
|
89 |
%description tools |
90 |
SQLite is a C library that implements an embeddable SQL database |
91 |
engine. Programs that link with the SQLite library can have SQL |
92 |
database access without running a separate RDBMS process. The |
93 |
distribution comes with a standalone command-line access program |
94 |
(sqlite) that can be used to administer an SQLite database and |
95 |
which serves as an example of how to use the SQLite library. |
96 |
|
97 |
This package contains command line tools for managing the |
98 |
%{libname} library. |
99 |
|
100 |
%package -n tcl-%{name} |
101 |
Summary: Tcl binding for %{name} |
102 |
Group: Databases |
103 |
Provides: %{name}-tcl |
104 |
Requires: %{libname} = %{version}-%{release} |
105 |
|
106 |
%description -n tcl-%{name} |
107 |
SQLite is a C library that implements an embeddable SQL database |
108 |
engine. Programs that link with the SQLite library can have SQL |
109 |
database access without running a separate RDBMS process. The |
110 |
distribution comes with a standalone command-line access program |
111 |
(sqlite) that can be used to administer an SQLite database and |
112 |
which serves as an example of how to use the SQLite library. |
113 |
|
114 |
This package contains tcl binding for %{name}. |
115 |
|
116 |
%package -n lemon |
117 |
Summary: The Lemon Parser Generator |
118 |
Group: Development/Other |
119 |
|
120 |
%description -n lemon |
121 |
Lemon is an LALR(1) parser generator for C or C++. It does the same job as |
122 |
bison and yacc. But lemon is not another bison or yacc clone. It uses a |
123 |
different grammar syntax which is designed to reduce the number of coding |
124 |
errors. Lemon also uses a more sophisticated parsing engine that is faster than |
125 |
yacc and bison and which is both reentrant and thread-safe. Furthermore, Lemon |
126 |
implements features that can be used to eliminate resource leaks, making is |
127 |
suitable for use in long-running programs such as graphical user interfaces or |
128 |
embedded controllers. |
129 |
|
130 |
%prep |
131 |
%setup -q -n %{realname}-%{version} |
132 |
%patch0 -p1 |
133 |
%patch1 -p1 |
134 |
|
135 |
%build |
136 |
%serverbuild |
137 |
|
138 |
export CFLAGS="${CFLAGS:-%optflags} -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1 -Wall -DNDEBUG=1 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1" |
139 |
|
140 |
#(tpg) needed for patch1 |
141 |
autoreconf -fi |
142 |
|
143 |
%configure2_5x \ |
144 |
--enable-threadsafe \ |
145 |
--enable-threads-override-locks \ |
146 |
--enable-load-extension |
147 |
|
148 |
%make |
149 |
|
150 |
make doc |
151 |
|
152 |
%check |
153 |
# Disabled in 3.6.16 because of http://www.sqlite.org/cvstrac/tktview?tn=3951,39 |
154 |
#make test |
155 |
|
156 |
%install |
157 |
rm -rf %{buildroot} |
158 |
|
159 |
install -d %{buildroot}%{_bindir} |
160 |
install -d %{buildroot}%{_includedir} |
161 |
install -d %{buildroot}%{_libdir} |
162 |
install -d %{buildroot}%{_mandir}/man1 |
163 |
|
164 |
%makeinstall_std |
165 |
|
166 |
install -m644 sqlite3.1 %{buildroot}%{_mandir}/man1/%name.1 |
167 |
|
168 |
install -m0755 lemon %{buildroot}%{_bindir}/ |
169 |
|
170 |
chrpath -d %{buildroot}%{_bindir}/* |
171 |
|
172 |
%clean |
173 |
rm -rf %{buildroot} |
174 |
|
175 |
%files -n %{libname} |
176 |
%defattr(-,root,root) |
177 |
%{_libdir}/lib*.so.%{major}* |
178 |
|
179 |
%files -n %{develname} |
180 |
%defattr(-,root,root) |
181 |
%attr(0644,root,root) %{_includedir}/*.h |
182 |
%{_libdir}/lib*.la |
183 |
%{_libdir}/lib*.so |
184 |
%attr(0644,root,root) %{_libdir}/pkgconfig/*.pc |
185 |
|
186 |
%files -n %{staticdevelname} |
187 |
%defattr(-,root,root) |
188 |
%{_libdir}/lib*.a |
189 |
|
190 |
%files tools |
191 |
%defattr(-,root,root) |
192 |
%{_bindir}/sqlite3 |
193 |
%{_mandir}/man1/* |
194 |
|
195 |
%files -n tcl-%{name} |
196 |
%defattr(-,root,root) |
197 |
%{tcl_sitelib}/sqlite3 |
198 |
|
199 |
%files -n lemon |
200 |
%defattr(-,root,root) |
201 |
%doc lempar.c |
202 |
%{_bindir}/lemon |
203 |
|
204 |
|