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