1 | %define pkg_name sqliteodbc |
---|
2 | %define pkg_version 0.9996 |
---|
3 | %define pkg_release 2%{?_dist_release} |
---|
4 | |
---|
5 | Summary: SQLite ODBC Driver |
---|
6 | Name: %{pkg_name} |
---|
7 | Version: %{pkg_version} |
---|
8 | Release: %{pkg_release} |
---|
9 | |
---|
10 | License: BSD |
---|
11 | Group: System Environment/Libraries |
---|
12 | URL: http://www.ch-werner.de/sqliteodbc |
---|
13 | |
---|
14 | Source: http://www.ch-werner.de/sqliteodbc/%{name}-%{version}.tar.gz |
---|
15 | |
---|
16 | BuildRequires: libxml2-devel |
---|
17 | # BuildRequires: sqlite-devel |
---|
18 | BuildRequires: sqlite3-devel |
---|
19 | BuildRequires: unixODBC-devel |
---|
20 | BuildRequires: zlib-devel |
---|
21 | |
---|
22 | Requires: unixODBC |
---|
23 | |
---|
24 | Vendor: Project Vine |
---|
25 | Distribution: Vine Linux |
---|
26 | |
---|
27 | |
---|
28 | %description |
---|
29 | ODBC driver for SQLite interfacing SQLite 3.x using the |
---|
30 | unixODBC or iODBC driver managers. For more information refer to: |
---|
31 | - http://www.sqlite.org - SQLite engine |
---|
32 | - http://www.unixodbc.org - unixODBC Driver Manager |
---|
33 | - http://www.iodbc.org - iODBC Driver Manager |
---|
34 | |
---|
35 | |
---|
36 | %prep |
---|
37 | rm -rf %{buildroot} |
---|
38 | %setup -q |
---|
39 | # correct EOL |
---|
40 | for i in README; do |
---|
41 | sed 's#\r##g' $i > $i.tmp && \ |
---|
42 | touch -r $i $i.tmp && \ |
---|
43 | mv $i.tmp $i |
---|
44 | done |
---|
45 | |
---|
46 | # Convert encoding to UTF-8 |
---|
47 | for i in ChangeLog; do |
---|
48 | iconv -f ISO-8859-1 -t UTF-8 -o $i.tmp $i && \ |
---|
49 | touch -r $i $i.tmp && \ |
---|
50 | mv $i.tmp $i |
---|
51 | done |
---|
52 | |
---|
53 | |
---|
54 | %build |
---|
55 | %configure |
---|
56 | make %{_smp_mflags} |
---|
57 | |
---|
58 | |
---|
59 | %install |
---|
60 | mkdir -p %{buildroot}%{_libdir} |
---|
61 | make install DESTDIR=%{buildroot} |
---|
62 | # rm -f %{buildroot}%{_libdir}/libsqliteodbc*.{a,la} |
---|
63 | rm -f %{buildroot}%{_libdir}/libsqlite3odbc*.{a,la} |
---|
64 | rm -f %{buildroot}%{_libdir}/libsqlite3_mod_*.{a,la} |
---|
65 | # install example file |
---|
66 | cat > odbc.ini.sample <<- 'EOD' |
---|
67 | # ~/.odbc.ini example file |
---|
68 | [mysqlitedb] |
---|
69 | Description=My SQLite3 test database |
---|
70 | Driver=SQLite3 |
---|
71 | Database=/home/user_name/Documents/databases/testdb.sqlite |
---|
72 | # optional lock timeout in milliseconds |
---|
73 | # Timeout=2000 |
---|
74 | # StepAPI = No|Yes |
---|
75 | # ShortNames = No|Yes |
---|
76 | # FKSupport = No|Yes |
---|
77 | # SyncPragma = NORMAL|OFF|FULL |
---|
78 | # JournalMode = WAL|MEMORY|TRUNCATE|OFF|PERSIST|DELETE |
---|
79 | # BigInt = No|Yes |
---|
80 | EOD |
---|
81 | |
---|
82 | |
---|
83 | %clean |
---|
84 | %{__rm} -rf %{buildroot} |
---|
85 | |
---|
86 | %post |
---|
87 | /sbin/ldconfig |
---|
88 | if [ -x %{_bindir}/odbcinst ] ; then |
---|
89 | INST=/tmp/sqliteodbcinst$$ |
---|
90 | |
---|
91 | # if [ -r %{_libdir}/libsqliteodbc.so ] ; then |
---|
92 | # cat > $INST <<- 'EOD' |
---|
93 | # [SQLITE] |
---|
94 | # Description=SQLite ODBC 2.X |
---|
95 | # Driver=%{_libdir}/libsqliteodbc.so |
---|
96 | # Setup=%{_libdir}/libsqliteodbc.so |
---|
97 | # Threading=2 |
---|
98 | # FileUsage=1 |
---|
99 | # EOD |
---|
100 | |
---|
101 | # %{_bindir}/odbcinst -q -d -n SQLITE | grep '^\[SQLITE\]' >/dev/null || { |
---|
102 | # %{_bindir}/odbcinst -i -d -n SQLITE -f $INST || true |
---|
103 | # } |
---|
104 | |
---|
105 | # cat > $INST <<- 'EOD' |
---|
106 | # [SQLite Datasource] |
---|
107 | # Driver=SQLITE |
---|
108 | # EOD |
---|
109 | |
---|
110 | # %{_bindir}/odbcinst -q -s -n "SQLite Datasource" | \ |
---|
111 | # grep '^\[SQLite Datasource\]' >/dev/null || { |
---|
112 | # %{_bindir}/odbcinst -i -l -s -n "SQLite Datasource" -f $INST || true |
---|
113 | # } |
---|
114 | # fi |
---|
115 | |
---|
116 | if [ -r %{_libdir}/libsqlite3odbc.so ] ; then |
---|
117 | cat > $INST <<- 'EOD' |
---|
118 | [SQLITE3] |
---|
119 | Description=SQLite ODBC 3.X |
---|
120 | Driver=%{_libdir}/libsqlite3odbc.so |
---|
121 | Setup=%{_libdir}/libsqlite3odbc.so |
---|
122 | Threading=2 |
---|
123 | FileUsage=1 |
---|
124 | EOD |
---|
125 | |
---|
126 | %{_bindir}/odbcinst -q -d -n SQLITE3 | grep '^\[SQLITE3\]' >/dev/null || { |
---|
127 | %{_bindir}/odbcinst -i -d -n SQLITE3 -f $INST || true |
---|
128 | } |
---|
129 | |
---|
130 | cat > $INST <<- 'EOD' |
---|
131 | [SQLite3 Datasource] |
---|
132 | Driver=SQLITE3 |
---|
133 | EOD |
---|
134 | |
---|
135 | %{_bindir}/odbcinst -q -s -n "SQLite3 Datasource" | \ |
---|
136 | grep '^\[SQLite3 Datasource\]' >/dev/null || { |
---|
137 | %{_bindir}/odbcinst -i -l -s -n "SQLite3 Datasource" -f $INST || true |
---|
138 | } |
---|
139 | fi |
---|
140 | |
---|
141 | rm -f $INST || true |
---|
142 | fi |
---|
143 | |
---|
144 | |
---|
145 | %preun |
---|
146 | if [ "$1" = "0" ] ; then |
---|
147 | test -x %{_bindir}/odbcinst && { |
---|
148 | # %{_bindir}/odbcinst -u -d -n SQLITE || true |
---|
149 | # %{_bindir}/odbcinst -u -l -s -n "SQLite Datasource" || true |
---|
150 | %{_bindir}/odbcinst -u -d -n SQLITE3 || true |
---|
151 | %{_bindir}/odbcinst -u -l -s -n "SQLite3 Datasource" || true |
---|
152 | } |
---|
153 | |
---|
154 | true |
---|
155 | fi |
---|
156 | |
---|
157 | %postun -p /sbin/ldconfig |
---|
158 | |
---|
159 | |
---|
160 | %files |
---|
161 | %doc README ChangeLog license.terms odbc.ini.sample |
---|
162 | %{_libdir}/*.so* |
---|
163 | |
---|
164 | |
---|
165 | %changelog |
---|
166 | * Sat Aug 31 2019 Toshiaki Ara <ara_t@384.jp> - 0.9996-2 |
---|
167 | - drop sqlite2 support |
---|
168 | |
---|
169 | * Thu Aug 29 2019 Toshiaki Ara <ara_t@384.jp> - 0.9996-1 |
---|
170 | - first reease for Vine Linux |
---|
171 | |
---|
172 | * Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9996-4 |
---|
173 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild |
---|
174 | |
---|
175 | * Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9996-3 |
---|
176 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild |
---|
177 | |
---|
178 | * Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9996-2 |
---|
179 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild |
---|
180 | |
---|
181 | * Mon Mar 12 2018 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9996-1 |
---|
182 | - Update to the latest available version. |
---|
183 | |
---|
184 | * Sat Feb 24 2018 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9995-5 |
---|
185 | - Add missing BR (gcc) |
---|
186 | |
---|
187 | * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9995-4 |
---|
188 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild |
---|
189 | |
---|
190 | * Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9995-3 |
---|
191 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild |
---|
192 | |
---|
193 | * Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9995-2 |
---|
194 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild |
---|
195 | |
---|
196 | * Mon Jun 12 2017 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9995-1 |
---|
197 | - Update to the latest available version. |
---|
198 | - Start using %%license |
---|
199 | |
---|
200 | * Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9994-2 |
---|
201 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild |
---|
202 | |
---|
203 | * Wed Aug 17 2016 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9994-1 |
---|
204 | - Update to the latest available version. |
---|
205 | |
---|
206 | * Tue Sep 23 2014 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.999-1 |
---|
207 | - Initial package. |
---|