]> git.pld-linux.org Git - packages/sqliteodbc.git/blame - sqliteodbc.spec
- updated to 0.9993
[packages/sqliteodbc.git] / sqliteodbc.spec
CommitLineData
24ccaefb
JB
1# TODO: sqlite4 (when released/available in PLD)
2# NOTE: it looks for libsqlite.la, libsqlite3.la, libodbcinst.la/libiodbcinst.la in %{_libdir},
3# so these libtool files must be present to build this package without patching
4#
5# Conditional build:
6%bcond_with iodbc # use iODBC instead of unixODBC
7%bcond_without sqlite2 # SQLite 2.x driver
8%bcond_without sqlite3 # SQLite 3.x driver
9%bcond_with sqlite4 # SQLite 4.x driver
10#
11Summary: ODBC driver for SQLite 2.x
12Summary(pl.UTF-8): Sterownik ODBC dla SQLite 2.x
a95ebde6 13Name: sqliteodbc
afc482af 14Version: 0.9993
24ccaefb 15Release: 1
cc1a57bc 16License: BSD
17Group: Libraries
cc1a57bc 18Source0: http://www.ch-werner.de/sqliteodbc/%{name}-%{version}.tar.gz
afc482af 19# Source0-md5: 2a418fa3465d285f75218b619345cd53
cc1a57bc 20Patch0: %{name}-misc.patch
21URL: http://www.ch-werner.de/sqliteodbc/
22BuildRequires: autoconf
23BuildRequires: automake
24BuildRequires: libtool
24ccaefb
JB
25%{?with_iodbc:BuildRequires: libiodbc-devel}
26%{?with_sqlite3:BuildRequires: libxml2-devel >= 2}
27%{?with_sqlite2:BuildRequires: sqlite-devel >= 2.8.0}
28%{?with_sqlite3:BuildRequires: sqlite3-devel >= 3}
29%{?with_sqlite4:BuildRequires: sqlite4-devel >= 4}
30%{!?with_iodbc:BuildRequires: unixODBC-devel}
31%{?with_sqlite3:BuildRequires: zlib-devel}
a95ebde6 32Requires(post): mktemp
24ccaefb
JB
33Requires(post): /usr/bin/odbcinst
34Requires: sqlite >= 2.8.0
cc1a57bc 35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
24ccaefb
JB
37# human-readable ODBC variant name
38%define ODBCvar %{?with_iodbc:iODBC}%{!?with_iodbc:unixODBC}
39
cc1a57bc 40%description
24ccaefb
JB
41SQLiteODBC is an ODBC driver for SQLite interfacing SQLite 2.x and/or
423.x using unixODBC or iODBC. See <http://www.sqlite.org/> for a
43description of SQLite, <http://www.unixodbc.org/> for a description of
44unixODBC.
45
46This package contains SQLite 2.x driver for %{ODBCvar}.
a95ebde6 47
0f558f12 48%description -l pl.UTF-8
24ccaefb
JB
49SQLiteODBC to sterownik ODBC dla SQLite współpracujący z SQLite 2.x
50i/lub 3.x wykorzystujący unixODBC lub iODBC. Opis SQLite można znaleźć
51pod adresem <http://www.sqlite.org/>, a unixODBC pod
52<http://www.unixodbc.org/>.
53
54Ten pakiet zawiera sterownik SQLite 2.x dla %{ODBCvar}.
55
56%package -n sqlite3odbc
57Summary: ODBC driver for SQLite 3.x
58Summary(pl.UTF-8): Sterownik ODBC dla SQLite 3.x
59Group: Libraries
60Requires(post): mktemp
61Requires(post): /usr/bin/odbcinst
62
63%description -n sqlite3odbc
64SQLiteODBC is an ODBC driver for SQLite interfacing SQLite 2.x and/or
653.x using unixODBC or iODBC. See <http://www.sqlite.org/> for a
66description of SQLite, <http://www.unixodbc.org/> for a description of
67unixODBC.
68
69This package contains SQLite 3.x driver for %{ODBCvar}.
70
71%description -n sqlite3odbc -l pl.UTF-8
72SQLiteODBC to sterownik ODBC dla SQLite współpracujący z SQLite 2.x
73i/lub 3.x wykorzystujący unixODBC lub iODBC. Opis SQLite można znaleźć
74pod adresem <http://www.sqlite.org/>, a unixODBC pod
75<http://www.unixodbc.org/>.
76
77Ten pakiet zawiera sterownik SQLite 3.x dla %{ODBCvar}.
78
79%package -n sqlite4odbc
80Summary: ODBC driver for SQLite 4.x
81Summary(pl.UTF-8): Sterownik ODBC dla SQLite 4.x
82Group: Libraries
83Requires(post): mktemp
84Requires(post): /usr/bin/odbcinst
85
86%description -n sqlite4odbc
87SQLiteODBC is an ODBC driver for SQLite interfacing SQLite 2.x, 3.x
88and/or 4.x using unixODBC or iODBC. See <http://www.sqlite.org/> for a
89description of SQLite, <http://www.unixodbc.org/> for a description of
90unixODBC.
91
92This package contains SQLite 4.x driver for %{ODBCvar}.
93
94%description -n sqlite4odbc -l pl.UTF-8
95SQLiteODBC to sterownik ODBC dla SQLite współpracujący z SQLite 2.x,
963.x i/lub 4.x wykorzystujący unixODBC lub iODBC. Opis SQLite można
97znaleźć pod adresem <http://www.sqlite.org/>, a unixODBC pod
98<http://www.unixodbc.org/>.
99
100Ten pakiet zawiera sterownik SQLite 4.x dla %{ODBCvar}.
cc1a57bc 101
102%prep
103%setup -q
104%patch0 -p1
105
106%build
107%{__libtoolize}
108%{__aclocal}
109%{__autoconf}
24ccaefb
JB
110%configure \
111 --disable-static
cc1a57bc 112%{__make}
113
114%install
115rm -rf $RPM_BUILD_ROOT
116
a95ebde6
JB
117%{__make} install \
118 DESTDIR=$RPM_BUILD_ROOT
119
24ccaefb 120%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
cc1a57bc 121
122%clean
123rm -rf $RPM_BUILD_ROOT
124
125%post
24ccaefb
JB
126INST=`mktemp /tmp/sqliteinstXXXXXX`
127cat > $INST << 'EOD'
cc1a57bc 128[SQLITE]
129Description=SQLite ODBC 2.X
130Driver=%{_libdir}/libsqliteodbc.so
131Setup=%{_libdir}/libsqliteodbc.so
132FileUsage=1
133EOD
24ccaefb
JB
134/usr/bin/odbcinst -q -d -n SQLITE | grep '^\[SQLITE\]' >/dev/null || {
135 /usr/bin/odbcinst -i -d -n SQLITE -f $INST || true
136}
137cat > $INST << 'EOD'
cc1a57bc 138[SQLite Datasource]
139Driver=SQLITE
140EOD
24ccaefb
JB
141/usr/bin/odbcinst -q -s -n "SQLite Datasource" | grep '^\[SQLite Datasource\]' >/dev/null || {
142 /usr/bin/odbcinst -i -l -s -n "SQLite Datasource" -f $INST || true
143}
144rm -f $INST
145
146%preun
147if [ "$1" = "0" ] ; then
148 test -x /usr/bin/odbcinst && {
149 /usr/bin/odbcinst -u -d -n SQLITE || true
150 /usr/bin/odbcinst -u -l -s -n "SQLite Datasource" || true
151 }
152fi
153
154%post -n sqlite3odbc
155cat > $INST << 'EOD'
cc1a57bc 156[SQLITE3]
157Description=SQLite ODBC 3.X
158Driver=%{_libdir}/libsqlite3odbc.so
159Setup=%{_libdir}/libsqlite3odbc.so
160FileUsage=1
161EOD
24ccaefb
JB
162/usr/bin/odbcinst -q -d -n SQLITE3 | grep '^\[SQLITE3\]' >/dev/null || {
163 /usr/bin/odbcinst -i -d -n SQLITE3 -f $INST || true
164}
165cat > $INST << 'EOD'
cc1a57bc 166[SQLite3 Datasource]
167Driver=SQLITE3
168EOD
24ccaefb
JB
169/usr/bin/odbcinst -q -s -n "SQLite3 Datasource" | grep '^\[SQLite3 Datasource\]' >/dev/null || {
170 /usr/bin/odbcinst -i -l -s -n "SQLite3 Datasource" -f $INST || true
171}
172rm -f $INST
cc1a57bc 173
24ccaefb 174%preun -n sqlite3odbc
cc1a57bc 175if [ "$1" = "0" ] ; then
a95ebde6 176 test -x /usr/bin/odbcinst && {
a95ebde6
JB
177 /usr/bin/odbcinst -u -d -n SQLITE3 || true
178 /usr/bin/odbcinst -u -l -s -n "SQLite3 Datasource" || true
179 }
cc1a57bc 180fi
181
24ccaefb
JB
182%post -n sqlite4odbc
183cat > $INST << 'EOD'
184[SQLITE4]
185Description=SQLite ODBC 4.X
186Driver=%{_libdir}/libsqlite4odbc.so
187Setup=%{_libdir}/libsqlite4odbc.so
188FileUsage=1
189EOD
190/usr/bin/odbcinst -q -d -n SQLITE4 | grep '^\[SQLITE4\]' >/dev/null || {
191 /usr/bin/odbcinst -i -d -n SQLITE4 -f $INST || true
192}
193cat > $INST << 'EOD'
194[SQLite4 Datasource]
195Driver=SQLITE4
196EOD
197/usr/bin/odbcinst -q -s -n "SQLite4 Datasource" | grep '^\[SQLite4 Datasource\]' >/dev/null || {
198 /usr/bin/odbcinst -i -l -s -n "SQLite4 Datasource" -f $INST || true
199}
200rm -f $INST
201
202%preun -n sqlite4odbc
203if [ "$1" = "0" ] ; then
204 test -x /usr/bin/odbcinst && {
205 /usr/bin/odbcinst -u -d -n SQLITE4 || true
206 /usr/bin/odbcinst -u -l -s -n "SQLite4 Datasource" || true
207 }
208fi
209
210%if %{with sqlite2}
cc1a57bc 211%files
212%defattr(644,root,root,755)
24ccaefb
JB
213%doc ChangeLog README license.terms
214%attr(755,root,root) %{_libdir}/libsqliteodbc-%{version}.so
215%attr(755,root,root) %{_libdir}/libsqliteodbc.so
216%endif
217
218%if %{with sqlite3}
219%files -n sqlite3odbc
220%defattr(644,root,root,755)
221%attr(755,root,root) %{_libdir}/libsqlite3odbc-%{version}.so
222%attr(755,root,root) %{_libdir}/libsqlite3odbc.so
223%attr(755,root,root) %{_libdir}/libsqlite3_mod_blobtoxy-%{version}.so
224%attr(755,root,root) %{_libdir}/libsqlite3_mod_blobtoxy.so
225%attr(755,root,root) %{_libdir}/libsqlite3_mod_csvtable-%{version}.so
226%attr(755,root,root) %{_libdir}/libsqlite3_mod_csvtable.so
227%attr(755,root,root) %{_libdir}/libsqlite3_mod_impexp-%{version}.so
228%attr(755,root,root) %{_libdir}/libsqlite3_mod_impexp.so
229%attr(755,root,root) %{_libdir}/libsqlite3_mod_xpath-%{version}.so
230%attr(755,root,root) %{_libdir}/libsqlite3_mod_xpath.so
231%attr(755,root,root) %{_libdir}/libsqlite3_mod_zipfile-%{version}.so
232%attr(755,root,root) %{_libdir}/libsqlite3_mod_zipfile.so
233%endif
234
235%if %{with sqlite4}
236%files -n sqlite4odbc
237%defattr(644,root,root,755)
238%attr(755,root,root) %{_libdir}/libsqlite4odbc-%{version}.so
239%attr(755,root,root) %{_libdir}/libsqlite4odbc.so
240%endif
This page took 0.142797 seconds and 4 git commands to generate.