libmariadb-vl.spec 13 KB

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