]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with iodbc # build with libiodbc instead of unixODBC | |
4 | # | |
5 | Summary: MyODBC: an ODBC driver for MySQL | |
6 | Summary(pl): MyODBC: driver ODBC dla MySQL | |
7 | Name: MyODBC | |
8 | Version: 3.51.10 | |
9 | Release: 2 | |
10 | License: GPL v2+ | |
11 | Vendor: MySQL AB | |
12 | Group: Libraries | |
13 | #Source0: http://www.mysql.com/Downloads/MyODBC/%{name}-%{version}.tar.gz | |
14 | Source0: ftp://sunsite.icm.edu.pl/pub/unix/mysql/Downloads/MyODBC3/%{name}-%{version}.tar.gz | |
15 | # Source0-md5: 34334272eb6f60dffc793c9aa3d29154 | |
16 | URL: http://www.mysql.com/ | |
17 | BuildRequires: autoconf | |
18 | BuildRequires: automake | |
19 | %if %{with iodbc} | |
20 | BuildRequires: libiodbc-devel | |
21 | %else | |
22 | BuildRequires: unixODBC-devel | |
23 | %endif | |
24 | BuildRequires: libltdl-devel | |
25 | BuildRequires: libtool | |
26 | BuildRequires: mysql-devel >= 4.0.10 | |
27 | BuildRequires: qt-devel | |
28 | Requires(post): /usr/bin/odbcinst | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | MyODBC: an ODBC driver for MySQL. | |
33 | ||
34 | %description -l pl | |
35 | MyODBC: sterownik ODBC dla MySQL. | |
36 | ||
37 | %package qt | |
38 | Summary: MyODBC - Qt-based setup library | |
39 | Summary(pl): MyODBC - Oparta o Qt biblioteka konfiguracyjna | |
40 | Group: Libraries | |
41 | Requires: %{name} = %{version}-%{release} | |
42 | ||
43 | %description qt | |
44 | MyODBC - Qt-based setup library. | |
45 | ||
46 | %description qt -l pl | |
47 | MyODBC - Oparta o Qt biblioteka konfiguracyjna. | |
48 | ||
49 | %prep | |
50 | %setup -q | |
51 | ||
52 | %build | |
53 | %{__libtoolize} | |
54 | %{__aclocal} | |
55 | %{__automake} -i | |
56 | %{__autoconf} | |
57 | %{__autoheader} | |
58 | LDFLAGS="%{rpmldflags} -L/usr/X11R6/%{_lib}" | |
59 | %configure \ | |
60 | %if %{with iodbc} | |
61 | --with-iODBC=/usr \ | |
62 | --with-odbc-ini=/etc/odbc.ini | |
63 | %else | |
64 | --with-unixODBC=/usr | |
65 | %endif | |
66 | ||
67 | %{__make} | |
68 | ||
69 | %install | |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
72 | %{__make} install \ | |
73 | DESTDIR=$RPM_BUILD_ROOT | |
74 | ||
75 | rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la | |
76 | ||
77 | %clean | |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
80 | %post | |
81 | /sbin/ldconfig | |
82 | # install text driver | |
83 | /usr/bin/odbcinst -i -d -r <<EOF | |
84 | [MySQL] | |
85 | Description = ODBC for MySQL | |
86 | Driver = %{_libdir}/libmyodbc3.so | |
87 | FileUsage = 1 | |
88 | EOF | |
89 | ||
90 | %postun -p /sbin/ldconfig | |
91 | ||
92 | %post qt -p /sbin/ldconfig | |
93 | %postun qt -p /sbin/ldconfig | |
94 | ||
95 | %files | |
96 | %defattr(644,root,root,755) | |
97 | %doc ChangeLog INSTALL README | |
98 | %attr(755,root,root) %{_libdir}/libmyodbc3-*.so | |
99 | %attr(755,root,root) %{_libdir}/libmyodbc3.so | |
100 | %attr(755,root,root) %{_libdir}/libmyodbc3_r-*.so | |
101 | %attr(755,root,root) %{_libdir}/libmyodbc3_r.so | |
102 | ||
103 | %files qt | |
104 | %defattr(644,root,root,755) | |
105 | %attr(755,root,root) %{_libdir}/libmyodbc3S-*.so | |
106 | %attr(755,root,root) %{_libdir}/libmyodbc3S.so |