]> git.pld-linux.org Git - packages/MyODBC.git/blob - MyODBC.spec
- updated
[packages/MyODBC.git] / MyODBC.spec
1 %bcond_with     iodbs # build with libiodbc not with unixODBC
2
3 Summary:        MyODBC: an ODBC driver for MySQL
4 Summary(pl):    MyODBC: driver ODBC dla MySQL
5 Name:           MyODBC
6 %define sver    3.51
7 Version:        %{sver}.07
8 Release:        1
9 License:        Public Domain
10 Vendor:         MySQL AB
11 Group:          Applications/Databases
12 #Source0:       http://www.mysql.com/Downloads/MyODBC/%{name}-%{version}.tar.gz
13 Source0:        ftp://sunsite.icm.edu.pl/pub/unix/mysql/Downloads/MyODBC3/%{name}-%{version}.tar.gz
14 # Source0-md5:  80cda1784319505941c56aad5d7ac2a9
15 URL:            http://www.mysql.com/
16 BuildRequires:  autoconf
17 BuildRequires:  automake
18 %if %{with iodbs}
19 BuildRequires:  libiodbc-devel
20 %else
21 BuildRequires:  unixODBC-devel
22 %endif
23 BuildRequires:  libltdl-devel
24 BuildRequires:  libtool
25 BuildRequires:  mysql-devel >= 4.0.10
26 Requires(post): /usr/bin/odbcinst
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 MyODBC: an ODBC driver for MySQL.
31
32 %description -l pl
33 MyODBC: sterownik ODBC dla MySQL.
34
35 %prep
36 %setup -q -n myodbc-%{sver}
37
38 %build
39 rm -rf missing autom*
40 %{__libtoolize}
41 %{__aclocal}
42 %{__automake} -i
43 %{__autoconf}
44 %{__autoheader}
45 %configure \
46 %if %{with iodbc}
47         --with-iODBC=/usr \
48         --with-odbc-ini=/etc/odbc.ini
49 %else
50         --with-unixODBC=/usr
51 %endif
52
53 %{__make}
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57
58 %{__make} install \
59         DESTDIR=$RPM_BUILD_ROOT
60
61 %clean
62 rm -rf $RPM_BUILD_ROOT
63
64 %post
65 /sbin/ldconfig
66 # install text driver
67 /usr/bin/odbcinst -i -d -r <<EOF
68 [MySQL]
69 Description = ODBC for MySQL
70 Driver = %{_libdir}/libmyodbc3.so
71 FileUsage = 1
72 EOF
73
74 %postun -p /sbin/ldconfig
75
76 %files
77 %defattr(644,root,root,755)
78 %doc INSTALL ChangeLog
79 %attr(755,root,root) %{_libdir}/libmyodbc*
This page took 0.029397 seconds and 3 git commands to generate.