mysql-connector-odbc-vl.spec 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. #%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
  2. %define build_compat32 0
  3. Summary: ODBC driver for MySQL
  4. Name: mysql-connector-odbc
  5. Version: 5.3.4
  6. Release: 2%{?_dist_release}
  7. Group: System Environment/Libraries
  8. URL: http://dev.mysql.com/downloads/connector/odbc/
  9. # exceptions allow library to be linked with most open source SW,
  10. # not only GPL code.
  11. License: GPLv2 with exceptions
  12. Source0: http://dev.mysql.com/get/Downloads/Connector-ODBC/5.2/%{name}-%{version}-src.tar.gz
  13. # mysql-connector-odbc expects to be able to get at a bunch of utility
  14. # functions inside libmysqlclient. Now that we are restricting what symbols
  15. # are exported by libmysqlclient, that doesn't work. Instead, copy those
  16. # functions here. mysql and mysql-connector-odbc are published under the same
  17. # license, so this creates no legal issues. (Note: we don't worry about
  18. # polluting application namespace in mysql-connector-odbc, since it's never
  19. # directly statically linked with any application code.)
  20. Source1: mariadb-mysys.tar.gz
  21. Patch1: myodbc-add-mysys.patch
  22. Patch2: myodbc-shutdown.patch
  23. Patch3: myodbc-64bit.patch
  24. Patch4: myodbc-movecmpfunc.patch
  25. Patch5: mysql-connector-odbc-buffsize.patch
  26. Patch6: mysql-connector-odbc-cleartext.patch
  27. Patch7: mysql-connector-odbc-format-security.patch
  28. Patch8: mysql-connector-odbc-5.2.5-aarch64.patch
  29. Patch9: myodbc-mariadb10.patch
  30. Patch10: mysql-connector-odbc-fix-segv.patch
  31. BuildRequires: libmysqlclient-devel unixODBC-devel gtk3-devel
  32. BuildRequires: cmake
  33. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  34. %description
  35. An ODBC (rev 3) driver for MySQL, for use with unixODBC.
  36. %package -n compat32-%{name}
  37. Summary: ODBC driver for MySQL
  38. Group: System Environment/Libraries
  39. Requires: %{name} = %{version}-%{release}
  40. %description -n compat32-%{name}
  41. An ODBC (rev 3) driver for MySQL, for use with unixODBC.
  42. %prep
  43. %setup -q -n %{name}-%{version}-src
  44. tar xfz %{SOURCE1}
  45. %patch1 -p1
  46. %patch2 -p1
  47. #%patch3 -p1
  48. #%patch4 -p1
  49. #%patch5 -p1
  50. #%patch6 -p1
  51. #%patch7 -p1
  52. #%patch8 -p1
  53. %patch9 -p1
  54. %patch10 -p1
  55. # mysql_config does not support --cxxflags option
  56. sed -i 's/--cxxflags/--cflags/g' cmake/FindMySQL.cmake
  57. %build
  58. # mysql 5.5.10 has stopped #define'ing THREAD in its exports, and has
  59. # started #define'ing MY_PTHREAD_FASTMUTEX, and neither of those changes
  60. # sit well with mysql-connector-odbc 5.1.10. Revisit need for these hacks
  61. # when updating to newer release.
  62. export CFLAGS="%{optflags} -lpthread -fno-strict-aliasing -DTHREAD=1 -UMY_PTHREAD_FASTMUTEX -DDBUG_OFF"
  63. cmake . -G "Unix Makefiles" \
  64. -DWITH_UNIXODBC=1 \
  65. -DRPM_BUILD=1 \
  66. -DCMAKE_INSTALL_PREFIX="%{_prefix}" \
  67. -DMYSQLCLIENT_LIB_NAME=mysqlclient
  68. make %{?_smp_mflags} VERBOSE=1
  69. %install
  70. export tagname=CC
  71. make DESTDIR=$RPM_BUILD_ROOT install
  72. # Remove stuff not to be packaged (possibly reconsider later)
  73. rm -f $RPM_BUILD_ROOT%{_bindir}/myodbc-installer
  74. rm -f $RPM_BUILD_ROOT/usr/COPYING
  75. rm -f $RPM_BUILD_ROOT/usr/README
  76. rm -f $RPM_BUILD_ROOT/usr/README.debug
  77. rm -f $RPM_BUILD_ROOT/usr/ChangeLog
  78. rm -f $RPM_BUILD_ROOT/usr/INSTALL
  79. rm -f $RPM_BUILD_ROOT/usr/Licenses_for_Third-Party_Components.txt
  80. # Create a symlink for library to offer name that users are used to
  81. ln -sf libmyodbc5w.so $RPM_BUILD_ROOT%{_libdir}/libmyodbc5.so
  82. # Upstream provides a test suite with functional and regression tests.
  83. # However, some tests fail, so it would deserve some more investigation.
  84. # We don't include the test suite until it works fine.
  85. rm -rf $RPM_BUILD_ROOT/usr/test
  86. %post
  87. /sbin/ldconfig
  88. %postun
  89. /sbin/ldconfig
  90. %post -n compat32-%{name}
  91. /sbin/ldconfig
  92. %postun -n compat32-%{name}
  93. /sbin/ldconfig
  94. %files
  95. %doc README README.debug ChangeLog COPYING
  96. %{_libdir}/lib*so
  97. %if %{build_compat32}
  98. %files -n compat32-%{name}
  99. %{_libdir}/lib*so
  100. %endif
  101. %changelog
  102. * Thu Nov 27 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.4-2
  103. - fixed a bug causing segmentation fault.
  104. * Sat Jul 19 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.4-1
  105. - new upstream release.
  106. * Tue Jul 8 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.2-2
  107. - initial build for Vine Linux.
  108. * Thu Jun 12 2014 Jakub Dorňák <jdornak@redhat.com> - 5.3.2-1
  109. - Rebase to version 5.3.2
  110. - MariaDB 10 compatibility
  111. * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2.6-2
  112. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
  113. * Fri Jan 24 2014 Jakub Dorňák <jdornak@redhat.com> - 5.2.6-1
  114. - Update to 2.5.6
  115. Resolves: #1047895
  116. * Wed Jan 8 2014 Marcin Juszkiewicz <mjuszkiewicz redhat com> - 5.2.5-5
  117. - Build failed because whether to use lib64 or not is done by checking
  118. list of known 64-bit architectures. So added AArch64 to that list.
  119. Resolves: #1041348
  120. * Thu Dec 12 2013 Jakub Dorňák <jdornak@redhat.com> - 5.2.5-4
  121. - format-security
  122. Resolves: #1037209
  123. * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2.5-3
  124. - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
  125. * Mon Jun 17 2013 Honza Horak <hhorak@redhat.com> - 5.2.5-2
  126. - Avoid potential segfault
  127. Resolves: #974794
  128. * Fri May 24 2013 Honza Horak <hhorak@redhat.com> - 5.2.5-1
  129. - Update to 5.2.5
  130. - Enlarge buffer size for query string when getting info about tables
  131. Related: #948619
  132. * Wed Apr 3 2013 Honza Horak <hhorak@redhat.com> - 5.2.4-2
  133. - Fix libdir in cmake for ppc64
  134. * Tue Mar 5 2013 Honza Horak <hhorak@redhat.com> - 5.2.4-1
  135. - Update to 5.2.4
  136. * Fri Mar 1 2013 Honza Horak <hhorak@redhat.com> - 5.1.11-3
  137. - Fix data types for mariadb
  138. * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.11-2
  139. - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
  140. * Sun Jul 22 2012 Tom Lane <tgl@redhat.com> 5.1.11-1
  141. - Update to 5.1.11
  142. * Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.10-2
  143. - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
  144. * Sun Feb 5 2012 Tom Lane <tgl@redhat.com> 5.1.10-1
  145. - Update to 5.1.10
  146. * Tue Jan 10 2012 Tom Lane <tgl@redhat.com> 5.1.9-1
  147. - Update to 5.1.9
  148. - Add --with-unixODBC-libs to configure command for safer multilib behavior
  149. Related: #757088
  150. * Wed Mar 23 2011 Tom Lane <tgl@redhat.com> 5.1.8-3
  151. - Rebuild for libmysqlclient 5.5.10 soname version bump
  152. * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.8-2
  153. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  154. * Thu Dec 23 2010 Tom Lane <tgl@redhat.com> 5.1.8-1
  155. - Update to 5.1.8
  156. - Deal with mysql packaging changes that prevent us from using mysys
  157. utility functions directly
  158. * Wed Jan 20 2010 Tom Lane <tgl@redhat.com> 5.1.5r1144-7
  159. - Correct Source: tag and comment to reflect how to get the tarball
  160. * Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 5.1.5r1144-6
  161. - rebuilt with new openssl
  162. * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.5r1144-5
  163. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  164. * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.5r1144-4
  165. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  166. * Fri Feb 20 2009 Tom Lane <tgl@redhat.com> 5.1.5r1144-3
  167. - Fix some 64-bitness issues with unixODBC 2.2.14.
  168. * Fri Feb 20 2009 Tom Lane <tgl@redhat.com> 5.1.5r1144-2
  169. - Rebuild for unixODBC 2.2.14.
  170. - Fix problem with null username/password specifications
  171. * Thu Jan 22 2009 Tom Lane <tgl@redhat.com> 5.1.5r1144-1
  172. - Update to mysql-connector-odbc 5.1.5r1144, to go with MySQL 5.1.x.
  173. Note the library name has changed from libmyodbc3 to libmyodbc5.
  174. * Tue Aug 5 2008 Tom Lane <tgl@redhat.com> 3.51.26r1127-1
  175. - Update to mysql-connector-odbc 3.51.26r1127
  176. * Tue Mar 25 2008 Tom Lane <tgl@redhat.com> 3.51.24r1071-1
  177. - Update to mysql-connector-odbc 3.51.24r1071
  178. * Tue Feb 12 2008 Tom Lane <tgl@redhat.com> 3.51.23r998-1
  179. - Update to mysql-connector-odbc 3.51.23r998
  180. * Wed Dec 5 2007 Tom Lane <tgl@redhat.com> 3.51.14r248-3
  181. - Rebuild for new openssl
  182. * Thu Aug 2 2007 Tom Lane <tgl@redhat.com> 3.51.14r248-2
  183. - Update License tag to match code.
  184. * Fri Apr 20 2007 Tom Lane <tgl@redhat.com> 3.51.14r248-1
  185. - Update to mysql-connector-odbc 3.51.14r248
  186. Resolves: #236473
  187. - Fix build problem on multilib machines
  188. * Mon Jul 17 2006 Tom Lane <tgl@redhat.com> 3.51.12-2.2
  189. - rebuild
  190. * Mon Mar 27 2006 Tom Lane <tgl@redhat.com> 3.51.12-2
  191. - Remove DLL-unload cleanup call from connection shutdown (bz#185343)
  192. * Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 3.51.12-1.2.1
  193. - bump again for double-long bug on ppc(64)
  194. * Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 3.51.12-1.2
  195. - rebuilt for new gcc4.1 snapshot and glibc changes
  196. * Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
  197. - rebuilt
  198. * Fri Nov 11 2005 Tom Lane <tgl@redhat.com> 3.51.12-1
  199. - New package replacing MyODBC.