libmariadb-vl.spec 12 KB

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