%ifos aix6.1 || %ifos aix7.1 %global p7build 1 %else %global p7build 0 %endif %define realver 3320000 %define docrealver 3320000 Summary: Library that implements an embeddable SQL database engine Name: sqlite Version: 3.32.0 %if %{p7build} Release: 1.p7 %else Release: 1 %endif License: Public Domain Group: Applications/Databases URL: http://www.sqlite.org/ Source0: http://www.sqlite.org/%{name}-src-%{realver}.zip Source1: http://www.sqlite.org/%{name}-doc-%{docrealver}.zip # Support a system-wide lemon template Patch1: sqlite-3.6.23-lemon-system-template.patch # sqlite >= 3.7.10 is buggy if malloc_usable_size() is detected, disable it: # https://bugzilla.redhat.com/show_bug.cgi?id=801981 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=665363 Patch3: sqlite-3.12.2-no-malloc-usable-size.patch Obsoletes: sqlite3 sqlite3-devel BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: make, patch, unzip BuildRequires: readline-devel >= 7.0-4, zlib-devel >= 1.2.3-7 Requires: readline >= 7.0-4, zlib >= 1.2.3-7 %if %{p7build} %ifos aix6.1 Requires: AIX-rpm >= 6.1.8.0 %endif %ifos aix7.1 Requires: AIX-rpm >= 7.1.3.0 %endif %endif %description SQLite is a C library that implements an embeddable SQL database engine. Programs that link with the SQLite library can have SQL database access without running a separate RDBMS process. The distribution comes with a standalone command-line access program (sqlite) that can be used to administer an SQLite database and which serves as an example of how to use the SQLite library. The library is available as 32-bit and 64-bit. %package devel Summary: Header files and libraries for developing apps which will use sqlite. Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: pkg-config %description devel The sqlite-devel package contains the header files and libraries needed to develop programs that use the sqlite database library. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "xlc_r -q64" or "gcc -maix64". %package doc Summary: Documentation for sqlite Group: Documentation %description doc This package contains most of the static HTML files that comprise the www.sqlite.org website, including all of the SQL Syntax and the C/C++ interface specs and other miscellaneous documentation. %package -n lemon Summary: A parser generator Group: Development/Tools %description -n lemon Lemon is an LALR(1) parser generator for C or C++. It does the same job as bison and yacc. But lemon is not another bison or yacc clone. It uses a different grammar syntax which is designed to reduce the number of coding errors. Lemon also uses a more sophisticated parsing engine that is faster than yacc and bison and which is both reentrant and thread-safe. Furthermore, Lemon implements features that can be used to eliminate resource leaks, making is suitable for use in long-running programs such as graphical user interfaces or embedded controllers. # all this hoopla is required because RPM V3 (which we are stuck with on AIX) # does not understand ZIP archives as source files :-( %prep /usr/bin/rm -rf %{name}-src-%{realver} %{name}-doc-%{docrealver} unzip %{SOURCE0} unzip %{SOURCE1} %setup -T -D -n %{name}-src-%{realver} /usr/bin/mv ../%{name}-doc-%{docrealver}/* doc/ /usr/bin/rmdir ../%{name}-doc-%{docrealver} export PATH=/opt/freeware/bin:$PATH %patch1 -p1 %patch3 -p1 # remove cgi-script erroneously included in sqlite-doc-3150100 rm -f %{name}-doc-%{docrealver}/search %build # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" export RM="/usr/bin/rm -f" # first build the 64-bit version export CC="xlc_r -q64" ./configure \ --prefix=%{_prefix} \ --enable-shared --enable-static \ --disable-tcl \ --enable-threadsafe \ --enable-load-extension # "correct" Makefile cat Makefile | sed -e "s|THREADLIB|LIBPTHREAD|" > Makefile.tmp mv Makefile.tmp Makefile gmake %{?_smp_mflags} cp .libs/libsqlite3.so.0 . gmake distclean # now build the 32-bit version export CC="xlc_r" ./configure \ --prefix=%{_prefix} \ --enable-shared --enable-static \ --disable-tcl \ --enable-threadsafe \ --enable-load-extension # "correct" Makefile cat Makefile | sed -e "s|THREADLIB|LIBPTHREAD|" > Makefile.tmp mv Makefile.tmp Makefile gmake %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} gmake DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q ${RPM_BUILD_ROOT}%{_libdir}/libsqlite3.a ./libsqlite3.so.0 mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1/ cp sqlite3.1 ${RPM_BUILD_ROOT}%{_mandir}/man1 chmod 644 ${RPM_BUILD_ROOT}%{_mandir}/man1/* cp lemon ${RPM_BUILD_ROOT}%{_bindir}/ chmod 0755 ${RPM_BUILD_ROOT}%{_bindir}/lemon mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/lemon chmod 0755 ${RPM_BUILD_ROOT}%{_datadir}/lemon cp tool/lempar.c ${RPM_BUILD_ROOT}%{_datadir}/lemon/lempar.c chmod 0644 ${RPM_BUILD_ROOT}%{_datadir}/lemon/lempar.c # as we don't build with tcl strip the execute bit from %doc includes to avoid # unwanted dependencies on non-existing shell scripts chmod -x doc/search chmod -x doc/search.d/admin ( cd ${RPM_BUILD_ROOT} for dir in bin include lib do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc README.md %{_bindir}/sqlite3 %{_libdir}/*.a %{_mandir}/man?/* /usr/bin/sqlite3 /usr/lib/*.a %files devel %defattr(-,root,system) %{_includedir}/* %{_libdir}/*.la %{_libdir}/pkgconfig/*.pc /usr/include/* /usr/lib/*.la %files doc %defattr(-,root,system) %doc doc/* %files -n lemon %defattr(-,root,system) %{_bindir}/lemon %{_datadir}/lemon /usr/bin/lemon %changelog * Wed May 27 2020 Michael Perzl - 3.32.0-1 - updated to version 3.32.0 * Mon Feb 03 2020 Michael Perzl - 3.31.1-1 - updated to version 3.31.1 * Mon Feb 03 2020 Michael Perzl - 3.31.0-1 - updated to version 3.31.0 * Tue Nov 26 2019 Michael Perzl - 3.30.1-1 - updated to version 3.30.1 * Thu Oct 10 2019 Michael Perzl - 3.30.0-1 - updated to version 3.30.0 * Thu Jul 11 2019 Michael Perzl - 3.29.0-1 - updated to version 3.29.0 * Tue May 07 2019 Michael Perzl - 3.28.0-1 - updated to version 3.28.0 * Tue Feb 26 2019 Michael Perzl - 3.27.2-1 - updated to version 3.27.2 * Tue Feb 19 2019 Michael Perzl - 3.27.1-1 - updated to version 3.27.1 * Fri Feb 08 2019 Michael Perzl - 3.27.0-1 - updated to version 3.27.0 * Mon Dec 17 2018 Michael Perzl - 3.26.0-1 - updated to version 3.26.0 * Wed Nov 14 2018 Michael Perzl - 3.25.3-1 - updated to version 3.25.3 * Thu Oct 11 2018 Michael Perzl - 3.25.2-1 - updated to version 3.25.2 * Thu Oct 11 2018 Michael Perzl - 3.25.1-1 - updated to version 3.25.1 * Thu Oct 11 2018 Michael Perzl - 3.25.0-1 - updated to version 3.25.0 * Tue Jun 05 2018 Michael Perzl - 3.24.0-1 - updated to version 3.24.0 * Tue Jun 05 2018 Michael Perzl - 3.23.1-1 - updated to version 3.23.1 * Tue Jun 05 2018 Michael Perzl - 3.23.0-1 - updated to version 3.23.0 * Wed Feb 07 2018 Michael Perzl - 3.22.0-1 - updated to version 3.22.0 * Thu Oct 26 2017 Michael Perzl - 3.21.0-1 - updated to version 3.21.0 * Sun Sep 03 2017 Michael Perzl - 3.20.1-1 - updated to version 3.20.1 * Wed Aug 09 2017 Michael Perzl - 3.20.0-1 - updated to version 3.20.0 * Thu Jun 14 2017 Michael Perzl - 3.19.3-1 - updated to version 3.19.3 * Thu Jun 01 2017 Michael Perzl - 3.19.2-1 - updated to version 3.19.2 * Sun Apr 23 2017 Michael Perzl - 3.18.0-1 - updated to version 3.18.0 * Tue Feb 14 2017 Michael Perzl - 3.17.0-1 - updated to version 3.17.0 * Mon Jan 09 2017 Michael Perzl - 3.16.2-1 - updated to version 3.16.2 * Mon Jan 09 2017 Michael Perzl - 3.16.1-1 - updated to version 3.16.1 * Mon Jan 09 2017 Michael Perzl - 3.16.0-1 - updated to version 3.16.0 * Tue Nov 29 2016 Michael Perzl - 3.15.2-1 - updated to version 3.15.2 * Wed Nov 16 2016 Michael Perzl - 3.15.1-1 - updated to version 3.15.1 * Tue Oct 18 2016 Michael Perzl - 3.15.0-1 - updated to version 3.15.0 * Tue Sep 13 2016 Michael Perzl - 3.14.2-1 - updated to version 3.14.2 * Sun Aug 14 2016 Michael Perzl - 3.14.1-1 - updated to version 3.14.1 * Tue Aug 09 2016 Michael Perzl - 3.14.0-1 - updated to version 3.14.0 * Mon May 23 2016 Michael Perzl - 3.13.0-1 - updated to version 3.13.0 * Sun May 01 2016 Michael Perzl - 3.12.2-1 - updated to version 3.12.2 * Mon Apr 04 2016 Michael Perzl - 3.12.1-1 - updated to version 3.12.1 * Mon Apr 04 2016 Michael Perzl - 3.12.0-1 - updated to version 3.12.0 * Mon Mar 07 2016 Michael Perzl - 3.11.1.0-1 - updated to version 3.11.1.0 * Wed Dec 23 2015 Michael Perzl - 3.9.2.0-1 - updated to version 3.9.2.0 * Wed Dec 23 2015 Michael Perzl - 3.9.1.0-1 - updated to version 3.9.1.0 * Wed Dec 23 2015 Michael Perzl - 3.9.0.0-1 - updated to version 3.9.0.0 * Fri Jul 24 2015 Michael Perzl - 3.8.10.2-1 - updated to version 3.8.10.2 * Sat Mar 01 2015 Michael Perzl - 3.8.8.3-1 - updated to version 3.8.8.3 * Thu Feb 19 2015 Michael Perzl - 3.8.8.2-1 - updated to version 3.8.8.2 * Thu Feb 19 2015 Michael Perzl - 3.8.7.4-1 - updated to version 3.8.7.4 * Fri Nov 07 2014 Michael Perzl - 3.8.7.1-1 - updated to version 3.8.7.1 * Fri Aug 15 2014 Michael Perzl - 3.8.6-1 - updated to version 3.8.6 * Fri Aug 15 2014 Michael Perzl - 3.8.5-1 - updated to version 3.8.5 * Thu Mar 27 2014 Michael Perzl - 3.8.4.2-1 - updated to version 3.8.4.2 * Sun Feb 23 2014 Michael Perzl - 3.8.3.1-1 - updated to version 3.8.3.1 * Sun Feb 23 2014 Michael Perzl - 3.8.3-1 - updated to version 3.8.3 * Sun Nov 03 2013 Michael Perzl - 3.8.1-1 - updated to version 3.8.1 * Sun Nov 03 2013 Michael Perzl - 3.8.0.2-1 - updated to version 3.8.0.2 * Thu Jun 06 2013 Michael Perzl - 3.7.17-1 - updated to version 3.7.17 * Thu May 02 2013 Michael Perzl - 3.7.16.2-1 - updated to version 3.7.16.2 * Mon Mar 25 2013 Michael Perzl - 3.7.16-1 - updated to version 3.7.16 * Tue Jan 29 2013 Michael Perzl - 3.7.15.2-1 - updated to version 3.7.15.2 * Tue Jan 08 2013 Michael Perzl - 3.7.15.1-1 - updated to version 3.7.15.1 * Mon Dec 03 2012 Michael Perzl - 3.7.14.1-1 - updated to version 3.7.14.1 * Wed Sep 12 2012 Michael Perzl - 3.7.14-1 - updated to version 3.7.14 * Tue Jun 12 2012 Michael Perzl - 3.7.13-1 - updated to version 3.7.13 * Sun Apr 15 2012 Michael Perzl - 3.7.11-1 - updated to version 3.7.11 * Thu Nov 24 2011 Michael Perzl - 3.7.9-1 - updated to version 3.7.9 * Thu Sep 22 2011 Michael Perzl - 3.7.8-1 - updated to version 3.7.8 * Thu Jun 30 2011 Michael Perzl - 3.7.7.1-1 - updated to version 3.7.7.1 * Thu May 26 2011 Michael Perzl - 3.7.6.3-1 - updated to version 3.7.6.3 * Wed Apr 27 2011 Michael Perzl - 3.7.6.2-1 - updated to version 3.7.6.2 * Tue Feb 22 2011 Michael Perzl - 3.7.5-1 - updated to version 3.7.5 - added separate 'lemon' and 'doc' packages * Tue Oct 19 2010 Michael Perzl - 3.7.3-1 - updated to version 3.7.3 * Thu Aug 26 2010 Michael Perzl - 3.7.2-1 - updated to version 3.7.2 * Tue Aug 10 2010 Michael Perzl - 3.7.0.1-1 - updated to version 3.7.0.1 * Fri Jul 23 2010 Michael Perzl - 3.7.0-1 - updated to version 3.7.0 * Mon Apr 26 2010 Michael Perzl - 3.6.23.1-1 - updated to version 3.6.23.1 * Tue Mar 23 2010 Michael Perzl - 3.6.23-1 - updated to version 3.6.23 * Tue Jan 19 2010 Michael Perzl - 3.6.22-1 - updated to version 3.6.22 * Thu Dec 17 2009 Michael Perzl - 3.6.21-1 - updated to version 3.6.21 * Tue Nov 17 2009 Michael Perzl - 3.6.20-1 - updated to version 3.6.20 * Wed Aug 26 2009 Michael Perzl - 3.6.17-1 - updated to version 3.6.17 * Mon Apr 20 2009 Michael Perzl - 3.6.13-1 - updated to version 3.6.13 * Tue Feb 17 2009 Michael Perzl - 3.6.10-1 - updated to version 3.6.10 * Tue Jan 13 2009 Michael Perzl - 3.6.8-1 - updated to version 3.6.8 * Thu Oct 23 2008 Michael Perzl - 3.6.4-1 - updated to version 3.6.4 * Thu Aug 14 2008 Michael Perzl - 3.6.1-1 - updated to version 3.6.1 * Mon May 19 2008 Michael Perzl - 3.5.9-1 - updated to version 3.5.9 * Wed Apr 23 2008 Michael Perzl - 3.5.8-1 - updated to version 3.5.8 * Tue Apr 01 2008 Michael Perzl - 3.5.6-3 - linked against new version of readline * Fri Mar 28 2008 Michael Perzl - 3.5.6-2 - corrected some SPEC file errors * Fri Feb 22 2008 Michael Perzl - 3.5.6-1 - updated to version 3.5.6 * Thu Jan 03 2008 Michael Perzl - 3.5.4-2 - included both 32-bit and 64-bit shared objects * Tue Dec 18 2007 Michael Perzl - 3.5.4-1 - First version for AIX5L v5.1 and higher