17594
|
1 |
#
|
|
2 |
# Copyright (c) 2008 Sun Microsystems, Inc.
|
|
3 |
# This file and all modifications and additions to the pristine
|
|
4 |
# package are under the same license as the package itself.
|
|
5 |
#
|
|
6 |
%define owner hawklu
|
|
7 |
# bugdb: bugzilla.freedesktop.org
|
|
8 |
#
|
|
9 |
|
|
10 |
%define OSR 4091:1.0.2
|
|
11 |
%define doc_version 3_6_22
|
|
12 |
|
|
13 |
Name: sqlite
|
17623
|
14 |
License: public domain
|
17594
|
15 |
Group: System/Libraries
|
|
16 |
Version: 3.6.22
|
|
17 |
Release: 1
|
|
18 |
Distribution: Java Desktop System
|
|
19 |
Vendor: Sun Microsystems, Inc.
|
|
20 |
Summary: SQL database engine
|
|
21 |
Source: http://www.sqlite.org/%{name}-%{version}.tar.gz
|
|
22 |
Source1: mapfile-libsqlite3
|
|
23 |
Source2: http://www.sqlite.org/%{name}_docs_%{doc_version}.zip
|
|
24 |
Source3: pkgIndex.tcl
|
|
25 |
|
|
26 |
|
|
27 |
# owner:hawklu date:2008-10-10 type:bug bugster:6750518
|
|
28 |
Patch1: sqlite3-01-using-mapfile.diff
|
|
29 |
|
17794
|
30 |
# owner:hawklu date:2010-04-01 type:bug d.o.o 15412
|
|
31 |
Patch2: sqlite3-02-using-libcurses.diff
|
|
32 |
|
17594
|
33 |
URL: http://www.sqlite.org
|
|
34 |
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
35 |
Docdir: %{_defaultdocdir}
|
|
36 |
Autoreqprov: on
|
|
37 |
|
|
38 |
%description
|
|
39 |
SQLite is a software library that implements a self-contained,
|
|
40 |
serverless, zero-configuration, transactional SQL database engine.
|
|
41 |
SQLite is the most widely deployed SQL database engine in the world.
|
|
42 |
|
|
43 |
%package devel
|
|
44 |
Summary: SQL database engine library
|
|
45 |
Group: Development/Libraries
|
|
46 |
Requires: %{name} = %{version}
|
|
47 |
|
|
48 |
%description devel
|
|
49 |
SQLite is a software library that implements a self-contained,
|
|
50 |
serverless, zero-configuration, transactional SQL database engine.
|
|
51 |
SQLite is the most widely deployed SQL database engine in the world.
|
|
52 |
|
|
53 |
%prep
|
|
54 |
%setup -q
|
|
55 |
|
|
56 |
%patch1 -p1
|
17794
|
57 |
%patch2 -p1
|
17594
|
58 |
|
|
59 |
%build
|
|
60 |
%ifos linux
|
|
61 |
if [ -x /usr/bin/getconf ]; then
|
|
62 |
CPUS=`getconf _NPROCESSORS_ONLN`
|
|
63 |
fi
|
|
64 |
%else
|
|
65 |
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
|
|
66 |
%endif
|
|
67 |
if test "x$CPUS" = "x" -o $CPUS = 0; then
|
|
68 |
CPUS=1
|
|
69 |
fi
|
|
70 |
|
|
71 |
export PATH=`pwd`:$PATH
|
|
72 |
|
|
73 |
cp %{SOURCE1} .
|
|
74 |
|
|
75 |
%if %option_with_debug
|
|
76 |
export CFLAGS="%optflags -D_POSIX_PTHREAD_SEMANTICS -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_FTS3 -DUSE_PREAD -DHAVE_USLEEP -DHAVE_FDATASYNC -DHAVE_STATVFS -I. "
|
|
77 |
%else
|
|
78 |
export CFLAGS="%optflags -D_POSIX_PTHREAD_SEMANTICS -DNDEBUG -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_FTS3 -DUSE_PREAD -DHAVE_USLEEP -DHAVE_FDATASYNC -DHAVE_STATVFS -I. "
|
|
79 |
%endif
|
|
80 |
|
|
81 |
export LDFLAGS="%_ldflags -Bdirect"
|
|
82 |
./configure \
|
|
83 |
--prefix=%{_prefix} \
|
|
84 |
--libdir=%{_libdir} \
|
|
85 |
--bindir=%{_bindir} \
|
|
86 |
--enable-threadsafe \
|
|
87 |
--enable-cross-thread-connections \
|
|
88 |
--enable-load-extension \
|
|
89 |
--enable-shared \
|
|
90 |
--disable-static \
|
|
91 |
--with-tcl="/usr/lib"
|
|
92 |
|
|
93 |
make -j $CPUS
|
|
94 |
|
|
95 |
|
|
96 |
%install
|
|
97 |
make install DESTDIR=$RPM_BUILD_ROOT
|
|
98 |
rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
|
99 |
|
|
100 |
#install pkgIndex.tcl
|
|
101 |
cp %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tcl8.4/sqlite3
|
|
102 |
%ifarch amd64 sparcv9
|
|
103 |
rm -f $RPM_BUILD_ROOT/usr/lib/tcl8.4/sqlite3/%{_arch64}/pkgIndex.tcl
|
|
104 |
%endif
|
|
105 |
|
|
106 |
# install docs
|
|
107 |
mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc
|
|
108 |
cd $RPM_BUILD_ROOT%{_datadir}/doc
|
|
109 |
unzip %{SOURCE2}
|
|
110 |
mv %{name}-%{doc_version}-docs sqlite3
|
|
111 |
|
|
112 |
|
|
113 |
%clean
|
|
114 |
rm -rf $RPM_BUILD_ROOT
|
|
115 |
|
|
116 |
%files
|
|
117 |
%defattr(-,root,root)
|
|
118 |
%{_libdir}/*.so.*
|
|
119 |
|
|
120 |
%files devel
|
|
121 |
%defattr(-,root,root)
|
|
122 |
%doc AUTHORS ChangeLog COPYING NEWS README TODO
|
|
123 |
%{_includedir}/*
|
|
124 |
%{_libdir}/*.so
|
|
125 |
%{_libdir}/pkgconfig/*
|
|
126 |
|
|
127 |
%changelog
|
17794
|
128 |
* Mon Apr 06 2010 - [email protected]
|
|
129 |
- Fix bug d.o.o 15412
|
17623
|
130 |
* Tue Mar 02 2010 - [email protected]
|
|
131 |
- Change license to public domain
|
17594
|
132 |
* Fri Jan 15 2010 - [email protected]
|
|
133 |
- initial version of the spec file
|