libmariadb-vl.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. Name: libmariadb
  2. Version: 3.0.6
  3. Release: 3%{?_dist_release}
  4. Epoch: 1
  5. Summary: The MariaDB Native Client library (C driver)
  6. Group: System Environment/Libraries
  7. License: LGPLv2+
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. Packager: tomop
  11. Source: https://downloads.mariadb.org/interstitial/connector-c-%{version}/mariadb-connector-c-%{version}-src.tar.gz
  12. Source2: my.cnf
  13. Source3: client.cnf
  14. Url: http://mariadb.org/
  15. # More information: https://mariadb.com/kb/en/mariadb/building-connectorc-from-source/
  16. Patch0: mariadb-connector-c-pkgconfig.patch
  17. Requires: mariadb-common
  18. BuildRequires: zlib-devel cmake openssl-devel gcc-c++
  19. # Remote-IO plugin
  20. BuildRequires: curl-devel
  21. %description
  22. The MariaDB Native Client library (C driver) is used to connect applications
  23. developed in C/C++ to MariaDB and MySQL databases.
  24. %package devel
  25. Summary: Development files for mariadb-connector-c
  26. Group: Development/Libraries
  27. Provides: libmysqlclient-devel = %{epoch}:%{version}-%{release}
  28. Obsoletes: libmysqlclient-devel
  29. Requires: %{name} = %{epoch}:%{version}-%{release}
  30. Requires: openssl-devel
  31. %description devel
  32. Development files for mariadb-connector-c.
  33. Contains everything needed to build against libmariadb.so >=3 client library.
  34. %package -n mariadb-common
  35. Summary: Configuration files for packages that use /etc/my.cnf as a configuration file
  36. BuildArch: noarch
  37. %description -n mariadb-common
  38. This package delivers /etc/my.cnf that includes other configuration files
  39. from the /etc/my.cnf.d directory and ships this directory as well.
  40. Other packages should only put their files into /etc/my.cnf.d directory
  41. and require this package, so the /etc/my.cnf file is present.
  42. %prep
  43. %setup -q -n mariadb-connector-c-%{version}-src
  44. %patch0 -p1 -b .pkgconfig
  45. # Remove unsused parts
  46. rm -r win zlib win-iconv examples
  47. %build
  48. # https://jira.mariadb.org/browse/MDEV-13836:
  49. # The server has (used to have for ages) some magic around the port number.
  50. # If it's 0, the default port value will use getservbyname("mysql", "tcp"), that is, whatever is written in /etc/services.
  51. # If it's a positive number, say, 3306, it will be 3306, no matter what /etc/services say.
  52. # I don't know if that behavior makes much sense, /etc/services wasn't supposed to be a system configuration file.
  53. # The INSTALL_xxx macros have to be specified relative to CMAKE_INSTALL_PREFIX
  54. # so we can't use %%{_datadir} and so forth here.
  55. %cmake . \
  56. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  57. -DCMAKE_SYSTEM_PROCESSOR="%{_arch}" \
  58. \
  59. -DMARIADB_UNIX_ADDR=%{_sharedstatedir}/mysql/mysql.sock \
  60. -DMARIADB_PORT=3306 \
  61. \
  62. -DWITH_EXTERNAL_ZLIB=YES \
  63. -DWITH_SSL=OPENSSL \
  64. -DWITH_MYSQLCOMPAT=ON \
  65. \
  66. -DINSTALL_LAYOUT=RPM \
  67. -DCMAKE_INSTALL_PREFIX="%{_prefix}" \
  68. -DINSTALL_BINDIR="bin" \
  69. -DINSTALL_LIBDIR="%{_lib}" \
  70. -DINSTALL_INCLUDEDIR="include/mysql" \
  71. -DINSTALL_PLUGINDIR="%{_lib}/mariadb/plugin" \
  72. \
  73. -DWITH_UNITTEST=ON
  74. #cmake -LAH
  75. make %{?_smp_mflags}
  76. %install
  77. rm -rf %{buildroot}
  78. make install DESTDIR=%{buildroot}
  79. #multilib_fix_c_header --file %{_includedir}/mysql/mariadb_version.h
  80. %ifarch x86_64
  81. mv -f %{buildroot}%{_prefix}/lib/pkgconfig %{buildroot}%{_libdir}/
  82. %endif
  83. sed -e 's/libmariadb/libmysqlclient/' < %{buildroot}%{_libdir}/pkgconfig/libmariadb.pc > %{buildroot}%{_libdir}/pkgconfig/libmysqlclient.pc
  84. # Remove static linked libraries and symlinks to them
  85. rm %{buildroot}%{_libdir}/lib*.a
  86. # Add a compatibility symlinks
  87. ln -s mariadb_config %{buildroot}%{_bindir}/mysql_config
  88. ln -s mariadb_version.h %{buildroot}%{_includedir}/mysql/mysql_version.h
  89. # Install config files
  90. install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/my.cnf
  91. install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/my.cnf.d/client.cnf
  92. %check
  93. # Check the generated configuration on the actual machine
  94. %{buildroot}%{_bindir}/mariadb_config
  95. # Run the unit tests
  96. # - don't run mytap tests
  97. # - ignore the testsuite result for now. Enable tests now, fix them later.
  98. pushd unittest/libmariadb/
  99. ctest || :
  100. popd
  101. # https://fedoraproject.org/wiki/Packaging:Directory_Replacement
  102. %pretrans -p <lua>
  103. path = "%{_libdir}/mariadb"
  104. st = posix.stat(path)
  105. if st and st.type == "link" then
  106. os.remove(path)
  107. end
  108. path = "%{_libdir}/mysql"
  109. st = posix.stat(path)
  110. if st and st.type == "link" then
  111. os.remove(path)
  112. end
  113. %files
  114. %{_libdir}/libmariadb.so.*
  115. %dir %{_libdir}/mariadb
  116. %dir %{_libdir}/mariadb/plugin
  117. %{_libdir}/mariadb/plugin/*
  118. %doc README
  119. %license COPYING.LIB
  120. %files devel
  121. # Binary which provides compiler info for software compiling against this library
  122. %{_bindir}/mariadb_config
  123. %{_bindir}/mysql_config
  124. # Symlinks to the versioned library
  125. %{_libdir}/libmariadb.so
  126. %{_libdir}/libmysqlclient.so
  127. %{_libdir}/libmysqlclient_r.so
  128. # pkgconfig files
  129. %dir %{_libdir}/pkgconfig
  130. %{_libdir}/pkgconfig/*
  131. # Header files
  132. %dir %{_includedir}/mysql
  133. %{_includedir}/mysql/*
  134. %license COPYING.LIB
  135. %files -n mariadb-common
  136. %dir %{_sysconfdir}/my.cnf.d
  137. %config(noreplace) %{_sysconfdir}/my.cnf
  138. %config(noreplace) %{_sysconfdir}/my.cnf.d/client.cnf
  139. # RPMLint issues from 2.3.2 release tracked on the upstream JIRA:
  140. # https://jira.mariadb.org/browse/CONC-232
  141. # https://jira.mariadb.org/browse/CONC-234
  142. # RPMLint issues from 3.0.2 release tracked on the upstream JIRA:
  143. # https://jira.mariadb.org/browse/CONC-287
  144. # https://jira.mariadb.org/browse/CONC-291
  145. %changelog
  146. * Mon Nov 05 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.0.6-3
  147. - initial built for Vine Linux.
  148. * Tue Sep 04 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-2
  149. - Fix parallel installability of x86_64 and i686 devel package
  150. * Fri Aug 03 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-1
  151. - Rebase to 3.0.6
  152. * Tue Jul 17 2018 Honza Horak <hhorak@redhat.com> - 3.0.5-3
  153. - Add -config sub-package that delivers system-wide /etc/my.cnf and
  154. /etc/my.cnf.d directory, that other packages should use
  155. This package also obsoletes mariadb-config
  156. * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.5-2
  157. - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
  158. * Fri Jun 08 2018 Michal Schorm <mschorm@redhat.com> - 3.0.5-1
  159. - Rebase to 3.0.5
  160. * Thu Apr 26 2018 Michal Schorm <mschorm@redhat.com> - 3.0.4-1
  161. - Rebase to 3.0.4
  162. * Mon Apr 23 2018 Michal Schorm <mschorm@redhat.com> - 3.0.3-4
  163. - Further fix of the '--plugindir' output from the config binary
  164. Realted: #1569159
  165. * Wed Mar 21 2018 Richard W.M. Jones <rjones@redhat.com> - 3.0.3-3
  166. - Fix plugin install directory (INSTALL_PLUGINDIR not PLUGIN_INSTALL_DIR).
  167. * Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-2
  168. - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
  169. * Fri Jan 19 2018 Michal Schorm <mschorm@redhat.com> - 3.0.3-1
  170. - Rebase to 3.0.3
  171. * Mon Nov 27 2017 Honza Horak <hhorak@redhat.com> - 3.0.2-21
  172. - Remove unneeded dependency on xmlto
  173. * Tue Nov 14 2017 Pavel Raiskup <praiskup@redhat.com> - 3.0.2-19
  174. - drop misleading provides
  175. * Wed Nov 08 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-19
  176. - Move the scriptlet to the correct package
  177. * Thu Nov 02 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-18
  178. - Fix typo in require
  179. * Wed Nov 01 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-17
  180. - Use correct require for OpenSSL
  181. * Wed Nov 01 2017 Merlin Mathesius <mmathesi@redhat.com> - 3.0.2-16
  182. - Correct typo in spec file conditional
  183. * Tue Oct 31 2017 Merlin Mathesius <mmathesi@redhat.com> - 3.0.2-15
  184. - Cleanup spec file conditionals
  185. * Tue Oct 31 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-14
  186. - Remove Requires for openssl. Managed by RPM.
  187. * Mon Oct 30 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-13
  188. - Update scriplet dealing with symlinks as Guidelines suggests
  189. Related: #1501933
  190. * Thu Oct 26 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-12
  191. - Move library directly to libdir, don't create any symlinks to directories
  192. - Update scritplets, so they only check for old symlinks to directories
  193. Related: #1501933
  194. - Add 'Conflicts' with mariadb package on F<28
  195. Related: #1506441
  196. * Mon Oct 09 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-11
  197. - Fix ldconfig path
  198. * Wed Oct 04 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-10
  199. - Add scriptlets to handle errors in /usr/lib64/ created by older versions
  200. of mariadb and mariadb-connector-c pakages
  201. * Wed Sep 20 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-9
  202. - Add symlinks so more packages will build succesfully
  203. - Change libdir from .../lib64/mariadb to mysql
  204. Related: #1497234
  205. * Wed Sep 13 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-7
  206. - Move header files to the same location, as they would be in mariadb-server
  207. - Add provides "libmysqlclient.so"
  208. * Tue Sep 05 2017 Honza Horak <hhorak@redhat.com> - 3.0.2-5
  209. - Remove a symlink /usr/lib64/mysql that conflicts with mariadb-libs
  210. * Mon Aug 14 2017 Honza Horak <hhorak@redhat.com> - 3.0.2-4
  211. - Add compatibility symlinks
  212. * Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-3
  213. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
  214. * Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-2
  215. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
  216. * Wed Jun 07 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-1
  217. - Rebase to version 3.0.2
  218. - Library libmariadb.so.3 introduced
  219. - Plugin Remote-IO enabled
  220. * Wed Jun 07 2017 Michal Schorm <mschorm@redhat.com> - 2.3.3-1
  221. - Rebase to version 2.3.3
  222. - Patch dropped, solved by upstream; https://jira.mariadb.org/browse/CONC-231
  223. * Tue Feb 07 2017 Michal Schorm <mschorm@redhat.com> - 2.3.2-2
  224. - Fix based on output from RPMLint in previous version
  225. * Tue Jan 24 2017 Michal Schorm <mschorm@redhat.com> - 2.3.2-1
  226. - Rebase to version 2.3.2, patch needed (fixed by upstream in later versions)
  227. - Plugin dir moved from /libdir/plugin to /libdir/mariadb/plugin
  228. * Thu Oct 27 2016 Michal Schorm <mschorm@redhat.com> - 2.3.1-3
  229. - Fixed ownership of {_libdir}/mariadb (this dir must me owned by package)
  230. - Fixed ownership of {_sysconfigdir}/ld.so.conf.d (this dir must me owned by package)
  231. - Fixed redundnace on lines with {_sysconfigdir}/ld.so.conf.d
  232. - Fixed ownership of {_bindir} (only one program is owned, so let's be accurate)
  233. - Some comments added, for me and future maintainers
  234. * Mon Oct 17 2016 Michal Schorm <mschorm@redhat.com> - 2.3.1-2
  235. - Fixed ownership of {_libdir}/mariadb directory and cosmetic specfile changes
  236. * Tue Sep 13 2016 Michal Schorm <mschorm@redhat.com> - 2.3.1-1
  237. - Rebase to version 2.3.1
  238. * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2
  239. - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
  240. * Thu Jul 23 2015 Matej Mužila <mmuzila@redhat.com> - 2.1.0-1
  241. - Rebase to version 2.1.0
  242. * Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-3
  243. - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
  244. * Wed Sep 24 2014 Matej Mužila <mmuzila@redhat.com> - 2.0.0-2
  245. - Fixed html IDs in documentation
  246. * Tue Aug 26 2014 Matej Mužila <mmuzila@redhat.com> - 2.0.0-2
  247. - Initial version for 2.0.0