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

Last change on this file since 1010 was 280, checked in by Yuri Dario, 14 years ago

spec: python, xml2, sqlite3, rebuild with libc 0.6.4 runtime.

  • Property svn:eol-style set to native
File size: 5.4 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.7.2
13%define docver %(echo %{basever}|sed -e "s/\\./_/g")
14
15Summary: Library that implements an embeddable SQL database engine
16Name: sqlite
17Version: %{basever}
18Release: 5%{?dist}
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-os2.diff
26
27BuildRequires: ncurses-devel readline-devel libc-devel
28# libdl patch needs
29#BuildRequires: autoconf
30%if %{with tcl}
31#BuildRequires: /usr/bin/tclsh
32#BuildRequires: tcl-devel
33%{!?tcl_version: %global tcl_version 8.5}
34%{!?tcl_sitearch: %global tcl_sitearch %{_libdir}/tcl%{tcl_version}}
35%endif
36BuildRoot: %{_tmppath}/%{name}-root
37
38%description
39SQLite is a C library that implements an SQL database engine. A large
40subset of SQL92 is supported. A complete database is stored in a
41single disk file. The API is designed for convenience and ease of use.
42Applications that link against SQLite can enjoy the power and
43flexibility of an SQL database without the administrative hassles of
44supporting a separate database server. Version 2 and version 3 binaries
45are named to permit each to be installed on a single host
46
47%package devel
48Summary: Development tools for the sqlite3 embeddable SQL database engine
49Group: Development/Libraries
50Requires: %{name} = %{version}-%{release}
51Requires: pkgconfig
52
53%description devel
54This package contains the header files and development documentation
55for %{name}. If you like to develop programs using %{name}, you will need
56to install %{name}-devel.
57
58%package doc
59Summary: Documentation for sqlite
60Group: Documentation
61
62%description doc
63This package contains most of the static HTML files that comprise the
64www.sqlite.org website, including all of the SQL Syntax and the
65C/C++ interface specs and other miscellaneous documentation.
66
67%package -n lemon
68Summary: A parser generator
69Group: Development/Tools
70
71%description -n lemon
72Lemon is an LALR(1) parser generator for C or C++. It does the same
73job as bison and yacc. But lemon is not another bison or yacc
74clone. It uses a different grammar syntax which is designed to reduce
75the number of coding errors. Lemon also uses a more sophisticated
76parsing engine that is faster than yacc and bison and which is both
77reentrant and thread-safe. Furthermore, Lemon implements features
78that can be used to eliminate resource leaks, making is suitable for
79use in long-running programs such as graphical user interfaces or
80embedded controllers.
81
82%if %{with tcl}
83%package tcl
84Summary: Tcl module for the sqlite3 embeddable SQL database engine
85Group: Development/Languages
86Requires: %{name} = %{version}-%{release}
87Requires: tcl(abi) = %{tcl_version}
88
89%description tcl
90This package contains the tcl modules for %{name}.
91%endif
92
93%prep
94%setup -q -a1
95%patch1 -p1 -b .os2~
96
97%build
98#autoconf
99#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"
100export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe"
101export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
102export LIBS="-lurpo"
103%configure %{!?with_tcl:--disable-tcl} \
104 --enable-threadsafe \
105 --enable-threads-override-locks \
106 --enable-load-extension \
107 %{?with_tcl:TCLLIBDIR=%{tcl_sitearch}/sqlite3} \
108 --disable-shared \
109 "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.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 sqlit3.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
195* Mon Jan 16 2012 yd
196- rebuild with libc 0.6.4 runtime.
Note: See TracBrowser for help on using the repository browser.