sqlite.spec revision 18817
10139N/A#
10139N/A# Copyright (c) 2010 Sun Microsystems, Inc.
10139N/A# This file and all modifications and additions to the pristine
10139N/A# package are under the same license as the package itself.
10139N/A#
10139N/A%define owner hawklu
10139N/A# bugdb: bugzilla.freedesktop.org
10139N/A#
10139N/A
10139N/A%define OSR 12578:1.0.2
10139N/A%define doc_version 3_6_23
10139N/A
10139N/AName: sqlite
10139N/ALicense: public domain
10139N/AGroup: System/Libraries
10139N/AVersion: 3.6.23
10139N/ARelease: 1
10139N/ADistribution: Java Desktop System
10139N/AVendor: www.sqlite.org
10139N/ASummary: SQL database engine
10139N/ASource: http://www.sqlite.org/%{name}-%{version}.tar.gz
10139N/ASource1: mapfile-libsqlite3
10139N/ASource2: http://www.sqlite.org/%{name}_docs_%{doc_version}.zip
10139N/ASource3: pkgIndex.tcl
10139N/A
10139N/A
10139N/A# owner:hawklu date:2008-10-10 type:bug bugster:6750518
10139N/APatch1: sqlite3-01-using-mapfile.diff
10139N/A
10139N/A# owner:hawklu date:2010-04-01 type:bug d.o.o 15412
10139N/APatch2: sqlite3-02-using-libcurses.diff
10139N/A
10139N/AURL: http://www.sqlite.org
10139N/ABuildRoot: %{_tmppath}/%{name}-%{version}-build
10139N/ADocdir: %{_defaultdocdir}
10139N/AAutoreqprov: on
10139N/A
10139N/A%description
10139N/ASQLite is a software library that implements a self-contained,
10139N/Aserverless, zero-configuration, transactional SQL database engine.
10139N/ASQLite is the most widely deployed SQL database engine in the world.
10139N/A
10139N/A%package devel
10139N/ASummary: SQL database engine library
10139N/AGroup: Development/Libraries
10139N/ARequires: %{name} = %{version}
10139N/A
10139N/A%description devel
10139N/ASQLite is a software library that implements a self-contained,
10139N/Aserverless, zero-configuration, transactional SQL database engine.
10139N/ASQLite is the most widely deployed SQL database engine in the world.
10139N/A
10139N/A%prep
10139N/A%setup -q
10139N/A
10139N/A%patch1 -p1
10139N/A%patch2 -p1
10139N/A
10139N/A%build
10139N/A%ifos linux
10139N/Aif [ -x /usr/bin/getconf ]; then
10139N/A CPUS=`getconf _NPROCESSORS_ONLN`
10139N/Afi
10139N/A%else
10139N/A CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
10139N/A%endif
10139N/Aif test "x$CPUS" = "x" -o $CPUS = 0; then
10139N/A CPUS=1
10139N/Afi
10139N/A
10139N/Aexport PATH=`pwd`:$PATH
10139N/A
10139N/Acp %{SOURCE1} .
10139N/A
10139N/A%if %option_with_debug
10139N/A export CFLAGS="%optflags -D_POSIX_PTHREAD_SEMANTICS -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_FTS3 -DUSE_PREAD -DHAVE_USLEEP -DHAVE_FDATASYNC -DHAVE_STATVFS -I. "
10139N/A%else
10139N/A export CFLAGS="%optflags -D_POSIX_PTHREAD_SEMANTICS -DNDEBUG -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_FTS3 -DUSE_PREAD -DHAVE_USLEEP -DHAVE_FDATASYNC -DHAVE_STATVFS -I. "
10139N/A%endif
10139N/A
10139N/Aexport LDFLAGS="%_ldflags -Bdirect"
10139N/A./configure \
10139N/A --prefix=%{_prefix} \
10139N/A --libdir=%{_libdir} \
10139N/A --bindir=%{_bindir} \
10139N/A --enable-threadsafe \
10139N/A --enable-cross-thread-connections \
10139N/A --enable-load-extension \
10139N/A --enable-shared \
10139N/A --disable-static \
10139N/A --with-tcl="/usr/lib"
10139N/A
10139N/Amake -j $CPUS
10139N/A
10139N/A
10139N/A%install
10139N/Amake install DESTDIR=$RPM_BUILD_ROOT
10139N/Arm $RPM_BUILD_ROOT%{_libdir}/*.la
10139N/A
10139N/A#install pkgIndex.tcl
10139N/Acp %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tcl8.4/sqlite3
10139N/A%ifarch amd64 sparcv9
10139N/Arm -f $RPM_BUILD_ROOT/usr/lib/tcl8.4/sqlite3/%{_arch64}/pkgIndex.tcl
10139N/A%endif
10139N/A
10139N/A# install docs
10139N/Amkdir -p $RPM_BUILD_ROOT%{_datadir}/doc
10139N/Acd $RPM_BUILD_ROOT%{_datadir}/doc
10139N/Aunzip %{SOURCE2}
10139N/Amv %{name}-%{doc_version}-docs sqlite3
10139N/A
10139N/A
10139N/A%clean
10139N/Arm -rf $RPM_BUILD_ROOT
10139N/A
10139N/A%files
10139N/A%defattr(-,root,root)
10139N/A%{_libdir}/*.so.*
10139N/A
10139N/A%files devel
10139N/A%defattr(-,root,root)
10139N/A%doc AUTHORS ChangeLog COPYING NEWS README TODO
10139N/A%{_includedir}/*
10139N/A%{_libdir}/*.so
10139N/A%{_libdir}/pkgconfig/*
10139N/A
10139N/A%changelog
10139N/A* Wed Jun 02 2010 - brian.cameron@oracle.com
10139N/A- Bump to 3.6.23.
10139N/A* Mon Apr 06 2010 - brian.lu@sun.com
10139N/A- Fix bug d.o.o 15412.
10139N/A* Tue Mar 02 2010 - brian.lu@sun.com
10139N/A- Change license to public domain.
10139N/A* Fri Jan 15 2010 - brian.lu@sun.com
10139N/A- initial version of the spec file.
10139N/A