]> git.pld-linux.org Git - packages/MyODBC.git/blob - MyODBC.spec
- X11R6 is no more
[packages/MyODBC.git] / MyODBC.spec
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.UTF-8):      MyODBC: driver ODBC dla MySQL
7 Name:           MyODBC
8 Version:        3.51.23
9 Release:        1
10 License:        GPL v2+ + MySQL FLOSS Exception
11 Vendor:         MySQL AB
12 Group:          Libraries
13 #Source0:       http://www.mysql.com/Downloads/MyODBC/%{name}-%{version}.tar.gz
14 Source0:        http://sunsite.icm.edu.pl/mysql/Downloads/Connector-ODBC/3.51/mysql-connector-odbc-%{version}r998.tar.gz
15 # Source0-md5:  74b02e2771529db36f98120f4308f9c9
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.UTF-8
35 MyODBC: sterownik ODBC dla MySQL.
36
37 %package qt
38 Summary:        MyODBC - Qt-based setup library
39 Summary(pl.UTF-8):      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.UTF-8
47 MyODBC - Oparta o Qt biblioteka konfiguracyjna.
48
49 %prep
50 %setup -q -n mysql-connector-odbc-%{version}r998
51
52 %build
53 %{__libtoolize}
54 %{__aclocal}
55 %{__automake} -i
56 %{__autoconf}
57 %{__autoheader}
58 %configure \
59         --with-qt-libraries=%{_libdir} \
60         --with-qt-dir=/usr \
61         --with-qt-includes=/usr/include/qt \
62 %if %{with iodbc}
63         --with-iODBC=/usr \
64         --with-odbc-ini=/etc/odbc.ini
65 %else
66         --with-unixODBC=/usr
67 %endif
68
69 %{__make}
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73
74 %{__make} install \
75         DESTDIR=$RPM_BUILD_ROOT
76
77 rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la
78 rm -rf $RPM_BUILD_ROOT%{_datadir}/mysql-connector-odbc
79
80 %clean
81 rm -rf $RPM_BUILD_ROOT
82
83 %post
84 /sbin/ldconfig
85 # install text driver
86 /usr/bin/odbcinst -i -d -r <<EOF
87 [MySQL]
88 Description = ODBC for MySQL
89 Driver = %{_libdir}/libmyodbc3.so
90 FileUsage = 1
91 EOF
92
93 %postun -p /sbin/ldconfig
94
95 %post   qt -p /sbin/ldconfig
96 %postun qt -p /sbin/ldconfig
97
98 %files
99 %defattr(644,root,root,755)
100 %doc ChangeLog LICENSE.exceptions README
101 %attr(755,root,root) %{_bindir}/myodbc3*
102 %attr(755,root,root) %{_libdir}/libmyodbc3-*.so
103 %attr(755,root,root) %{_libdir}/libmyodbc3.so
104 %attr(755,root,root) %{_libdir}/libmyodbc3_r-*.so
105 %attr(755,root,root) %{_libdir}/libmyodbc3_r.so
106
107 %files qt
108 %defattr(644,root,root,755)
109 %attr(755,root,root) %{_libdir}/libmyodbc3S-*.so
110 %attr(755,root,root) %{_libdir}/libmyodbc3S.so
This page took 0.082014 seconds and 3 git commands to generate.