/[packages]/cauldron/sqlite3/current/SPECS/sqlite3.spec
ViewVC logotype

Contents of /cauldron/sqlite3/current/SPECS/sqlite3.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1391960 - (show annotations) (download)
Wed Apr 17 12:17:52 2019 UTC (5 years ago) by kekepower
File size: 8804 byte(s)
- Update to version 3.28.0

1 # bcond default logic is nicely backwards...
2 %bcond_without tcl
3 %bcond_with check
4
5 %define realname sqlite
6 %define realver 3280000
7 %define docver 3280000
8 %define rpmver 3.28.0
9
10 %define major 0
11 %define libname %mklibname %{name}_ %{major}
12 %define develname %mklibname %{name} -d
13 %define staticdevelname %mklibname %{name} -d -s
14
15 Summary: C library that implements an embeddable SQL database engine
16 Name: sqlite3
17 Version: %{rpmver}
18 Release: %mkrel 1
19 License: Public Domain
20 Group: System/Libraries
21 URL: http://www.sqlite.org/
22 Source0: http://www.sqlite.org/2019/sqlite-src-%{realver}.zip
23 Source1: http://www.sqlite.org/2019/sqlite-doc-%{docver}.zip
24 # Support a system-wide lemon template
25 Patch1: sqlite-3.6.23-lemon-system-template.patch
26 # Shut up stupid tests depending on system settings of allowed open fd's
27 Patch2: sqlite-3.7.7.1-stupid-openfiles-test.patch
28 # sqlite >= 3.7.10 is buggy if malloc_usable_size() is detected, disable it:
29 # https://bugzilla.redhat.com/show_bug.cgi?id=801981
30 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=665363
31 Patch3: sqlite-3.12.2-no-malloc-usable-size.patch
32 # Temporary workaround for failed percentile test, see patch for details
33 Patch4: sqlite-3.8.0-percentile-test.patch
34 # Disable test failing due to tcl regression. Details in patch file.
35 #Patch6: sqlite-3.8.10.1-tcl-regress-tests.patch
36 # Disable test date-2.2c on i686
37 Patch7: sqlite-3.16-datetest-2.2c.patch
38 # Modify sync2.test to pass with DIRSYNC turned off
39 Patch8: sqlite-3.18.0-sync2-dirsync.patch
40 BuildRequires: pkgconfig(ncurses)
41 BuildRequires: readline-devel
42 BuildRequires: glibc-devel
43 # libdl patch needs
44 BuildRequires: autoconf
45 BuildRequires: chrpath
46 BuildRequires: pkgconfig(ncurses)
47 BuildRequires: readline-devel
48 BuildRequires: icu-devel
49 %if %{with tcl}
50 BuildRequires: tcl
51 BuildRequires: pkgconfig(tcl)
52 %{!?tcl_version: %global tcl_version 8.5.10}
53 %{!?tcl_sitearch: %global tcl_sitearch %{_libdir}/tcl%{tcl_version}}
54 %endif
55
56 %description
57 SQLite is a C library that implements an embeddable SQL database
58 engine. Programs that link with the SQLite library can have SQL
59 database access without running a separate RDBMS process. The
60 distribution comes with a standalone command-line access program
61 (sqlite) that can be used to administer an SQLite database and
62 which serves as an example of how to use the SQLite library.
63
64
65 %package -n %{libname}
66 Summary: C library that implements an embeddable SQL database engine
67 Group: System/Libraries
68
69 %description -n %{libname}
70 SQLite is a C library that implements an embeddable SQL database
71 engine. Programs that link with the SQLite library can have SQL
72 database access without running a separate RDBMS process. The
73 distribution comes with a standalone command-line access program
74 (sqlite) that can be used to administer an SQLite database and
75 which serves as an example of how to use the SQLite library.
76
77 This package contains the shared libraries for %{name}
78
79
80 %package -n %{develname}
81 Summary: Development library and header files for the %{name} library
82 Group: Development/C
83 Requires: %{libname} = %{version}-%{release}
84 Provides: lib%{name}-devel = %{version}-%{release}
85 Provides: %{name}-devel = %{version}-%{release}
86 Obsoletes: %mklibname %{name}_ %{major} -d
87
88 %description -n %{develname}
89 SQLite is a C library that implements an embeddable SQL database
90 engine. Programs that link with the SQLite library can have SQL
91 database access without running a separate RDBMS process. The
92 distribution comes with a standalone command-line access program
93 (sqlite) that can be used to administer an SQLite database and
94 which serves as an example of how to use the SQLite library.
95
96 This package contains the static %{libname} library and its header
97 files.
98
99
100 %package -n %{staticdevelname}
101 Summary: Static development library for the %{name} library
102 Group: Development/C
103 Requires: %{develname} = %{version}-%{release}
104 Provides: lib%{name}-static-devel = %{version}-%{release}
105 Provides: %{name}-static-devel = %{version}-%{release}
106 Obsoletes: %mklibname %{name}_ %{major} -d -s
107
108 %description -n %{staticdevelname}
109 SQLite is a C library that implements an embeddable SQL database
110 engine. Programs that link with the SQLite library can have SQL
111 database access without running a separate RDBMS process. The
112 distribution comes with a standalone command-line access program
113 (sqlite) that can be used to administer an SQLite database and
114 which serves as an example of how to use the SQLite library.
115
116 This package contains the static %{libname} library.
117
118
119 %package tools
120 Summary: Command line tools for managing the %{libname} library
121 Group: Databases
122 Requires: %{libname} = %{version}-%{release}
123
124 %description tools
125 SQLite is a C library that implements an embeddable SQL database
126 engine. Programs that link with the SQLite library can have SQL
127 database access without running a separate RDBMS process. The
128 distribution comes with a standalone command-line access program
129 (sqlite) that can be used to administer an SQLite database and
130 which serves as an example of how to use the SQLite library.
131
132 This package contains command line tools for managing the
133 %{libname} library.
134
135
136 %package -n lemon
137 Summary: A parser generator
138 Group: Databases
139
140 %description -n lemon
141 Lemon is an LALR(1) parser generator for C or C++. It does the same
142 job as bison and yacc. But lemon is not another bison or yacc
143 clone. It uses a different grammar syntax which is designed to reduce
144 the number of coding errors. Lemon also uses a more sophisticated
145 parsing engine that is faster than yacc and bison and which is both
146 reentrant and thread-safe. Furthermore, Lemon implements features
147 that can be used to eliminate resource leaks, making is suitable for
148 use in long-running programs such as graphical user interfaces or
149 embedded controllers.
150
151
152 %if %{with tcl}
153 %package tcl
154 Summary: Tcl module for the sqlite3 embeddable SQL database engine
155 Group: Development/Other
156 Requires: %{name}-tools = %{version}-%{release}
157 Requires: tcl >= 1:%{tcl_version}
158 Obsoletes: tcl-sqlite3 < %{version}
159 Provides: tcl-sqlite3 = %{version}-%{release}
160
161 %description tcl
162 This package contains the tcl modules for %{name}.
163 %endif
164
165
166 %prep
167 %setup -q -a1 -n %{realname}-src-%{realver}
168 %patch1 -p1 -b .lemon-system-template
169 %patch2 -p1
170 %patch3 -p1
171 %patch4 -p1
172 #patch6 -p1
173 %ifarch %{ix86}
174 %patch7 -p1
175 %endif
176 %patch8 -p1
177
178 %build
179 autoreconf -fi
180
181 # recognize aarch64
182 cp -af %{_usr}/lib/rpm/config.{guess,sub} .
183
184 export CFLAGS="%{optflags} -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1 -DSQLITE_ENABLE_ICU=1 -Wall -fno-strict-aliasing"
185 export LDFLAGS="%{ldflags} `icu-config --ldflags`"
186
187 # (ovitters) tracker mandates --enable-fts5
188 %configure2_5x %{!?with_tcl:--disable-tcl} \
189 --enable-threadsafe \
190 --enable-load-extension \
191 --enable-fts5 \
192 %{?with_tcl:TCLLIBDIR=%{tcl_sitearch}/sqlite3}
193 # Quoting from an E-mail from Richard Hipp:
194 # <<<
195 # As best I can tell, this appears to be a bug in MALLOC_CHECK_ in that it
196 # does not play well with malloc_usable_size(). There does not appear to be
197 # anything wrong with SQLite in this respect, at least as not as far as I can
198 # see.
199 # If you edit the "config.h" file generated by the ./configure script and
200 # remove the HAVE_MALLOC_USABLE_SIZE define, then the resulting SQLite will
201 # not attempt to use malloc_usable_size() and it then appears to work fine
202 # with MALLOC_CHECK_.
203 # >>>
204 # So we are removing this.
205 sed -i '/HAVE_MALLOC_USABLE_SIZE/d' config.h
206
207 # rpath removal
208 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
209 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
210 %make_build
211
212 %install
213 install -d %{buildroot}%{_bindir}
214 install -d %{buildroot}%{_includedir}
215 install -d %{buildroot}%{_libdir}
216 install -d %{buildroot}%{_mandir}/man1
217
218 %__make DESTDIR=%{buildroot} install
219
220 install -D -m0644 sqlite3.1 %{buildroot}/%{_mandir}/man1/sqlite3.1
221 install -D -m0755 lemon %{buildroot}/%{_bindir}/lemon
222 install -D -m0644 tool/lempar.c %{buildroot}/%{_datadir}/lemon/lempar.c
223
224 %if %{with tcl}
225 # fix up permissions to enable dep extraction
226 chmod 0755 %{buildroot}/%{tcl_sitearch}/sqlite3/*.so
227 %endif
228
229 %makeinstall_std
230
231 rm -f %{buildroot}%{_libdir}/*.la
232
233 chrpath -d %{buildroot}%{_bindir}/*
234
235 %if %{with check}
236 %check
237 make test
238 %endif
239
240 %files -n %{libname}
241 %{_libdir}/lib*.so.%{major}{,.*}
242
243 %files -n %{develname}
244 %attr(0644,root,root) %{_includedir}/*.h
245 %{_libdir}/lib*.so
246 %attr(0644,root,root) %{_libdir}/pkgconfig/*.pc
247
248 %files -n %{staticdevelname}
249 %{_libdir}/lib*.a
250
251 %files tools
252 %{_bindir}/sqlite3
253 %{_mandir}/man1/*
254
255 %files -n lemon
256 %{_bindir}/lemon
257 %{_datadir}/lemon
258
259 %if %{with tcl}
260 %files tcl
261 %{tcl_sitearch}/sqlite3
262 %endif

  ViewVC Help
Powered by ViewVC 1.1.30