source: spec/trunk/SPECS/sqlite.spec@ 25

Last change on this file since 25 was 25, checked in by Yuri Dario, 15 years ago

spec: added ncurses package.

  • Property svn:eol-style set to native
File size: 5.3 KB
Line 
1# bcond default logic is nicely backwards...
2#%bcond_without tcl
3#%bcond_with static
4#%bcond_without check
5
6%undefine tcl
7%undefine with_tcl
8%undefine static
9%undefine with_static
10
11# upstream doesn't provide separate -docs sources for all minor releases
12%define basever 3.5.9
13%define docver %(echo %{basever}|sed -e "s/\\./_/g")
14
15Summary: Library that implements an embeddable SQL database engine
16Name: sqlite
17Version: %{basever}
18Release: 1
19License: Public Domain
20Group: Applications/Databases
21URL: http://www.sqlite.org/
22Source0: http://www.sqlite.org/sqlite-%{version}.tar.gz
23Source1: http://www.sqlite.org/sqlite_docs_%{docver}.zip
24
25Patch1: sqlite-3.5.9-os2.diff
26
27#BuildRequires: ncurses-devel readline-devel glibc-devel
28BuildRequires: ncurses-devel
29# libdl patch needs
30#BuildRequires: autoconf
31%if %{with tcl}
32#BuildRequires: /usr/bin/tclsh
33#BuildRequires: tcl-devel
34%{!?tcl_version: %global tcl_version 8.5}
35%{!?tcl_sitearch: %global tcl_sitearch %{_libdir}/tcl%{tcl_version}}
36%endif
37BuildRoot: %{_tmppath}/%{name}-root
38
39%description
40SQLite is a C library that implements an SQL database engine. A large
41subset of SQL92 is supported. A complete database is stored in a
42single disk file. The API is designed for convenience and ease of use.
43Applications that link against SQLite can enjoy the power and
44flexibility of an SQL database without the administrative hassles of
45supporting a separate database server. Version 2 and version 3 binaries
46are named to permit each to be installed on a single host
47
48%package devel
49Summary: Development tools for the sqlite3 embeddable SQL database engine
50Group: Development/Libraries
51Requires: %{name} = %{version}-%{release}
52Requires: pkgconfig
53
54%description devel
55This package contains the header files and development documentation
56for %{name}. If you like to develop programs using %{name}, you will need
57to install %{name}-devel.
58
59%package doc
60Summary: Documentation for sqlite
61Group: Documentation
62
63%description doc
64This package contains most of the static HTML files that comprise the
65www.sqlite.org website, including all of the SQL Syntax and the
66C/C++ interface specs and other miscellaneous documentation.
67
68%package -n lemon
69Summary: A parser generator
70Group: Development/Tools
71
72%description -n lemon
73Lemon is an LALR(1) parser generator for C or C++. It does the same
74job as bison and yacc. But lemon is not another bison or yacc
75clone. It uses a different grammar syntax which is designed to reduce
76the number of coding errors. Lemon also uses a more sophisticated
77parsing engine that is faster than yacc and bison and which is both
78reentrant and thread-safe. Furthermore, Lemon implements features
79that can be used to eliminate resource leaks, making is suitable for
80use in long-running programs such as graphical user interfaces or
81embedded controllers.
82
83%if %{with tcl}
84%package tcl
85Summary: Tcl module for the sqlite3 embeddable SQL database engine
86Group: Development/Languages
87Requires: %{name} = %{version}-%{release}
88Requires: tcl(abi) = %{tcl_version}
89
90%description tcl
91This package contains the tcl modules for %{name}.
92%endif
93
94%prep
95%setup -q -a1
96%patch1 -p1 -b .os2~
97
98%build
99#autoconf
100#export CFLAGS="$RPM_OPT_FLAGS -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1 -Wall -fno-strict-aliasing"
101export CONFIG_SHELL="/bin/sh"
102%configure %{!?with_tcl:--disable-tcl} \
103 --enable-threadsafe \
104 --enable-threads-override-locks \
105 --enable-load-extension \
106 %{?with_tcl:TCLLIBDIR=%{tcl_sitearch}/sqlite3} \
107 --disable-rpath \
108 --enable-shared --disable-static \
109 "--cache-file=%{_topdir}/cache/%{name}.cache"
110
111# rpath removal
112#sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
113#sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
114
115make %{?_smp_mflags}
116
117%install
118rm -rf $RPM_BUILD_ROOT
119
120make DESTDIR=${RPM_BUILD_ROOT} install
121
122install -D -m0644 sqlite3.1 $RPM_BUILD_ROOT/%{_mandir}/man1/sqlite3.1
123install -D -m0755 lemon.exe $RPM_BUILD_ROOT/%{_bindir}/lemon.exe
124install -D -m0644 tool/lempar.c $RPM_BUILD_ROOT/%{_datadir}/lemon/lempar.c
125
126
127%if %{with tcl}
128# fix up permissions to enable dep extraction
129#chmod 0755 ${RPM_BUILD_ROOT}/%{tcl_sitearch}/sqlite3/*.so
130%endif
131
132%if ! %{with static}
133rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
134rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a
135%endif
136
137# YD install dll
138install -D -m0755 sqlite3.dll $RPM_BUILD_ROOT/%{_libdir}/
139install -D -m0755 .libs/sqlite3.a $RPM_BUILD_ROOT/%{_libdir}/
140install -D -m0755 .libs/sqlite3_s.a $RPM_BUILD_ROOT/%{_libdir}/
141install -D -m0755 .libs/sqlite3.lib $RPM_BUILD_ROOT/%{_libdir}/
142
143# YD check requires tcl
144#%if %{with check}
145#%check
146#%ifarch s390 ppc ppc64
147#make test || :
148#%else
149#make test
150#%endif
151#%endif
152
153%clean
154rm -rf $RPM_BUILD_ROOT
155
156#%post -p /sbin/ldconfig
157
158#%postun -p /sbin/ldconfig
159
160%files
161%defattr(-, root, root)
162%doc README
163%{_bindir}/sqlite3.exe
164%{_libdir}/*.dll
165%{_mandir}/man?/*
166
167%files devel
168%defattr(-, root, root)
169%{_includedir}/*.h
170%{_libdir}/*.dll
171%{_libdir}/*.a
172%{_libdir}/*.lib
173%{_libdir}/pkgconfig/*.pc
174%if %{with static}
175%{_libdir}/*_s.a
176%exclude %{_libdir}/*.la
177%endif
178
179%files doc
180%defattr(-, root, root)
181%doc %{name}-%{docver}-docs/*
182
183%files -n lemon
184%defattr(-, root, root)
185%{_bindir}/lemon.exe
186%{_datadir}/lemon
187
188%if %{with tcl}
189%files tcl
190%defattr(-, root, root)
191%{tcl_sitearch}/sqlite3
192%endif
193
194%changelog
Note: See TracBrowser for help on using the repository browser.