base-specs/sqlite.spec
author migi
Tue, 08 Jun 2010 14:57:30 +0000
changeset 18099 6142061e510a
parent 18066 1847ff0f1078
child 19977 39e009267690
child 20210 f95b044a007e
child 20272 58ee0cc10c2d
permissions -rw-r--r--
2010-06-08 Michal Pryc <[email protected]> * base-specs/sqlite.spec: * base-specs/thunderbird.spec: * specs/SUNWgnome-pdf-viewer.spec: * specs/SUNWlibglade.spec: * specs/SUNWgtk2.spec: * specs/SUNWlibpopt.spec: * specs/SUNWgnome-display-mgr.spec: * specs/SUNWpango.spec: * specs/SUNWclutter-gtk.spec: * specs/SUNWlibatk.spec: * specs/SUNWgnome-text-editor.spec: * specs/SUNWTiff.spec: * specs/SUNWgnome-pilot.spec: * specs/SUNWgnome-meeting.spec: * specs/SUNWgnome-user-docs.spec: * specs/SUNWgnome-config.spec: * specs/SUNWlibart.spec: * specs/SUNWlibsoup.spec: * specs/SUNWgnome-cd.spec: * specs/SUNWgnome-xml.spec: * specs/SUNWgnome-ui-designer.spec: * specs/SUNWpilot-link.spec: * specs/SUNWgnome-cd-burner.spec: * specs/SUNWglib2.spec: * specs/SUNWgnome-hex-editor.spec: * specs/SUNWGParted.spec: * specs/SUNWfirefox.spec: * specs/SUNWgnome-media-apps.spec: * specs/SUNWgtk-doc.spec: * specs/SUNWlibffi.spec: * specs/SUNWgnome-calculator.spec: * specs/SUNWhamster.spec: * specs/SUNWgnome-file-mgr.spec: * specs/SUNWgnome-a11y-poke.spec: * specs/SUNWgobject-introspection.spec: * specs/SUNWevolution.spec: * specs/SUNWPython26.spec: * specs/SUNWperl-authen-pam.spec: * specs/SUNWgnome-a11y-reader.spec: * specs/SUNWdesktop-cache.spec: * specs/SUNWthunderbird.spec: * specs/SUNWclutter-gst.spec: * specs/SUNWpng.spec: * specs/SUNWdrivel.spec: * specs/SUNWgnome-wm.spec: * specs/SUNWevolution-data-server.spec: * specs/SUNWgnome-gvfs.spec: * specs/SUNWzz-gnome-l10n.spec: * specs/SUNWjpg.spec: * specs/SUNWprint-monitor.spec: * specs/SUNWvinagre.spec: * specs/SUNWgnome-panel.spec: * specs/SUNWgnome-desktop-prefs.spec: * specs/SUNWgnome-a11y-libs.spec: * specs/SUNWgnome-python-libs.spec: * specs/SUNWgnome-system-tools.spec: * specs/SUNWdbus.spec: * specs/SUNWgnome-power-manager.spec: * specs/SUNWxdg-sound-theme.spec: * specs/SUNWgnome-terminal.spec: * specs/SUNWgtkmm.spec: * specs/SUNWclutter.spec: * specs/SUNWlibchamplain.spec: * specs/SUNWgnome-nettool.spec: * specs/SUNWseahorse-plugins.spec: * specs/SUNWgnome-libs.spec: * specs/SUNWcheese.spec: * specs/SUNWtango-icon-theme.spec: * specs/SUNWmm-common.spec: * specs/SUNWgnome-vfs.spec: * specs/SUNWgnome-archive-mgr.spec: * specs/SUNWgnome-img-organizer.spec: * specs/SUNWgnome-img-viewer.spec: * specs/SUNWlibgnomecanvas.spec: * specs/SUNWavahi-bridge-dsd.spec: * specs/SUNWgnome-config-editor.spec: * specs/SUNWgnome-print.spec: * specs/SUNWevolution-bdb-devel.spec: * specs/SUNWespeak.spec: Updated to fit SourceJuicer automated builds.

#
# Copyright (c) 2010 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
%define owner hawklu 
# bugdb: bugzilla.freedesktop.org
#

%define OSR 12578:1.0.2
%define doc_version 3_6_23

Name:         sqlite 
License:      public domain 
Group:        System/Libraries
Version:      3.6.23
Release:      1
Distribution: Java Desktop System
Vendor:	      www.sqlite.org
Summary:      SQL database engine 
Source:       http://www.sqlite.org/%{name}-%{version}.tar.gz
Source1:      mapfile-libsqlite3
Source2:      http://www.sqlite.org/%{name}_docs_%{doc_version}.zip
Source3:      pkgIndex.tcl 
# This is specified here since unzip is used in this spec file.
BuildRequires: compress/unzip

# owner:hawklu date:2008-10-10 type:bug bugster:6750518
Patch1: sqlite3-01-using-mapfile.diff

# owner:hawklu date:2010-04-01 type:bug d.o.o 15412
Patch2: sqlite3-02-using-libcurses.diff

URL:          http://www.sqlite.org
BuildRoot:    %{_tmppath}/%{name}-%{version}-build
Docdir:       %{_defaultdocdir}
Autoreqprov:  on

%description
SQLite is a software library that implements a self-contained, 
serverless, zero-configuration, transactional SQL database engine. 
SQLite is the most widely deployed SQL database engine in the world. 

%package devel
Summary:      SQL database engine library
Group:        Development/Libraries
Requires:     %{name} = %{version}

%description devel
SQLite is a software library that implements a self-contained, 
serverless, zero-configuration, transactional SQL database engine. 
SQLite is the most widely deployed SQL database engine in the world. 

%prep
%setup -q

%patch1 -p1
%patch2 -p1

%build
%ifos linux
if [ -x /usr/bin/getconf ]; then
  CPUS=`getconf _NPROCESSORS_ONLN`
fi
%else
  CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
%endif
if test "x$CPUS" = "x" -o $CPUS = 0; then
  CPUS=1
fi

export PATH=`pwd`:$PATH

cp %{SOURCE1} .

%if %option_with_debug
 export CFLAGS="%optflags -D_POSIX_PTHREAD_SEMANTICS -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_FTS3 -DUSE_PREAD -DHAVE_USLEEP -DHAVE_FDATASYNC -DHAVE_STATVFS -I. "
%else
 export CFLAGS="%optflags -D_POSIX_PTHREAD_SEMANTICS -DNDEBUG -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_FTS3 -DUSE_PREAD -DHAVE_USLEEP -DHAVE_FDATASYNC -DHAVE_STATVFS -I. "
%endif

export LDFLAGS="%_ldflags -Bdirect"
./configure \
    --prefix=%{_prefix} \
    --libdir=%{_libdir} \
    --bindir=%{_bindir} \
    --enable-threadsafe \
    --enable-cross-thread-connections \
    --enable-load-extension \
    --enable-shared  \
    --disable-static \
    --with-tcl="/usr/lib"

make -j $CPUS


%install
make install DESTDIR=$RPM_BUILD_ROOT
rm $RPM_BUILD_ROOT%{_libdir}/*.la

#install pkgIndex.tcl
cp %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tcl8.4/sqlite3 
%ifarch amd64 sparcv9
rm -f $RPM_BUILD_ROOT/usr/lib/tcl8.4/sqlite3/%{_arch64}/pkgIndex.tcl
%endif

# install docs
mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc
cd $RPM_BUILD_ROOT%{_datadir}/doc
unzip %{SOURCE2}
mv %{name}-%{doc_version}-docs sqlite3 


%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README TODO
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*

%changelog
* Tue Jun 08 2010 - [email protected]
- Updated BuildRequires to fit SourceJuicer.
* Wed Jun 02 2010 - [email protected]
- Bump to 3.6.23.
* Mon Apr 06 2010 - [email protected]
- Fix bug d.o.o 15412.
* Tue Mar 02 2010 - [email protected]
- Change license to public domain.
* Fri Jan 15 2010 - [email protected]
- initial version of the spec file.