libmariadb-vl.spec 12 KB

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