%ifos aix6.1 || %ifos aix7.1 %global p7build 1 %else %global p7build 0 %endif %define realver 3140200 %define docrealver 3140200 Summary: Library that implements an embeddable SQL database engine Name: sqlite Version: 3.14.2 %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 Patch0: %{name}-%{version}-aix.patch # Support a system-wide lemon template Patch1: sqlite-3.6.23-lemon-system-template.patch Patch2: sqlite-3.8.8.2-stupid-openfiles-test.patch Obsoletes: sqlite3 sqlite3-devel BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: make, patch, unzip, readline-devel >= 6.3-5 Requires: readline >= 6.3-5 %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 %patch0 %patch1 -p1 -b .lemon-system-template %patch2 -p1 -b .stupid-openfiles-test # remove cgi-script erroneously included in sqlite-doc-3070600 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 ( 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 %{_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 * 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